MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / stbiw__writefv

Function stbiw__writefv

Source/ThirdParty/stb_image_write.h:349–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347typedef int stb_image_write_test[sizeof(stbiw_uint32)==4 ? 1 : -1];
348
349static void stbiw__writefv(stbi__write_context *s, const char *fmt, va_list v)
350{
351 while (*fmt) {
352 switch (*fmt++) {
353 case ' ': break;
354 case '1': { unsigned char x = STBIW_UCHAR(va_arg(v, int));
355 s->func(s->context,&x,1);
356 break; }
357 case '2': { int x = va_arg(v,int);
358 unsigned char b[2];
359 b[0] = STBIW_UCHAR(x);
360 b[1] = STBIW_UCHAR(x>>8);
361 s->func(s->context,b,2);
362 break; }
363 case '4': { stbiw_uint32 x = va_arg(v,int);
364 unsigned char b[4];
365 b[0]=STBIW_UCHAR(x);
366 b[1]=STBIW_UCHAR(x>>8);
367 b[2]=STBIW_UCHAR(x>>16);
368 b[3]=STBIW_UCHAR(x>>24);
369 s->func(s->context,b,4);
370 break; }
371 default:
372 STBIW_ASSERT(0);
373 return;
374 }
375 }
376}
377
378static void stbiw__writef(stbi__write_context *s, const char *fmt, ...)
379{

Callers 2

stbiw__writefFunction · 0.85
stbiw__outfileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected