2 ** Nofrendo (c) 1998-2000 Matthew Conte (matt@conte.com)
5 ** This program is free software; you can redistribute it and/or
6 ** modify it under the terms of version 2 of the GNU Library General
7 ** Public License as published by the Free Software Foundation.
9 ** This program is distributed in the hope that it will be useful,
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ** Library General Public License for more details. To obtain a
13 ** copy of the GNU Library General Public License, write to the Free
14 ** Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 ** Any permitted reproduction of these routines, in whole or in part,
17 ** must bear this legend.
22 ** Error logging functions
36 #if defined(OSD_LOG) && !defined(NOFRENDO_DEBUG)
37 #error NOFRENDO_DEBUG must be defined as well as OSD_LOG
40 /* Note that all of these functions will be empty if
41 ** debugging is not enabled.
44 static FILE *errorlog;
52 /* Initialize an OSD logging system */
55 errorlog = fopen ("errorlog.txt", "wt");
58 #endif /* NOFRENDO_DEBUG */
66 /* Snoop around for unallocated blocks */
73 #endif /* NOFRENDO_DEBUG */
77 log_print (const char *string)
81 osd_logprint (string);
83 /* Log it to disk, as well */
84 fputs (string, errorlog);
85 #endif /* NOFRENDO_DEBUG */
89 log_printf (const char *format, ...)
93 char buffer[1024 + 1];
97 va_start (arg, format);
100 vsprintf (buffer, format, arg);
101 osd_logprint (buffer);
103 vfprintf (errorlog, format, arg);
105 #endif /* NOFRENDO_DEBUG */
110 ** Revision 1.2 2008/03/25 15:56:11 slomo
111 ** Patch by: Andreas Henriksson <andreas at fatal dot set>
112 ** * gst/nsf/Makefile.am:
113 ** * gst/nsf/dis6502.h:
114 ** * gst/nsf/fds_snd.c:
115 ** * gst/nsf/fds_snd.h:
116 ** * gst/nsf/fmopl.c:
117 ** * gst/nsf/fmopl.h:
118 ** * gst/nsf/gstnsf.c:
121 ** * gst/nsf/memguard.c:
122 ** * gst/nsf/memguard.h:
123 ** * gst/nsf/mmc5_snd.c:
124 ** * gst/nsf/mmc5_snd.h:
125 ** * gst/nsf/nes6502.c:
126 ** * gst/nsf/nes6502.h:
127 ** * gst/nsf/nes_apu.c:
128 ** * gst/nsf/nes_apu.h:
132 ** * gst/nsf/types.h:
133 ** * gst/nsf/vrc7_snd.c:
134 ** * gst/nsf/vrc7_snd.h:
135 ** * gst/nsf/vrcvisnd.c:
136 ** * gst/nsf/vrcvisnd.h:
137 ** Update our internal nosefart to nosefart-2.7-mls to fix segfaults
138 ** on some files. Fixes bug #498237.
139 ** Remove some // comments, fix some compiler warnings and use pow()
140 ** instead of a slow, selfmade implementation.
142 ** Revision 1.1 2003/04/08 20:46:46 ben
143 ** add new input for NES music file.
145 ** Revision 1.5 2000/06/26 04:55:33 matt
148 ** Revision 1.4 2000/06/09 15:12:25 matt