- Timestamp:
- Sep 14, 2009, 9:17:49 AM (15 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 4e4847c
- Parents:
- 799f36c
- git-author:
- Nelson Elhage <nelhage@mit.edu> (09/13/09 20:18:06)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (09/14/09 09:17:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
owl.c
r799f36c rf350fc3 9 9 #include <stdio.h> 10 10 #include <unistd.h> 11 #include <getopt.h> 11 12 #include <stdlib.h> 12 13 #include <string.h> … … 47 48 /* TODO: free owl_options after init is done? */ 48 49 void owl_parse_options(int argc, char *argv[], owl_options *opts) /* noproto */ { 50 static const struct option long_options[] = { 51 { "no-subs", 0, 0, 'n' }, 52 { "config-file", 1, 0, 'c' }, 53 { "config-dir", 1, 0, 's' }, 54 { "tty", 1, 0, 't' }, 55 { "debug", 0, 0, 'd' }, 56 { "remove-debug", 0, 0, 'D' }, 57 { "version", 0, 0, 'v' }, 58 { "help", 0, 0, 'h' }, 59 { NULL, 0, NULL, 0} 60 }; 49 61 char c; 50 62 51 while((c = getopt(argc, argv, "nc:t:s:dDvh")) != -1) { 63 while((c = getopt_long(argc, argv, "nc:t:s:dDvh", 64 long_options, NULL)) != -1) { 52 65 switch(c) { 53 66 case 'n': … … 650 663 fprintf(stderr, "Barnowl version %s\n", OWL_VERSION_STRING); 651 664 fprintf(stderr, "Usage: barnowl [-n] [-d] [-D] [-v] [-h] [-c <configfile>] [-s <confdir>] [-t <ttyname>]\n"); 652 fprintf(stderr, " -n don't load zephyr subscriptions\n");653 fprintf(stderr, " -d enable debugging\n");654 fprintf(stderr, " -D 655 fprintf(stderr, " -v print the Barnowl version number and exit\n");656 fprintf(stderr, " -h print this help message\n");657 fprintf(stderr, " -c 658 fprintf(stderr, " -s 659 fprintf(stderr, " -t set the tty name\n");665 fprintf(stderr, " -n,--no-subs don't load zephyr subscriptions\n"); 666 fprintf(stderr, " -d,--debug enable debugging\n"); 667 fprintf(stderr, " -D,--remove-debug enable debugging and delete previous debug file\n"); 668 fprintf(stderr, " -v,--version print the Barnowl version number and exit\n"); 669 fprintf(stderr, " -h,--help print this help message\n"); 670 fprintf(stderr, " -c,--config-file specify an alternate config file\n"); 671 fprintf(stderr, " -s,--config-dir specify an alternate config dir (default ~/.owl)\n"); 672 fprintf(stderr, " -t,--tty set the tty name\n"); 660 673 } 661 674
Note: See TracChangeset
for help on using the changeset viewer.