MCPcopy Create free account
hub / github.com/F-Stack/f-stack / gzputs

Function gzputs

freebsd/contrib/zlib/gzwrite.c:355–376  ·  view source on GitHub ↗

-- see zlib.h -- */

(file, str)

Source from the content-addressed store, hash-verified

353
354/* -- see zlib.h -- */
355int ZEXPORT gzputs(file, str)
356 gzFile file;
357 const char *str;
358{
359 int ret;
360 z_size_t len;
361 gz_statep state;
362
363 /* get internal structure */
364 if (file == NULL)
365 return -1;
366 state = (gz_statep)file;
367
368 /* check that we're writing and that there's no error */
369 if (state->mode != GZ_WRITE || state->err != Z_OK)
370 return -1;
371
372 /* write string */
373 len = strlen(str);
374 ret = gz_write(state, str, len);
375 return ret == 0 && len != 0 ? -1 : ret;
376}
377
378#if defined(STDC) || defined(Z_HAVE_STDARG_H)
379#include <stdarg.h>

Callers 1

test_gzioFunction · 0.50

Calls 1

gz_writeFunction · 0.70

Tested by 1

test_gzioFunction · 0.40