Mercurial > hg > octave-lyh
diff src/octave.cc @ 1103:a6f341c1b47c
[project @ 1995-02-14 21:43:55 by jwe]
author | jwe |
---|---|
date | Tue, 14 Feb 1995 21:43:55 +0000 |
parents | d3790919922e |
children | 3535aa4d38c6 |
line wrap: on
line diff
--- a/src/octave.cc +++ b/src/octave.cc @@ -169,23 +169,24 @@ // the real set of options will agree. static const char *short_opts = "?Vdfhip:qvx"; -// Long options. +// Long options. See the comments in getopt.h for the meanings of the +// fields in this structure. #define INFO_FILE_OPTION 1 static struct option long_opts[] = { - { "debug", 0, 0, 'd' }, - { "help", 0, 0, 'h' }, - { "interactive", 0, 0, 'i' }, - { "info-file", 1, 0, INFO_FILE_OPTION }, - { "norc", 0, 0, 'f' }, - { "ignore-init-file", 0, 0, 'f' }, - { "path", 1, 0, 'p' }, - { "quiet", 0, 0, 'q' }, - { "silent", 0, 0, 'q' }, - { "verbose", 0, 0, 'V' }, - { "version", 0, 0, 'v' }, - { "echo-commands", 0, 0, 'x' }, - { 0, 0, 0, 0 } + { "debug", no_argument, 0, 'd' }, + { "help", no_argument, 0, 'h' }, + { "interactive", no_argument, 0, 'i' }, + { "info-file", required_argument, 0, INFO_FILE_OPTION }, + { "norc", no_argument, 0, 'f' }, + { "ignore-init-file", no_argument, 0, 'f' }, + { "path", required_argument, 0, 'p' }, + { "quiet", no_argument, 0, 'q' }, + { "silent", no_argument, 0, 'q' }, + { "verbose", no_argument, 0, 'V' }, + { "version", no_argument, 0, 'v' }, + { "echo-commands", no_argument, 0, 'x' }, + { 0, 0, 0, 0 } }; // Initialize some global variables for later use. @@ -314,6 +315,8 @@ parse_and_execute (f, print); + fclose (f); + if (verbose) cout << "done." << endl; }