Author | Jamozed <[email protected]> |
Date | 2020-08-13 12:55:37 |
Commit | 2dce45fcec9db134b0fcc9b4adc25aa467b2b065 |
Parent | 068c8fb6c7bfc41f7bc362e1bcbf1a0a47008aaa |
lib: Update error files to version 1.0.1
Diffstat
M | src/lib/error.c | | | 7 | ++----- |
M | src/lib/error.h | | | 7 | ++----- |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/error.c b/src/lib/error.c index 00f0f21..f246723 100644 --- a/src/lib/error.c +++ b/src/lib/error.c @@ -1,4 +1,4 @@ -// error.c +// error.c, version 1.0.1 // Error source file for OMKOV lib // Copyright (C) 2020, Jakob Wakeling // All rights reserved. @@ -6,9 +6,6 @@ /* OMKOV Permissive Licence, version 1.0 -Copyright (C) 2020, Jakob Wakeling -All rights reserved. - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to @@ -43,7 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. char *A0 = NULL; -void error(int status, const char *format, ...) { +_Noreturn void error(int status, const char *format, ...) { fflush(stdout); if (A0) { fputs(A0, stderr); fputs(": ", stderr); } va_list ap; va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); fputc('\n', stderr); exit(status); diff --git a/src/lib/error.h b/src/lib/error.h index 13b59b1..d0d4585 100644 --- a/src/lib/error.h +++ b/src/lib/error.h @@ -1,4 +1,4 @@ -// error.h +// error.h, version 1.0.1 // Error header file for OMKOV lib // Copyright (C) 2020, Jakob Wakeling // All rights reserved. @@ -6,9 +6,6 @@ /* OMKOV Permissive Licence, version 1.0 -Copyright (C) 2020, Jakob Wakeling -All rights reserved. - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to @@ -38,7 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. extern char *A0; -extern void error(int status, const char *format, ...); +extern _Noreturn void error(int status, const char *format, ...); extern void warn(const char *format, ...); extern char *serr(void);