ef546fc369
Obtained from [1] at the request of Nerijus Baliunas [2]. [1] https://web.archive.org/web/20110720231607/http://www.fcoutant.freesurf.fr/download/wmmenu-1.2.tar.gz [2] http://lists.windowmaker.org/dev/msg07991.html
33 lines
619 B
C
33 lines
619 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdarg.h>
|
|
#include <assert.h>
|
|
|
|
#include "error.h"
|
|
|
|
extern void warn (const char * fmt, ...)
|
|
{
|
|
va_list args ;
|
|
|
|
assert (fmt != NULL) ;
|
|
va_start (args, fmt) ;
|
|
fprintf (stderr, "wmmenu warning: ") ;
|
|
vfprintf (stderr, fmt, args) ;
|
|
fprintf (stderr, "\n") ;
|
|
va_end (args) ;
|
|
}
|
|
|
|
extern void error (const char * fmt, ...)
|
|
{
|
|
va_list args ;
|
|
|
|
assert (fmt != NULL) ;
|
|
va_start (args, fmt) ;
|
|
fprintf (stderr, "wmmenu error: ") ;
|
|
vfprintf (stderr, fmt, args) ;
|
|
fprintf (stderr, "\n") ;
|
|
va_end (args) ;
|
|
|
|
exit (EXIT_FAILURE) ;
|
|
}
|