prefix eprint() with awesome:

This commit is contained in:
Julien Danjou 2007-12-13 15:20:42 +01:00
parent 11effcd7af
commit 6241354fec
3 changed files with 7 additions and 6 deletions

View File

@ -229,7 +229,7 @@ setup_screen(awesome_config *awesomeconf, int screen)
static int __attribute__ ((noreturn)) static int __attribute__ ((noreturn))
xerrorstart(Display * disp __attribute__ ((unused)), XErrorEvent * ee __attribute__ ((unused))) xerrorstart(Display * disp __attribute__ ((unused)), XErrorEvent * ee __attribute__ ((unused)))
{ {
eprint("awesome: another window manager is already running\n"); eprint("another window manager is already running\n");
} }
/** Quit awesome /** Quit awesome
@ -302,17 +302,17 @@ main(int argc, char *argv[])
if(a_strlen(argv[2])) if(a_strlen(argv[2]))
confpath = argv[2]; confpath = argv[2];
else else
eprint("awesome: -c require a file\n"); eprint("-c require a file\n");
} }
else else
eprint("usage: awesome [-v | -c configfile]\n"); eprint("options: [-v | -c configfile]\n");
} }
/* Tag won't be printed otherwised */ /* Tag won't be printed otherwised */
setlocale(LC_CTYPE, ""); setlocale(LC_CTYPE, "");
if(!(dpy = XOpenDisplay(NULL))) if(!(dpy = XOpenDisplay(NULL)))
eprint("awesome: cannot open display\n"); eprint("cannot open display\n");
xfd = ConnectionNumber(dpy); xfd = ConnectionNumber(dpy);

View File

@ -495,7 +495,7 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf)
} }
if(!awesomeconf->screens[screen].nlayouts) if(!awesomeconf->screens[screen].nlayouts)
eprint("awesome: fatal: no default layout available\n"); eprint("fatal: no default layout available\n");
/* Tags */ /* Tags */
awesomeconf->screens[screen].ntags = cfg_size(cfg_tags, "tag"); awesomeconf->screens[screen].ntags = cfg_size(cfg_tags, "tag");
@ -519,7 +519,7 @@ parse_config(const char *confpatharg, awesome_config *awesomeconf)
} }
if(!awesomeconf->screens[screen].ntags) if(!awesomeconf->screens[screen].ntags)
eprint("awesome: fatal: no tags found in configuration file\n"); eprint("fatal: no tags found in configuration file\n");
/* select first tag by default */ /* select first tag by default */
awesomeconf->screens[screen].tags[0].selected = True; awesomeconf->screens[screen].tags[0].selected = True;

1
util.c
View File

@ -45,6 +45,7 @@ eprint(const char *fmt, ...)
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
fprintf(stderr, "awesome: ");
vfprintf(stderr, fmt, ap); vfprintf(stderr, fmt, ap);
va_end(ap); va_end(ap);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);