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

Function gzputs

freebsd/contrib/zstd/zlibWrapper/gzwrite.c:358–379  ·  view source on GitHub ↗

-- see zlib.h -- */

(file, str)

Source from the content-addressed store, hash-verified

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

Callers 2

test_gzioFunction · 0.50
test_gzioFunction · 0.50

Calls 1

gz_writeFunction · 0.70

Tested by 2

test_gzioFunction · 0.40
test_gzioFunction · 0.40