MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / ZEXPORTVA

Function ZEXPORTVA

zlib/gzio.c:608–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606#include <stdarg.h>
607
608int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
609{
610 char buf[Z_PRINTF_BUFSIZE];
611 va_list va;
612 int len;
613
614 buf[sizeof(buf) - 1] = 0;
615 va_start(va, format);
616#ifdef NO_vsnprintf
617# ifdef HAS_vsprintf_void
618 (void)vsprintf(buf, format, va);
619 va_end(va);
620 for (len = 0; len < sizeof(buf); len++)
621 if (buf[len] == 0) break;
622# else
623 len = vsprintf(buf, format, va);
624 va_end(va);
625# endif
626#else
627# ifdef HAS_vsnprintf_void
628 (void)vsnprintf(buf, sizeof(buf), format, va);
629 va_end(va);
630 len = strlen(buf);
631# else
632 len = vsnprintf(buf, sizeof(buf), format, va);
633 va_end(va);
634# endif
635#endif
636 if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0)
637 return 0;
638 return gzwrite(file, buf, (unsigned)len);
639}
640#else /* not ANSI C */
641
642int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,

Callers

nothing calls this directly

Calls 1

gzwriteFunction · 0.85

Tested by

no test coverage detected