diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-15 12:14:05 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-15 12:14:05 +0000 |
commit | 35d488e972a9dd75ce3867c000405f128b79c615 (patch) | |
tree | e3319a23d9aa0d4725f88a99fdd5131488a334a9 /unsorted/ParserErrors.c | |
parent | 8078e7f897aaae9b492b22475060052d68b9c547 (diff) | |
download | MWCC-35d488e972a9dd75ce3867c000405f128b79c615.tar.gz MWCC-35d488e972a9dd75ce3867c000405f128b79c615.zip |
reorganise things a bit to align further with the actual names/structure
Diffstat (limited to 'unsorted/ParserErrors.c')
-rw-r--r-- | unsorted/ParserErrors.c | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/unsorted/ParserErrors.c b/unsorted/ParserErrors.c deleted file mode 100644 index df5e67e..0000000 --- a/unsorted/ParserErrors.c +++ /dev/null @@ -1,119 +0,0 @@ -#include "parser.h" - -static char errorbuf[1024]; - -void CLPReportError_V(const char *format, va_list ap) { - vsprintf(errorbuf, format, ap); - CWReportMessage(parseopts.context, NULL, errorbuf, NULL, messagetypeError, 0); - parseopts.hadErrors = 1; -} - -void CLPReportWarning_V(const char *format, va_list ap) { - vsprintf(errorbuf, format, ap); - CWReportMessage(parseopts.context, NULL, errorbuf, NULL, messagetypeWarning, 0); -} - -void CLPReport_V(const char *format, va_list ap) { - vsprintf(errorbuf, format, ap); - CWReportMessage(parseopts.context, NULL, errorbuf, NULL, messagetypeInfo, 0); -} - -void CLPStatus_V(const char *format, va_list ap) { - vsprintf(errorbuf, format, ap); - CWShowStatus(parseopts.context, errorbuf, NULL); -} - -void CLPAlert_V(const char *format, va_list ap) { - vsprintf(errorbuf, format, ap); - CWAlert(parseopts.context, errorbuf, NULL, NULL, NULL); - parseopts.hadErrors = 1; -} - -void CLPOSAlert_V(const char *format, SInt32 err, va_list ap) { - vsprintf(errorbuf, format, ap); - CWAlert(parseopts.context, errorbuf, "Operating system error:", OS_GetErrText(err), NULL); -} - -char *CLPGetErrorString(SInt16 errid, char *buffer) { - getindstring(buffer, 12010, errid); - return buffer; -} - -void CLPReportError(SInt16 errid, ...) { - char format[256]; - va_list va; - - CLPGetErrorString(errid, format); - va_start(va, errid); - CLPReportError_V(format, va); - va_end(va); -} - -void CLPReportWarning(SInt16 errid, ...) { - char format[256]; - va_list va; - - CLPGetErrorString(errid, format); - va_start(va, errid); - CLPReportWarning_V(format, va); - va_end(va); -} - -void CLPReport(SInt16 errid, ...) { - char format[256]; - va_list va; - - CLPGetErrorString(errid, format); - va_start(va, errid); - CLPReport_V(format, va); - va_end(va); -} - -void CLPAlert(SInt16 errid, ...) { - char format[256]; - va_list va; - - CLPGetErrorString(errid, format); - va_start(va, errid); - CLPAlert_V(format, va); - va_end(va); -} - -void CLPOSAlert(SInt16 errid, SInt16 err, ...) { - char format[256]; - va_list va; - - CLPGetErrorString(errid, format); - va_start(va, err); - CLPOSAlert_V(format, err, va); - va_end(va); -} - -void CLPProgress(SInt16 errid, ...) { - char format[256]; - va_list va; - - CLPGetErrorString(errid, format); - va_start(va, errid); - CLPStatus_V(format, va); - va_end(va); -} - -void CLPStatus(SInt16 errid, ...) { - char format[256]; - va_list va; - - CLPGetErrorString(errid, format); - va_start(va, errid); - CLPStatus_V(format, va); - va_end(va); -} - -void CLPFatalError(const char *format, ...) { - va_list va; - - va_start(va, format); - CLPAlert_V(format, va); - va_end(va); - longjmp(exit_plugin, -123); -} |