MCPcopy Create free account
hub / github.com/OpenPrinting/cups / add_stringf

Function add_stringf

tools/ipptool.c:762–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

760 */
761
762static void
763add_stringf(cups_array_t *a, /* I - Array */
764 const char *s, /* I - Printf-style format string */
765 ...) /* I - Additional args as needed */
766{
767 char buffer[10240]; /* Format buffer */
768 va_list ap; /* Argument pointer */
769
770
771 /*
772 * Don't bother is the array is NULL...
773 */
774
775 if (!a)
776 return;
777
778 /*
779 * Format the message...
780 */
781
782 va_start(ap, s);
783 vsnprintf(buffer, sizeof(buffer), s, ap);
784 va_end(ap);
785
786 /*
787 * Add it to the array...
788 */
789
790 cupsArrayAdd(a, buffer);
791}
792
793
794/*

Callers 4

do_testFunction · 0.85
with_distinct_valuesFunction · 0.85
with_valueFunction · 0.85
with_value_fromFunction · 0.85

Calls 1

cupsArrayAddFunction · 0.85

Tested by

no test coverage detected