X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fterminal%2Fcommand-line.c;h=e152f7009992eb55ad6194bddb62d4efd323488e;hb=6270a7f035e14fbad945a148a14d7c1006166eb1;hp=3c427cf68fa4622351219a86733e003a76fdfe3d;hpb=4196dc548eca5925571a9f61fbb1008646f3a09d;p=pspp-builds.git diff --git a/src/ui/terminal/command-line.c b/src/ui/terminal/command-line.c index 3c427cf6..e152f700 100644 --- a/src/ui/terminal/command-line.c +++ b/src/ui/terminal/command-line.c @@ -1,21 +1,18 @@ -/* PSPP - computes sample statistics. - Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. - Written by Ben Pfaff . +/* PSPP - a program for statistical analysis. + Copyright (C) 1997-9, 2000, 2007 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program. If not, see . */ #include #include "command-line.h" @@ -45,12 +42,8 @@ #define _(msgid) gettext (msgid) #define N_(msgid) msgid -void welcome (void); static void usage (void); -char *subst_vars (char *); - - /* Parses the command line specified by ARGC and ARGV as received by main(). Returns true if normal execution should proceed, false if the command-line indicates that PSPP should exit. */ @@ -112,7 +105,7 @@ parse_command_line (int argc, char **argv, struct source_stream *ss) } break; - case 'x': + case 'x': if ( 0 == strcmp(optarg,"compatible") ) set_syntax(COMPATIBLE); else if ( 0 == strcmp(optarg,"enhanced")) @@ -194,25 +187,29 @@ parse_command_line (int argc, char **argv, struct source_stream *ss) if (process_statrc) { char *pspprc_fn = fn_search_path ("rc", config_path); - if (pspprc_fn != NULL) + if (pspprc_fn != NULL) { getl_append_source (ss, create_syntax_file_source (pspprc_fn)); - free (pspprc_fn); + free (pspprc_fn); } } for (i = optind; i < argc; i++) if (strchr (argv[i], '=')) outp_configure_macro (argv[i]); - else + else { getl_append_source (ss, create_syntax_file_source (argv[i])); syntax_files++; } if (!syntax_files || interactive_mode) - getl_append_source (ss, create_readln_source () ); + { + getl_append_source (ss, create_readln_source () ); + if (!cleared_device_defaults) + outp_configure_add ("interactive"); + } return true; } @@ -232,11 +229,11 @@ N_("PSPP, a program for statistical analysis of sample data.\n" "\nInput and output:\n" " -e, --error-file=FILE send error messages to FILE (appended)\n" " -f, --out-file=FILE send output to FILE (overwritten)\n" -" -p, --pipe read script from stdin, send output to stdout\n" +" -p, --pipe read syntax from stdin, send output to stdout\n" " -I-, --no-include clear include path\n" " -I, --include=DIR append DIR to include path\n" "\nLanguage modifiers:\n" -" -i, --interactive interpret scripts in interactive mode\n" +" -i, --interactive interpret syntax in interactive mode\n" " -n, --edit just check syntax; don't actually run the code\n" " -r, --no-statrc disable execution of .pspp/rc at startup\n" " -s, --safer don't allow some unsafe operations\n"