Mercurial > hg > octave-lyh
changeset 793:f7b9920e968b
[project @ 1994-10-12 16:51:46 by jwe]
author | jwe |
---|---|
date | Wed, 12 Oct 1994 16:51:46 +0000 |
parents | ac49764105cf |
children | 01f6d1bcfa1a |
files | src/octave.cc |
diffstat | 1 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/octave.cc +++ b/src/octave.cc @@ -112,6 +112,9 @@ // If nonzero, don't do fancy line editing. int no_line_editing = 0; +// If nonzero, print verbose info in some cases. +int verbose_flag = 0; + // Command number, counting from the beginning of this session. int current_command_number = 1; @@ -157,13 +160,13 @@ // Usage message static const char *usage_string = - "octave [-?dfhiqvx] [-p path] [--debug] [--help] [--interactive]\n\ - [--info-file file] [--norc] [--path path] [--quiet] [--version]\n\ - [--echo-commands] [file]"; + "octave [-?Vdfhiqvx] [-p path] [--debug] [--help] [--interactive]\n\ + [--info-file file] [--norc] [--path path] [--quiet] [--verbose]\n\ + [--version] [--echo-commands] [file]"; // This is here so that it\'s more likely that the usage message and // the real set of options will agree. -static const char *short_opts = "?dfhip:qvx"; +static const char *short_opts = "?Vdfhip:qvx"; // Long options. #define INFO_FILE_OPTION 1 @@ -178,6 +181,7 @@ { "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 } @@ -291,7 +295,7 @@ if (verbose) { - cout << "Reading commands from " << s << " ... "; + cout << "reading commands from " << s << " ... "; reading_startup_message_printed = 1; cout.flush (); } @@ -315,7 +319,7 @@ unwind_protect_int (input_from_startup_file); input_from_startup_file = 1; - int verbose = ! inhibit_startup_message; + int verbose = (verbose_flag && ! inhibit_startup_message); // Execute commands from the site-wide configuration file. @@ -452,6 +456,10 @@ { switch (optc) { + case 'V': + verbose_flag++; + break; + case 'd': yydebug++; break;