From 35d488e972a9dd75ce3867c000405f128b79c615 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sun, 15 Jan 2023 12:14:05 +0000 Subject: reorganise things a bit to align further with the actual names/structure --- unsorted/ParserErrors.c | 119 ------------------------------------------------ 1 file changed, 119 deletions(-) delete mode 100644 unsorted/ParserErrors.c (limited to 'unsorted/ParserErrors.c') 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); -} -- cgit v1.2.3