# HG changeset patch # User tuomov # Date 1050476974 -7200 # Node ID 0228b3741a4294d142feaf3a795694ce29599d97 # Parent 2d95d77aa9545630baf0165df025a434b56d8a05 trunk: changeset 56 set_warn_handler returns default_warn_handler instead of NULL when no other warn handlers are set. diff -r 2d95d77aa954 -r 0228b3741a42 output.c --- a/output.c Sat Apr 05 22:32:55 2003 +0200 +++ b/output.c Wed Apr 16 09:09:34 2003 +0200 @@ -20,13 +20,13 @@ #endif -/* verbose - */ +static void default_warn_handler(const char *message); + static bool verbose_mode=FALSE; static int verbose_indent_lvl=0; static bool progname_enable=TRUE; -static WarnHandler *current_warn_handler=NULL; +static WarnHandler *current_warn_handler=default_warn_handler; #define INDENTATOR_LENGTH 4 @@ -387,6 +387,6 @@ WarnHandler *set_warn_handler(WarnHandler *handler) { WarnHandler *old=current_warn_handler; - current_warn_handler=handler; + current_warn_handler=(handler!=NULL ? handler : default_warn_handler); return old; }