2 * WindowMaker miscelaneous function library
4 * Copyright (c) 1997 Alfredo K. Kojima
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include "../src/config.h"
31 extern char *_WINGS_progname
;
36 /**************************************************************************
37 * Prints a fatal error message with variable arguments and terminates
39 * msg - message to print with optional formatting
40 * ... - arguments to use on formatting
41 **************************************************************************/
43 wfatal(const char *msg
, ...)
50 vsprintf(buf
, msg
, args
);
53 fputs(_WINGS_progname
, stderr
);
54 fputs(" fatal error: ",stderr
);
62 /*********************************************************************
63 * Prints a warning message with variable arguments
65 * msg - message to print with optional formatting
66 * ... - arguments to use on formatting
67 *********************************************************************/
69 wwarning(const char *msg
, ...)
76 vsprintf(buf
, msg
, args
);
79 fputs(_WINGS_progname
, stderr
);
80 fputs(" warning: ",stderr
);
88 /*********************************************************************
89 * Prints a system error message with variable arguments
91 * msg - message to print with optional formatting
92 * ... - arguments to use on formatting
93 *********************************************************************/
95 wsyserror(const char *msg
, ...)
103 vsprintf(buf
, msg
, args
);
105 fputs(_WINGS_progname
, stderr
);
106 fputs(" error: ", stderr
);
109 strcat(buf
, strerror(error
));