2 * log.c Functions in the library call radlib_log() which
3 * sets a global error string "char *librad_errstr".
5 * Version: @(#)log.c 1.00 25-Oct-1998 miquels@cistron.nl
16 char librad_errstr[1024];
18 void librad_log(char *fmt, ...)
24 vsnprintf(librad_errstr, sizeof(librad_errstr), fmt, ap);
26 vsprintf(librad_errstr, fmt, ap);
31 void librad_perror(char *fmt, ...)
36 vfprintf(stderr, fmt, ap);
37 if (strchr(fmt, ':') == NULL)
38 fprintf(stderr, ": ");
39 fprintf(stderr, "%s\n", librad_errstr);