From: ian Date: Wed, 5 Jul 2006 21:25:46 +0000 (+0000) Subject: finish logging and safety_panic X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=429f724d10ad441a12fb7dd13f23038cb0582b5c;p=trains.git finish logging and safety_panic --- diff --git a/hostside/common.h b/hostside/common.h index 008d219..83754b3 100644 --- a/hostside/common.h +++ b/hostside/common.h @@ -93,6 +93,8 @@ void diee(const char *fmt, ...) __attribute__((noreturn,format(printf,1,2))); void diem(void) __attribute__((noreturn)); void die_hook(void); +void die_vprintf_hook(const char *fmt, va_list al) + __attribute__((format(printf,1,0))); void *mmalloc(size_t sz); char *mstrdupl(const char *s, int l); diff --git a/hostside/errorcodes.h.gen b/hostside/errorcodes.h.gen index f624b0e..a3093dc 100755 --- a/hostside/errorcodes.h.gen +++ b/hostside/errorcodes.h.gen @@ -1,10 +1,31 @@ #!/usr/bin/perl -print "typedef enum {\n" or die $!; -foreach $f (qw( - OK - Safety - )) { - $_= $f; s/\-//g; - printf " EC_%s,\n", $_; -} -print "} ErrorCode;\n" or die $!; + +@f= qw( + OK + Safety + ); + + + +$decl= "const char *const errorcodelist[]"; + +print <