Use warn function throughout project.

This commit is contained in:
Aldo Cortesi 2007-12-13 12:40:45 +11:00 committed by Julien Danjou
parent 64117935c8
commit c7a4a54b47
3 changed files with 5 additions and 7 deletions

View File

@ -264,9 +264,7 @@ xerror(Display * edpy, XErrorEvent * ee)
&& ee->error_code == BadAccess) && ee->error_code == BadAccess)
|| (ee->request_code == X_CopyArea && ee->error_code == BadDrawable)) || (ee->request_code == X_CopyArea && ee->error_code == BadDrawable))
return 0; return 0;
fprintf(stderr, "awesome: fatal error: request code=%d, error code=%d\n", warn("fatal error: request code=%d, error code=%d\n", ee->request_code, ee->error_code);
ee->request_code, ee->error_code);
return xerrorxlib(edpy, ee); /* may call exit */ return xerrorxlib(edpy, ee); /* may call exit */
} }

View File

@ -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->button = mouse_button_lookup(cfg_getstr(cfgsectmp, "button"));
b->func = name_func_lookup(cfg_getstr(cfgsectmp, "command"), UicbList); b->func = name_func_lookup(cfg_getstr(cfgsectmp, "command"), UicbList);
if(!b->func) 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) if(handle_arg)
b->arg = a_strdup(cfg_getstr(cfgsectmp, "arg")); b->arg = a_strdup(cfg_getstr(cfgsectmp, "arg"));
else else
@ -344,7 +344,7 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf)
if(!cfg_screen) 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_parse_buf(cfg, AWESOME_DEFAULT_CONFIG);
cfg_screen = cfg_getsec(cfg, "screen"); 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); awesomeconf->screens[screen].layouts[i].arrange = name_func_lookup(cfg_title(cfgsectmp), LayoutsList);
if(!awesomeconf->screens[screen].layouts[i].arrange) 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; awesomeconf->screens[screen].layouts[i].symbol = NULL;
continue; continue;
} }

View File

@ -52,7 +52,7 @@ uicb_spawn(awesome_config * awesomeconf,
close(ConnectionNumber(awesomeconf->display)); close(ConnectionNumber(awesomeconf->display));
setsid(); setsid();
execl(shell, shell, "-c", arg, (char *) NULL); 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"); perror(" failed");
} }
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);