diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-01-26 11:30:47 +0000 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-01-26 11:30:47 +0000 |
commit | 094b96ca1df4a035b5f93c351f773306c0241f3f (patch) | |
tree | 95ce05e3ebe816c7ee7996206bb37ea17d8ca33c /compiler_and_linker/unsorted/PPCError.c | |
parent | fc0c4c0df7b583b55a08317cf1ef6a71d27c0440 (diff) | |
download | MWCC-main.tar.gz MWCC-main.zip |
move lots of source files around to match their actual placement in the original treemain
Diffstat (limited to 'compiler_and_linker/unsorted/PPCError.c')
-rw-r--r-- | compiler_and_linker/unsorted/PPCError.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/compiler_and_linker/unsorted/PPCError.c b/compiler_and_linker/unsorted/PPCError.c deleted file mode 100644 index 2d4c469..0000000 --- a/compiler_and_linker/unsorted/PPCError.c +++ /dev/null @@ -1,70 +0,0 @@ -#include "compiler/PPCError.h" -#include "compiler/CError.h" -#include "compiler/CParser.h" -#include "compiler/InlineAsm.h" -#include "cos.h" - -static void PPCError_GetErrorString(char *str, short code) { - short scode; - - scode = (short) code; - CError_ASSERT(40, scode >= 100 && scode < PPCErrorStrMAX); - - COS_GetString(str, 10001, scode - 99); -} - -static void PPCError_VAErrorMessage(int code, va_list list, Boolean flag1, Boolean flag2) { - char format[256]; - PPCError_GetErrorString(format, code); - CError_ErrorMessageVA(code + 10001, format, list, flag1, flag2); -} - -void PPCError_Error(int code, ...) { - va_list list; - - if (trychain) - longjmp(trychain->jmpbuf, 1); - - va_start(list, code); - PPCError_VAErrorMessage(code, list, 0, 0); - va_end(list); - - if (in_assembler) - AssemblerError(); -} - -void PPCError_Warning(int code, ...) { - va_list list; - - if (!trychain) { - va_start(list, code); - PPCError_VAErrorMessage(code, list, 0, 1); - va_end(list); - } -} - -void PPCError_Message(char *format, ...) { - va_list list; - - if (!trychain) { - va_start(list, format); - CError_ErrorMessageVA(10213, format, list, 0, 1); - va_end(list); - } -} - -void PPCError_ErrorTerm(short code, ...) { - va_list list; - - if (trychain) - longjmp(trychain->jmpbuf, 1); - - va_start(list, code); - PPCError_VAErrorMessage(code, list, 1, 0); - va_end(list); - - if (in_assembler) - AssemblerError(); - - longjmp(errorreturn, 1); -} |