opengl

Sample code from LearnOpenGL.com
Log | Files | Refs

err.c (210B)


      1 #include <stdarg.h>
      2 #include <stdio.h>
      3 
      4 char errstr[512];
      5 
      6 int
      7 errorf(char *fmt, ...)
      8 {
      9 	va_list ap;
     10 	int ret;
     11 	va_start(ap, fmt);
     12 	ret = vsnprintf(errstr, sizeof(errstr), fmt, ap);
     13 	va_end(ap);
     14 	return ret;
     15 }