|
|
@ -349,9 +349,9 @@ int ZEXPORT gzputc(file, c) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* -- see zlib.h -- */ |
|
|
|
/* -- see zlib.h -- */ |
|
|
|
int ZEXPORT gzputs(file, str) |
|
|
|
int ZEXPORT gzputs(file, s) |
|
|
|
gzFile file; |
|
|
|
gzFile file; |
|
|
|
const char *str; |
|
|
|
const char *s; |
|
|
|
{ |
|
|
|
{ |
|
|
|
z_size_t len, put; |
|
|
|
z_size_t len, put; |
|
|
|
gz_statep state; |
|
|
|
gz_statep state; |
|
|
@ -366,12 +366,12 @@ int ZEXPORT gzputs(file, str) |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
|
|
|
|
|
|
|
|
/* write string */ |
|
|
|
/* write string */ |
|
|
|
len = strlen(str); |
|
|
|
len = strlen(s); |
|
|
|
if ((int)len < 0 || (unsigned)len != len) { |
|
|
|
if ((int)len < 0 || (unsigned)len != len) { |
|
|
|
gz_error(state, Z_STREAM_ERROR, "string length does not fit in int"); |
|
|
|
gz_error(state, Z_STREAM_ERROR, "string length does not fit in int"); |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
} |
|
|
|
} |
|
|
|
put = gz_write(state, str, len); |
|
|
|
put = gz_write(state, s, len); |
|
|
|
return put < len ? -1 : (int)len; |
|
|
|
return put < len ? -1 : (int)len; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|