projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix description of "count" in Auxiliary Variable Parameter Record.
[pspp]
/
src
/
cmdline.c
diff --git
a/src/cmdline.c
b/src/cmdline.c
index 56ce1d94e67ecd53697adec48a3853847ce70226..b9205a14ed5a6358c5bff387e11d7a8afa4c8d6c 100644
(file)
--- a/
src/cmdline.c
+++ b/
src/cmdline.c
@@
-14,8
+14,8
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
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., 5
9 Temple Place - Suite 330
, Boston, MA
- 0211
1-1307
, USA. */
+ Foundation, Inc., 5
1 Franklin Street, Fifth Floor
, Boston, MA
+ 0211
0-1301
, USA. */
#include <config.h>
#include "cmdline.h"
#include <config.h>
#include "cmdline.h"
@@
-26,23
+26,28
@@
#include <getopt.h>
#include <stdlib.h>
#include "alloc.h"
#include <getopt.h>
#include <stdlib.h>
#include "alloc.h"
+#include "copyleft.h"
#include "error.h"
#include "filename.h"
#include "error.h"
#include "filename.h"
-#include "getline.h"
+#include "getl.h"
+#include "glob.h"
#include "main.h"
#include "output.h"
#include "main.h"
#include "output.h"
+#include "progname.h"
#include "settings.h"
#include "str.h"
#include "var.h"
#include "version.h"
#include "settings.h"
#include "str.h"
#include "var.h"
#include "version.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
void welcome (void);
static void usage (void);
char *subst_vars (char *);
void welcome (void);
static void usage (void);
char *subst_vars (char *);
-static int testing_mode=0;
-
/* Parses the command line specified by ARGC and ARGV as received by
main(). */
void
/* Parses the command line specified by ARGC and ARGV as received by
main(). */
void
@@
-68,7
+73,7
@@
parse_command_line (int argc, char **argv)
{"recon", no_argument, NULL, 'n'},
{"safer", no_argument, NULL, 's'},
{"syntax", required_argument, NULL, 'x'},
{"recon", no_argument, NULL, 'n'},
{"safer", no_argument, NULL, 's'},
{"syntax", required_argument, NULL, 'x'},
- {"testing-mode", no_argument,
&testing_mode, 1
},
+ {"testing-mode", no_argument,
NULL, 'T'
},
{"verbose", no_argument, NULL, 'v'},
{"version", no_argument, NULL, 'V'},
{0, 0, 0, 0},
{"verbose", no_argument, NULL, 'v'},
{"version", no_argument, NULL, 'V'},
{0, 0, 0, 0},
@@
-76,9
+81,8
@@
parse_command_line (int argc, char **argv)
int c, i;
int c, i;
- int cleared_device_defaults = 0;
-
- int no_statrc = 0;
+ bool cleared_device_defaults = false;
+ bool no_statrc = false;
for (;;)
{
for (;;)
{
@@
-138,7
+142,7
@@
parse_command_line (int argc, char **argv)
config_path = optarg;
break;
case 'f':
config_path = optarg;
break;
case 'f':
- printf(_("%s is not yet implemented."), "-f");
+ printf
(_("%s is not yet implemented."), "-f");
putchar('\n');
break;
case 'h':
putchar('\n');
break;
case 'h':
@@
-155,7
+159,7
@@
parse_command_line (int argc, char **argv)
break;
case 'l':
outp_list_classes ();
break;
case 'l':
outp_list_classes ();
-
err_hcf (1
);
+
terminate (true
);
case 'n':
printf (_("%s is not yet implemented."),"-n");
putchar('\n');
case 'n':
printf (_("%s is not yet implemented."),"-n");
putchar('\n');
@@
-164,7
+168,7
@@
parse_command_line (int argc, char **argv)
if (!cleared_device_defaults)
{
outp_configure_clear ();
if (!cleared_device_defaults)
{
outp_configure_clear ();
- cleared_device_defaults =
1
;
+ cleared_device_defaults =
true
;
}
outp_configure_add (optarg);
break;
}
outp_configure_add (optarg);
break;
@@
-173,24
+177,22
@@
parse_command_line (int argc, char **argv)
putchar('\n');
break;
case 'r':
putchar('\n');
break;
case 'r':
- no_statrc =
1
;
+ no_statrc =
true
;
break;
case 's':
break;
case 's':
-
make_safe
();
+
set_safer_mode
();
break;
case 'v':
err_verbosity++;
break;
case 'V':
puts (version);
break;
case 'v':
err_verbosity++;
break;
case 'V':
puts (version);
- puts (_("\nCopyright (C) 1997-9, 2000 Free Software Foundation, "
- "Inc.\n"
- "This is free software; see the source for copying "
- "conditions. There is NO\n"
- "WARRANTY; not even for MERCHANTABILITY or FITNESS "
- "FOR A PARTICULAR PURPOSE.\n\n"
- "Written by Ben Pfaff <blp@gnu.org>."));
- err_hcf (1);
+ puts (legal);
+ terminate (true);
+ case 'T':
+ force_long_view ();
+ set_testing_mode (true);
+ break;
case '?':
usage ();
assert (0);
case '?':
usage ();
assert (0);
@@
-201,14
+203,6
@@
parse_command_line (int argc, char **argv)
}
}
}
}
-
- if (testing_mode)
- {
- /* FIXME: Later this option should do some other things, too. */
- force_long_view();
- }
-
-
for (i = optind; i < argc; i++)
{
int separate = 1;
for (i = optind; i < argc; i++)
{
int separate = 1;
@@
-289,9
+283,9
@@
static const char post_syntax_message[] = N_("\nReport bugs to <%s>.\n");
static void
usage (void)
{
static void
usage (void)
{
- printf (gettext (pre_syntax_message), p
gm
name);
+ printf (gettext (pre_syntax_message), p
rogram_
name);
outp_list_classes ();
outp_list_classes ();
- printf (gettext (post_syntax_message),PACKAGE_BUGREPORT);
+ printf (gettext (post_syntax_message),
PACKAGE_BUGREPORT);
-
err_hcf (1
);
+
terminate (true
);
}
}