From c7a4a54b47e72d5b208af301f20410d2696661c2 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 13 Dec 2007 12:40:45 +1100 Subject: [PATCH] Use warn function throughout project. --- awesome.c | 4 +--- config.c | 6 +++--- xutil.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/awesome.c b/awesome.c index be083720..07aaa460 100644 --- a/awesome.c +++ b/awesome.c @@ -264,9 +264,7 @@ xerror(Display * edpy, XErrorEvent * ee) && ee->error_code == BadAccess) || (ee->request_code == X_CopyArea && ee->error_code == BadDrawable)) return 0; - fprintf(stderr, "awesome: fatal error: request code=%d, error code=%d\n", - ee->request_code, ee->error_code); - + warn("fatal error: request code=%d, error code=%d\n", ee->request_code, ee->error_code); return xerrorxlib(edpy, ee); /* may call exit */ } diff --git a/config.c b/config.c index c6ecba44..608aa6b9 100644 --- a/config.c +++ b/config.c @@ -145,7 +145,7 @@ parse_mouse_bindings(cfg_t * cfg, const char *secname, Bool handle_arg) b->button = mouse_button_lookup(cfg_getstr(cfgsectmp, "button")); b->func = name_func_lookup(cfg_getstr(cfgsectmp, "command"), UicbList); if(!b->func) - fprintf(stderr, "awesome: unknown command %s\n", cfg_getstr(cfgsectmp, "command")); + warn("unknown command %s\n", cfg_getstr(cfgsectmp, "command")); if(handle_arg) b->arg = a_strdup(cfg_getstr(cfgsectmp, "arg")); else @@ -344,7 +344,7 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf) if(!cfg_screen) { - fprintf(stderr, "awesome: parsing configuration file failed, no screen section found"); + warn("parsing configuration file failed, no screen section found"); cfg_parse_buf(cfg, AWESOME_DEFAULT_CONFIG); cfg_screen = cfg_getsec(cfg, "screen"); } @@ -403,7 +403,7 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf) awesomeconf->screens[screen].layouts[i].arrange = name_func_lookup(cfg_title(cfgsectmp), LayoutsList); if(!awesomeconf->screens[screen].layouts[i].arrange) { - fprintf(stderr, "awesome: unknown layout %s in configuration file\n", cfg_title(cfgsectmp)); + warn("unknown layout %s in configuration file\n", cfg_title(cfgsectmp)); awesomeconf->screens[screen].layouts[i].symbol = NULL; continue; } diff --git a/xutil.c b/xutil.c index 57fda4a5..aea58016 100644 --- a/xutil.c +++ b/xutil.c @@ -52,7 +52,7 @@ uicb_spawn(awesome_config * awesomeconf, close(ConnectionNumber(awesomeconf->display)); setsid(); execl(shell, shell, "-c", arg, (char *) NULL); - fprintf(stderr, "awesome: execl '%s -c %s'", shell, arg); + warn("execl '%s -c %s'", shell, arg); perror(" failed"); } exit(EXIT_SUCCESS);