comparison libcore/core/panic.c @ 241:76afe639fd72

misc: add support for NLS, closes #22510 @4h While here cleanup the path functions in sys.c/sys.h
author David Demelier <markand@malikania.fr>
date Sat, 28 Nov 2020 18:00:05 +0100
parents e71039d820a7
children
comparison
equal deleted inserted replaced
240:d7e5e02f70a1 241:76afe639fd72
18 18
19 #include <assert.h> 19 #include <assert.h>
20 #include <stdio.h> 20 #include <stdio.h>
21 #include <stdlib.h> 21 #include <stdlib.h>
22 22
23 #include "core_p.h"
23 #include "error.h" 24 #include "error.h"
24 #include "panic.h" 25 #include "panic.h"
25 26
26 static void 27 static void
27 terminate(void) 28 terminate(void)
28 { 29 {
29 fprintf(stderr, "abort: %s\n", error()); 30 fprintf(stderr, _("abort: %s\n"), error());
30 abort(); 31 abort();
31 exit(1); 32 exit(1);
32 } 33 }
33 34
34 void (*panic_handler)(void) = terminate; 35 void (*panic_handler)(void) = terminate;
70 71
71 /* 72 /*
72 * This should not happen, if it does it means the user did not fully 73 * This should not happen, if it does it means the user did not fully
73 * satisfied the constraint of panic_handler. 74 * satisfied the constraint of panic_handler.
74 */ 75 */
75 fprintf(stderr, "abort: panic handler returned"); 76 fprintf(stderr, _("abort: panic handler returned\n"));
76 exit(1); 77 exit(1);
77 } 78 }