$NetBSD: patch-ba,v 1.2 2002/05/20 18:19:41 cjep Exp $ --- fishmon.c.orig Sat Jan 19 05:37:10 2002 +++ fishmon.c Sat Jan 19 05:42:15 2002 @@ -1017,6 +1017,8 @@ static void parse_options(int argc, char **argv) { static int ch = 0; + +#if 0 static struct option long_opts[] = { { "h", no_argument, NULL, 1 }, { "help", no_argument, NULL, 1 }, @@ -1041,15 +1043,43 @@ break; } } +#else + extern char *optarg; + extern int optind; + extern int optopt; + extern int opterr; + extern int optreset; + + while((ch = getopt(argc, argv, "bchv")) != -1) + { + switch(ch) + { + case 'b': + broken_wm = 1; + break; + case 'c': + enable_check_mail = 1; + break; + case 'v': + do_version(); + exit(0); + case 'h': + default: + do_help(); + exit(1); + } + } + +#endif } static void do_help(void) { printf("Usage: wmfishtime [options]\n\n" - " -h\t--help\t\tshow this message and exit\n" - " -v\t--version\tshow version and exit\n" - " -c\t--check-mail\tenables check for new mail\n" - " -b\t--broken\tactivates broken window manager fix\n\n" + " -h\tshow this message and exit\n" + " -v\tshow version and exit\n" + " -c\tenables check for new mail\n" + " -b\tactivates broken window manager fix\n\n" "Yet Another Waste of CPU Cycles! Dock app clock with\n" "shy fish, bubbles and mail check functionality (disabled by default).\n" "Try out the man page wmfishtime (1x).\n");