MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / gzdopen

Function gzdopen

ZLib/gzlib.c:284–301  ·  view source on GitHub ↗

-- see zlib.h -- */

(fd, mode)

Source from the content-addressed store, hash-verified

282
283/* -- see zlib.h -- */
284gzFile ZEXPORT gzdopen(fd, mode)
285 int fd;
286 const char *mode;
287{
288 char *path; /* identifier for error messages */
289 gzFile gz;
290
291 if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL)
292 return NULL;
293#if !defined(NO_snprintf) && !defined(NO_vsnprintf)
294 snprintf(path, 7 + 3 * sizeof(int), "<fd:%d>", fd); /* for debugging */
295#else
296 sprintf(path, "<fd:%d>", fd); /* for debugging */
297#endif
298 gz = gz_open(path, fd, mode);
299 free(path);
300 return gz;
301}
302
303/* -- see zlib.h -- */
304#ifdef _WIN32

Callers

nothing calls this directly

Calls 1

gz_openFunction · 0.85

Tested by

no test coverage detected