Mercurial > octave
comparison src/octave.cc @ 9335:f2d354df53ee
new option, --no-window-system
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 11 Jun 2009 14:20:36 -0400 |
parents | 9b87aeb24ea9 |
children | 98c6b3aa0b7b |
comparison
equal
deleted
inserted
replaced
9334:4f96a7770492 | 9335:f2d354df53ee |
---|---|
52 #include "str-vec.h" | 52 #include "str-vec.h" |
53 | 53 |
54 #include <defaults.h> | 54 #include <defaults.h> |
55 #include "Cell.h" | 55 #include "Cell.h" |
56 #include "defun.h" | 56 #include "defun.h" |
57 #include "display.h" | |
57 #include "error.h" | 58 #include "error.h" |
58 #include "file-io.h" | 59 #include "file-io.h" |
59 #include "input.h" | 60 #include "input.h" |
60 #include "lex.h" | 61 #include "lex.h" |
61 #include "load-path.h" | 62 #include "load-path.h" |
125 // Usage message | 126 // Usage message |
126 static const char *usage_string = | 127 static const char *usage_string = |
127 "octave [-?HVdfhiqvx] [--debug] [--echo-commands] [--eval CODE]\n\ | 128 "octave [-?HVdfhiqvx] [--debug] [--echo-commands] [--eval CODE]\n\ |
128 [--exec-path path] [--help] [--image-path path] [--info-file file]\n\ | 129 [--exec-path path] [--help] [--image-path path] [--info-file file]\n\ |
129 [--info-program prog] [--interactive] [--line-editing] [--no-history] [--no-init-file]\n\ | 130 [--info-program prog] [--interactive] [--line-editing] [--no-history] [--no-init-file]\n\ |
130 [--no-line-editing] [--no-site-file] [--no-init-path] [-p path]\n\ | 131 [--no-line-editing] [--no-site-file] [--no-init-path] [--no-window-system] [-p path]\n\ |
131 [--path path] [--silent] [--traditional] [--verbose] [--version] [file]"; | 132 [--path path] [--silent] [--traditional] [--verbose] [--version] [file]"; |
132 | 133 |
133 // This is here so that it's more likely that the usage message and | 134 // This is here so that it's more likely that the usage message and |
134 // the real set of options will agree. Note: the `+' must come first | 135 // the real set of options will agree. Note: the `+' must come first |
135 // to prevent getopt from permuting arguments! | 136 // to prevent getopt from permuting arguments! |
154 #define NO_SITE_FILE_OPTION 9 | 155 #define NO_SITE_FILE_OPTION 9 |
155 #define NO_INIT_PATH_OPTION 10 | 156 #define NO_INIT_PATH_OPTION 10 |
156 #define PERSIST_OPTION 11 | 157 #define PERSIST_OPTION 11 |
157 #define TRADITIONAL_OPTION 12 | 158 #define TRADITIONAL_OPTION 12 |
158 #define LINE_EDITING_OPTION 13 | 159 #define LINE_EDITING_OPTION 13 |
160 #define NO_WINDOW_SYSTEM_OPTION 14 | |
159 long_options long_opts[] = | 161 long_options long_opts[] = |
160 { | 162 { |
161 { "debug", prog_args::no_arg, 0, 'd' }, | 163 { "debug", prog_args::no_arg, 0, 'd' }, |
162 { "braindead", prog_args::no_arg, 0, TRADITIONAL_OPTION }, | 164 { "braindead", prog_args::no_arg, 0, TRADITIONAL_OPTION }, |
163 { "doc-cache-file", prog_args::required_arg, 0, DOC_CACHE_FILE_OPTION }, | 165 { "doc-cache-file", prog_args::required_arg, 0, DOC_CACHE_FILE_OPTION }, |
173 { "no-history", prog_args::no_arg, 0, 'H' }, | 175 { "no-history", prog_args::no_arg, 0, 'H' }, |
174 { "no-init-file", prog_args::no_arg, 0, NO_INIT_FILE_OPTION }, | 176 { "no-init-file", prog_args::no_arg, 0, NO_INIT_FILE_OPTION }, |
175 { "no-line-editing", prog_args::no_arg, 0, NO_LINE_EDITING_OPTION }, | 177 { "no-line-editing", prog_args::no_arg, 0, NO_LINE_EDITING_OPTION }, |
176 { "no-site-file", prog_args::no_arg, 0, NO_SITE_FILE_OPTION }, | 178 { "no-site-file", prog_args::no_arg, 0, NO_SITE_FILE_OPTION }, |
177 { "no-init-path", prog_args::no_arg, 0, NO_INIT_PATH_OPTION }, | 179 { "no-init-path", prog_args::no_arg, 0, NO_INIT_PATH_OPTION }, |
180 { "no-window-system", prog_args::no_arg, 0, NO_WINDOW_SYSTEM_OPTION }, | |
178 { "norc", prog_args::no_arg, 0, 'f' }, | 181 { "norc", prog_args::no_arg, 0, 'f' }, |
179 { "path", prog_args::required_arg, 0, 'p' }, | 182 { "path", prog_args::required_arg, 0, 'p' }, |
180 { "persist", prog_args::no_arg, 0, PERSIST_OPTION }, | 183 { "persist", prog_args::no_arg, 0, PERSIST_OPTION }, |
181 { "quiet", prog_args::no_arg, 0, 'q' }, | 184 { "quiet", prog_args::no_arg, 0, 'q' }, |
182 { "silent", prog_args::no_arg, 0, 'q' }, | 185 { "silent", prog_args::no_arg, 0, 'q' }, |
510 --no-history, -H Don't save commands to the history list\n\ | 513 --no-history, -H Don't save commands to the history list\n\ |
511 --no-init-file Don't read the ~/.octaverc or .octaverc files.\n\ | 514 --no-init-file Don't read the ~/.octaverc or .octaverc files.\n\ |
512 --no-init-path Don't initialize function search path.\n\ | 515 --no-init-path Don't initialize function search path.\n\ |
513 --no-line-editing Don't use readline for command-line editing.\n\ | 516 --no-line-editing Don't use readline for command-line editing.\n\ |
514 --no-site-file Don't read the site-wide octaverc file.\n\ | 517 --no-site-file Don't read the site-wide octaverc file.\n\ |
518 --no-window-system Disable window system, including graphics.\n\ | |
515 --norc, -f Don't read any initialization files.\n\ | 519 --norc, -f Don't read any initialization files.\n\ |
516 --path PATH, -p PATH Add PATH to head of function search path.\n\ | 520 --path PATH, -p PATH Add PATH to head of function search path.\n\ |
517 --persist Go interactive after --eval or reading from FILE.\n\ | 521 --persist Go interactive after --eval or reading from FILE.\n\ |
518 --silent, -q Don't print message at startup.\n\ | 522 --silent, -q Don't print message at startup.\n\ |
519 --traditional Set variables for closer MATLAB compatibility.\n\ | 523 --traditional Set variables for closer MATLAB compatibility.\n\ |
751 read_site_files = 0; | 755 read_site_files = 0; |
752 break; | 756 break; |
753 | 757 |
754 case NO_INIT_PATH_OPTION: | 758 case NO_INIT_PATH_OPTION: |
755 set_initial_path = false; | 759 set_initial_path = false; |
760 break; | |
761 | |
762 case NO_WINDOW_SYSTEM_OPTION: | |
763 display_info::no_window_system (); | |
756 break; | 764 break; |
757 | 765 |
758 case TRADITIONAL_OPTION: | 766 case TRADITIONAL_OPTION: |
759 traditional = true; | 767 traditional = true; |
760 break; | 768 break; |