Mercurial > jwe > octave
annotate libinterp/options.h @ 31170:06c76eca5f95 default tip @
maint: merge stable to default
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 29 Jul 2022 12:02:42 -0400 |
parents | 796f54d4ddbf |
children |
rev | line source |
---|---|
27928
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
2 // |
30569
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29954
diff
changeset
|
3 // Copyright (C) 1993-2022 The Octave Project Developers |
27928
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27924
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
17777
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
29903
dffd1c943f1a
main.cc: Use getopt to parse command line arguments (bug #60886).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29363
diff
changeset
|
26 #if ! defined (octave_options_h) |
dffd1c943f1a
main.cc: Use getopt to parse command line arguments (bug #60886).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29363
diff
changeset
|
27 #define octave_options_h 1 |
17777
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
29 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
20791
diff
changeset
|
30 |
17777
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 #include <iosfwd> |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 // This is here so that it's more likely that the usage message and |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 // the real set of options will agree. Note: the '+' must come first |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 // to prevent getopt from permuting arguments! |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 static const char *short_opts = "+HWVdfhip:qvx"; |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 // Long options. See the comments in getopt.h for the meanings of the |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 // fields in this structure. |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 #define BUILT_IN_DOCSTRINGS_FILE_OPTION 1 |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 #define DOC_CACHE_FILE_OPTION 2 |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
42 #define EVAL_OPTION 3 |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 #define EXEC_PATH_OPTION 4 |
29895
bc19d9360bac
main.cc: Use getopt to parse command line arguments (bug #60886).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29508
diff
changeset
|
44 #define EXPERIMENTAL_TERMINAL_WIDGET_OPTION 5 |
bc19d9360bac
main.cc: Use getopt to parse command line arguments (bug #60886).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29508
diff
changeset
|
45 #define GUI_OPTION 6 |
bc19d9360bac
main.cc: Use getopt to parse command line arguments (bug #60886).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29508
diff
changeset
|
46 #define IMAGE_PATH_OPTION 7 |
bc19d9360bac
main.cc: Use getopt to parse command line arguments (bug #60886).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29508
diff
changeset
|
47 #define INFO_FILE_OPTION 8 |
bc19d9360bac
main.cc: Use getopt to parse command line arguments (bug #60886).
Markus Mützel <markus.muetzel@gmx.de>
parents:
29508
diff
changeset
|
48 #define INFO_PROG_OPTION 9 |
29954
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
49 #define LINE_EDITING_OPTION 10 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
50 #define NO_GUI_OPTION 11 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
51 #define NO_GUI_LIBS_OPTION 12 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
52 #define NO_INIT_FILE_OPTION 13 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
53 #define NO_INIT_PATH_OPTION 14 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
54 #define NO_LINE_EDITING_OPTION 15 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
55 #define NO_SITE_FILE_OPTION 16 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
56 #define PERSIST_OPTION 17 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
57 #define SERVER_OPTION 18 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
58 #define TEXI_MACROS_FILE_OPTION 19 |
f254c302bb9c
remove JIT compiler from Octave sources
John W. Eaton <jwe@octave.org>
parents:
29904
diff
changeset
|
59 #define TRADITIONAL_OPTION 20 |
22064
bd4f3d2ce52f
provide wrapper for getopt
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
60 struct octave_getopt_options long_opts[] = |
19861
19755f4fc851
maint: Cleanup C++ code to follow Octave coding conventions.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
61 { |
29897
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
62 { "braindead", octave_no_arg, nullptr, TRADITIONAL_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
63 { "built-in-docstrings-file", octave_required_arg, nullptr, BUILT_IN_DOCSTRINGS_FILE_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
64 { "debug", octave_no_arg, nullptr, 'd' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
65 { "doc-cache-file", octave_required_arg, nullptr, DOC_CACHE_FILE_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
66 { "echo-commands", octave_no_arg, nullptr, 'x' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
67 { "eval", octave_required_arg, nullptr, EVAL_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
68 { "exec-path", octave_required_arg, nullptr, EXEC_PATH_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
69 { "experimental-terminal-widget", octave_no_arg, nullptr, EXPERIMENTAL_TERMINAL_WIDGET_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
70 { "force-gui", octave_no_arg, nullptr, GUI_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
71 { "gui", octave_no_arg, nullptr, GUI_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
72 { "help", octave_no_arg, nullptr, 'h' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
73 { "image-path", octave_required_arg, nullptr, IMAGE_PATH_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
74 { "info-file", octave_required_arg, nullptr, INFO_FILE_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
75 { "info-program", octave_required_arg, nullptr, INFO_PROG_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
76 { "interactive", octave_no_arg, nullptr, 'i' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
77 { "line-editing", octave_no_arg, nullptr, LINE_EDITING_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
78 { "no-gui", octave_no_arg, nullptr, NO_GUI_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
79 { "no-gui-libs", octave_no_arg, nullptr, NO_GUI_LIBS_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
80 { "no-history", octave_no_arg, nullptr, 'H' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
81 { "no-init-file", octave_no_arg, nullptr, NO_INIT_FILE_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
82 { "no-init-path", octave_no_arg, nullptr, NO_INIT_PATH_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
83 { "no-line-editing", octave_no_arg, nullptr, NO_LINE_EDITING_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
84 { "no-site-file", octave_no_arg, nullptr, NO_SITE_FILE_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
85 { "no-window-system", octave_no_arg, nullptr, 'W' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
86 { "norc", octave_no_arg, nullptr, 'f' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
87 { "path", octave_required_arg, nullptr, 'p' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
88 { "persist", octave_no_arg, nullptr, PERSIST_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
89 { "quiet", octave_no_arg, nullptr, 'q' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
90 { "server", octave_no_arg, nullptr, SERVER_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
91 { "silent", octave_no_arg, nullptr, 'q' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
92 { "texi-macros-file", octave_required_arg, nullptr, TEXI_MACROS_FILE_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
93 { "traditional", octave_no_arg, nullptr, TRADITIONAL_OPTION }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
94 { "verbose", octave_no_arg, nullptr, 'V' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
95 { "version", octave_no_arg, nullptr, 'v' }, |
474f41101569
options.h: Use C++ nullptr instead of 0.
Markus Mützel <markus.muetzel@gmx.de>
parents:
29895
diff
changeset
|
96 { nullptr, 0, nullptr, 0 } |
17777
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
97 }; |
ae8905fbf1f8
move usage and options strings and funtions to separate file
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
98 |
23796
4f12819a634f
Use C++11 nullptr rather than 0 in code (bug #51565).
Rik <rik@octave.org>
parents:
23220
diff
changeset
|
99 #endif |