comparison 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
comparison
equal deleted inserted replaced
1102:954cfe6fa85d 1103:a6f341c1b47c
167 167
168 // This is here so that it\'s more likely that the usage message and 168 // This is here so that it\'s more likely that the usage message and
169 // the real set of options will agree. 169 // the real set of options will agree.
170 static const char *short_opts = "?Vdfhip:qvx"; 170 static const char *short_opts = "?Vdfhip:qvx";
171 171
172 // Long options. 172 // Long options. See the comments in getopt.h for the meanings of the
173 // fields in this structure.
173 #define INFO_FILE_OPTION 1 174 #define INFO_FILE_OPTION 1
174 static struct option long_opts[] = 175 static struct option long_opts[] =
175 { 176 {
176 { "debug", 0, 0, 'd' }, 177 { "debug", no_argument, 0, 'd' },
177 { "help", 0, 0, 'h' }, 178 { "help", no_argument, 0, 'h' },
178 { "interactive", 0, 0, 'i' }, 179 { "interactive", no_argument, 0, 'i' },
179 { "info-file", 1, 0, INFO_FILE_OPTION }, 180 { "info-file", required_argument, 0, INFO_FILE_OPTION },
180 { "norc", 0, 0, 'f' }, 181 { "norc", no_argument, 0, 'f' },
181 { "ignore-init-file", 0, 0, 'f' }, 182 { "ignore-init-file", no_argument, 0, 'f' },
182 { "path", 1, 0, 'p' }, 183 { "path", required_argument, 0, 'p' },
183 { "quiet", 0, 0, 'q' }, 184 { "quiet", no_argument, 0, 'q' },
184 { "silent", 0, 0, 'q' }, 185 { "silent", no_argument, 0, 'q' },
185 { "verbose", 0, 0, 'V' }, 186 { "verbose", no_argument, 0, 'V' },
186 { "version", 0, 0, 'v' }, 187 { "version", no_argument, 0, 'v' },
187 { "echo-commands", 0, 0, 'x' }, 188 { "echo-commands", no_argument, 0, 'x' },
188 { 0, 0, 0, 0 } 189 { 0, 0, 0, 0 }
189 }; 190 };
190 191
191 // Initialize some global variables for later use. 192 // Initialize some global variables for later use.
192 193
193 static void 194 static void
311 reading_startup_message_printed = 1; 312 reading_startup_message_printed = 1;
312 cout.flush (); 313 cout.flush ();
313 } 314 }
314 315
315 parse_and_execute (f, print); 316 parse_and_execute (f, print);
317
318 fclose (f);
316 319
317 if (verbose) 320 if (verbose)
318 cout << "done." << endl; 321 cout << "done." << endl;
319 } 322 }
320 323