MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / gzputs

Function gzputs

extlibs/minizip/src/gzwrite.c:390–412  ·  view source on GitHub ↗

-- see zlib.h -- */

(file, str)

Source from the content-addressed store, hash-verified

388
389/* -- see zlib.h -- */
390int ZEXPORT gzputs(file, str)
391gzFile file;
392
393const 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>

Callers

nothing calls this directly

Calls 1

gz_writeFunction · 0.85

Tested by

no test coverage detected