Mercurial > projects > ldc
diff 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 |
line wrap: on
line diff
--- a/dmd/mars.c Thu Mar 12 14:08:57 2009 +0100 +++ b/dmd/mars.c Thu Mar 12 20:37:27 2009 +0100 @@ -25,7 +25,7 @@ #include <windows.h> #endif -#include "mem.h" +#include "rmem.h" #include "root.h" #include "mars.h" @@ -105,6 +105,20 @@ va_end( ap ); } +void warning(Loc loc, const char *format, ...) +{ + if (global.params.warnings && !global.gag) + { + fprintf(stdmsg, "warning - "); + va_list ap; + va_start(ap, format); + char* p = loc.toChars(); + fprintf(stdmsg, "Warning: %s:", p?p:""); + vfprintf(stdmsg, format, ap); + va_end( ap ); + } +} + void verror(Loc loc, const char *format, va_list ap) { if (!global.gag)