annotate lwlib/lw_error.c @ 329:c15cca3ae6a2

Created first pass of input layer
author lost
date Sun, 28 Feb 2010 05:01:31 +0000
parents
children ed3553296580
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
329
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
1 /*
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
2 lw_error.c
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
3
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
4 Copyright © 2010 William Astle
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
5
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
6 This file is part of LWTOOLS.
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
7
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
8 LWTOOLS is free software: you can redistribute it and/or modify it under the
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
9 terms of the GNU General Public License as published by the Free Software
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
10 Foundation, either version 3 of the License, or (at your option) any later
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
11 version.
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
12
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
13 This program is distributed in the hope that it will be useful, but WITHOUT
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
16 more details.
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
17
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
18 You should have received a copy of the GNU General Public License along with
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
19 this program. If not, see <http://www.gnu.org/licenses/>.
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
20 */
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
21
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
22 #include <config.h>
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
23
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
24 #define ___lw_error_c_seen___
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
25 #include <lw_error.h>
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
26
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
27 #include <stdio.h>
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
28 #include <stdlib.h>
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
29 #include <stdarg.h>
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
30
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
31 void lw_error(const char *fmt, ...)
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
32 {
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
33 va_list args;
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
34 va_start(args, fmt);
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
35 vfprintf(stderr, fmt, args);
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
36 va_end(args);
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
37 exit(1);
c15cca3ae6a2 Created first pass of input layer
lost
parents:
diff changeset
38 }