err = Z_ERRNO;
local int destroy (s)    gz_stream *s;{    int err = Z_OK;    if (!s) return Z_STREAM_ERROR;    TRYFREE(s->msg);    if (s->stream.state != NULL) {       if (s->mode == 'w') {           err = deflateEnd(&(s->stream));       } else if (s->mode == 'r') {           err = inflateEnd(&(s->stream));       }    }    if (s->file != NULL && fclose(s->file)) {        err = Z_ERRNO;    }    if (s->z_err < 0) err = s->z_err;    TRYFREE(s->inbuf);    TRYFREE(s->outbuf);    TRYFREE(s->path);    TRYFREE(s);    return err;}