-- see zlib.h -- */
(file, str)
| 388 | |
| 389 | /* -- see zlib.h -- */ |
| 390 | int ZEXPORT gzputs(file, str) |
| 391 | gzFile file; |
| 392 | |
| 393 | const char* str; |
| 394 | { |
| 395 | int ret; |
| 396 | z_size_t len; |
| 397 | gz_statep state; |
| 398 | |
| 399 | /* get internal structure */ |
| 400 | if (file == NULL) |
| 401 | return -1; |
| 402 | state = (gz_statep)file; |
| 403 | |
| 404 | /* check that we're writing and that there's no error */ |
| 405 | if (state->mode != GZ_WRITE || state->err != Z_OK) |
| 406 | return -1; |
| 407 | |
| 408 | /* write string */ |
| 409 | len = strlen(str); |
| 410 | ret = gz_write(state, str, len); |
| 411 | return ret == 0 && len != 0 ? -1 : ret; |
| 412 | } |
| 413 | |
| 414 | #if defined(STDC) || defined(Z_HAVE_STDARG_H) |
| 415 | #include <stdarg.h> |
nothing calls this directly
no test coverage detected