comparison dmd/mars.c @ 1103:b30fe7e1dbb9

- Updated to DMD frontend 1.041. - Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Thu, 12 Mar 2009 20:37:27 +0100
parents f0b6549055ab
children e7f0c2b48047
comparison
equal deleted inserted replaced
1102:ae950bd712d3 1103:b30fe7e1dbb9
23 #include <errno.h> 23 #include <errno.h>
24 #elif _WIN32 24 #elif _WIN32
25 #include <windows.h> 25 #include <windows.h>
26 #endif 26 #endif
27 27
28 #include "mem.h" 28 #include "rmem.h"
29 #include "root.h" 29 #include "root.h"
30 30
31 #include "mars.h" 31 #include "mars.h"
32 #include "module.h" 32 #include "module.h"
33 #include "mtype.h" 33 #include "mtype.h"
101 { 101 {
102 va_list ap; 102 va_list ap;
103 va_start(ap, format); 103 va_start(ap, format);
104 verror(loc, format, ap); 104 verror(loc, format, ap);
105 va_end( ap ); 105 va_end( ap );
106 }
107
108 void warning(Loc loc, const char *format, ...)
109 {
110 if (global.params.warnings && !global.gag)
111 {
112 fprintf(stdmsg, "warning - ");
113 va_list ap;
114 va_start(ap, format);
115 char* p = loc.toChars();
116 fprintf(stdmsg, "Warning: %s:", p?p:"");
117 vfprintf(stdmsg, format, ap);
118 va_end( ap );
119 }
106 } 120 }
107 121
108 void verror(Loc loc, const char *format, va_list ap) 122 void verror(Loc loc, const char *format, va_list ap)
109 { 123 {
110 if (!global.gag) 124 if (!global.gag)