Changeset 499224d for owl.c


Ignore:
Timestamp:
Apr 19, 2013, 3:22:54 AM (8 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master
Children:
478dc8e
Parents:
a223b6b
git-author:
Anders Kaseorg <andersk@mit.edu> (04/09/13 18:53:33)
git-committer:
Anders Kaseorg <andersk@mit.edu> (04/19/13 03:22:54)
Message:
barnowl --help: Write to stdout and exit successfully

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r4d9e311c r499224d  
    3434} owl_options;
    3535
    36 void usage(void)
     36void usage(FILE *file)
    3737{
    38   fprintf(stderr, "Barnowl version %s\n", OWL_VERSION_STRING);
    39   fprintf(stderr, "Usage: barnowl [-n] [-d] [-D] [-v] [-h] [-c <configfile>] [-s <confdir>] [-t <ttyname>]\n");
    40   fprintf(stderr, "  -n,--no-subs        don't load zephyr subscriptions\n");
    41   fprintf(stderr, "  -d,--debug          enable debugging\n");
    42   fprintf(stderr, "  -v,--version        print the Barnowl version number and exit\n");
    43   fprintf(stderr, "  -h,--help           print this help message\n");
    44   fprintf(stderr, "  -s,--config-dir     specify an alternate config dir (default ~/.owl)\n");
    45   fprintf(stderr, "  -c,--config-file    specify an alternate config file (default ~/.owl/init.pl)\n");
    46   fprintf(stderr, "  -t,--tty            set the tty name\n");
     38  fprintf(file, "Barnowl version %s\n", OWL_VERSION_STRING);
     39  fprintf(file, "Usage: barnowl [-n] [-d] [-D] [-v] [-h] [-c <configfile>] [-s <confdir>] [-t <ttyname>]\n");
     40  fprintf(file, "  -n,--no-subs        don't load zephyr subscriptions\n");
     41  fprintf(file, "  -d,--debug          enable debugging\n");
     42  fprintf(file, "  -v,--version        print the Barnowl version number and exit\n");
     43  fprintf(file, "  -h,--help           print this help message\n");
     44  fprintf(file, "  -s,--config-dir     specify an alternate config dir (default ~/.owl)\n");
     45  fprintf(file, "  -c,--config-file    specify an alternate config file (default ~/.owl/init.pl)\n");
     46  fprintf(file, "  -t,--tty            set the tty name\n");
    4747}
    4848
     
    8383      exit(0);
    8484    case 'h':
     85      usage(stdout);
     86      exit(0);
    8587    default:
    86       usage();
     88      usage(stderr);
    8789      exit(1);
    8890    }
Note: See TracChangeset for help on using the changeset viewer.