Mercurial > audlegacy
changeset 2412:f0d65a33bf64 trunk
[svn] - handle unknown options
author | nenolod |
---|---|
date | Fri, 26 Jan 2007 07:37:53 -0800 |
parents | ffbac11b3a77 |
children | 86777d94dc7a |
files | ChangeLog src/audacious/main.c |
diffstat | 2 files changed, 20 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Jan 26 07:32:55 2007 -0800 +++ b/ChangeLog Fri Jan 26 07:37:53 2007 -0800 @@ -1,3 +1,16 @@ +2007-01-26 15:32:55 +0000 William Pitcock <nenolod@sacredspiral.co.uk> + revision [3832] + - use GOption instead of getopt. + - remove nolonger used GNU getopt code + + trunk/src/audacious/Makefile | 2 + trunk/src/audacious/getopt.c | 961 ------------------------------------------ + trunk/src/audacious/getopt.h | 132 ----- + trunk/src/audacious/getopt1.c | 183 ------- + trunk/src/audacious/main.c | 256 ++--------- + 5 files changed, 62 insertions(+), 1472 deletions(-) + + 2007-01-26 06:33:00 +0000 William Pitcock <nenolod@sacredspiral.co.uk> revision [3830] - remove gcc-specific CFLAGs
--- a/src/audacious/main.c Fri Jan 26 07:32:55 2007 -0800 +++ b/src/audacious/main.c Fri Jan 26 07:37:53 2007 -0800 @@ -1032,12 +1032,18 @@ g_option_context_add_group(context, gtk_get_option_group(TRUE)); g_option_context_parse(context, &argc, &argv, &error); + if (error != NULL) + { + g_printerr(_("%s: %s\nTry `%s --help' for more information.\n"), argv[0], error->message, argv[0]); + exit(EXIT_FAILURE); + } + if (!gtk_init_check_ok) { if (argc < 2) { /* GTK check failed, and no arguments passed to indicate that user is intending to only remote control a running session */ - g_printerr(_("audacious: Unable to open display, exiting.\n")); + g_printerr(_("%s: Unable to open display, exiting.\n"), argv[0]); exit(EXIT_FAILURE); }