X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fset.q;h=5d9f149072b01c66e02e08cba29f37f7d3aa5628;hb=7b98b3a4f58f6dc5a8e9cbc188b627966d5e652d;hp=8683bff7ea7ef500061ce3ccb0862c78cd3a8f68;hpb=4944c86a9318bc5b5578ab145a95c116ffd2c9fd;p=pspp diff --git a/src/set.q b/src/set.q index 8683bff7ea..5d9f149072 100644 --- a/src/set.q +++ b/src/set.q @@ -59,6 +59,7 @@ */ #include +#include "settings.h" #include #include #include @@ -72,7 +73,6 @@ #include "output.h" #include "var.h" #include "format.h" -#include "settings.h" double set_blanks; int set_compression; @@ -213,10 +213,10 @@ cmd_set (void) return CMD_FAILURE; if (cmd.sbc_block) - msg (SW, _("BLOCK is obsolete.")); + msg (SW, _("%s is obsolete."),"BLOCK"); if (cmd.sbc_boxstring) - msg (SW, _("BOXSTRING is obsolete.")); + msg (SW, _("%s is obsolete."),"BOXSTRING"); if (cmd.compress != -1) { @@ -234,7 +234,7 @@ cmd_set (void) set_cpi = cmd.n_cpi; } if (cmd.sbc_histogram) - msg (MW, _("HISTOGRAM is obsolete.")); + msg (MW, _("%s is obsolete."),"HISTOGRAM"); if (cmd.n_lpi != NOT_LONG) { if (cmd.n_lpi <= 0) @@ -303,30 +303,30 @@ cmd_set (void) set_mxloops = cmd.n_mxloops; } if (cmd.n_mxmemory != NOT_LONG) - msg (SE, _("MXMEMORY is obsolete.")); + msg (SE, _("%s is obsolete."),"MXMEMORY"); if (cmd.n_mxwarns != NOT_LONG) set_mxwarns = cmd.n_mxwarns; if (cmd.prtbck != -1) set_printback = cmd.prtbck == STC_OFF ? 0 : 1; if (cmd.s_scripttab) - msg (SE, _("SCRIPTTAB is obsolete.")); + msg (SE, _("%s is obsolete."),"SCRIPTTAB"); if (cmd.s_tbfonts) - msg (SW, _("TBFONTS not implemented.")); + msg (SW, _("%s is not yet implemented."),"TBFONTS"); if (cmd.s_tb1) - msg (SW, _("TB1 not implemented.")); + msg (SW, _("%s is not yet implemented."),"TB1"); if (cmd.undef != -1) set_undefined = cmd.undef == STC_NOWARN ? 0 : 1; if (cmd.n_workspace != NOT_LONG) - msg (SE, _("WORKSPACE is obsolete.")); + msg (SE, _("%s is obsolete."),"WORKSPACE"); /* PC+ compatible syntax. */ if (cmd.scrn != -1) outp_enable_device (cmd.scrn == STC_OFF ? 0 : 1, OUTP_DEV_SCREEN); if (cmd.automenu != -1) - msg (SW, _("AUTOMENU is obsolete.")); + msg (SW, _("%s is obsolete."),"AUTOMENU"); if (cmd.beep != -1) - msg (SW, _("BEEP is obsolete.")); + msg (SW, _("%s is obsolete."),"BEEP"); if (cmd.s_cprompt) { @@ -345,15 +345,15 @@ cmd_set (void) if (cmd.s_endcmd) set_endcmd = cmd.s_endcmd[0]; if (cmd.eject != -1) - msg (SW, _("EJECT is obsolete.")); + msg (SW, _("%s is obsolete."),"EJECT"); if (cmd.errbrk != -1) set_errorbreak = cmd.errbrk == STC_OFF ? 0 : 1; if (cmd.helpwin != -1) - msg (SW, _("HELPWINDOWS is obsolete.")); + msg (SW, _("%s is obsolete."),"HELPWINDOWS"); if (cmd.inc != -1) set_include = cmd.inc == STC_OFF ? 0 : 1; if (cmd.menus != -1) - msg (MW, _("MENUS is obsolete.")); + msg (MW, _("%s is obsolete."),"MENUS"); if (cmd.null != -1) set_nullline = cmd.null == STC_OFF ? 0 : 1; if (cmd.more != -1) @@ -367,13 +367,13 @@ cmd_set (void) cmd.s_prompt = NULL; } if (cmd.ptrans != -1) - msg (SW, _("PTRANSLATE is obsolete.")); + msg (SW, _("%s is obsolete."),"PTRANSLATE"); if (cmd.runrev != -1) - msg (SW, "RUNREVIEW is obsolete."); + msg (SW, _("%s is obsolete."),"RUNREVIEW"); if (cmd.safe == STC_ON) set_safer = 1; if (cmd.xsort != -1) - msg (SW, _("XSORT is obsolete.")); + msg (SW, _("%s is obsolete."),"XSORT"); free_set (&cmd); @@ -486,7 +486,7 @@ set_routing (int q, int *setting) } static int -stc_custom_pager (struct cmd_set *cmd unused) +stc_custom_pager (struct cmd_set *cmd UNUSED) { lex_match ('='); #if !USE_INTERNAL_PAGER @@ -519,7 +519,7 @@ stc_custom_pager (struct cmd_set *cmd unused) SYSMIS or a numeric value; PC+: Syntax is '.', which is equivalent to SYSMIS, or a numeric value. */ static int -stc_custom_blanks (struct cmd_set *cmd unused) +stc_custom_blanks (struct cmd_set *cmd UNUSED) { lex_match ('='); if ((token == T_ID && lex_id_match ("SYSMIS", tokid)) @@ -539,7 +539,7 @@ stc_custom_blanks (struct cmd_set *cmd unused) } static int -stc_custom_length (struct cmd_set *cmd unused) +stc_custom_length (struct cmd_set *cmd UNUSED) { int page_length; @@ -564,7 +564,7 @@ stc_custom_length (struct cmd_set *cmd unused) } static int -stc_custom_results (struct cmd_set *cmd unused) +stc_custom_results (struct cmd_set *cmd UNUSED) { struct tuple { @@ -605,7 +605,7 @@ stc_custom_results (struct cmd_set *cmd unused) } static int -stc_custom_seed (struct cmd_set *cmd unused) +stc_custom_seed (struct cmd_set *cmd UNUSED) { lex_match ('='); if (lex_match_id ("RANDOM")) @@ -617,11 +617,12 @@ stc_custom_seed (struct cmd_set *cmd unused) set_seed = tokval; lex_get (); } + set_seed_used=1; return 1; } static int -stc_custom_width (struct cmd_set *cmd unused) +stc_custom_width (struct cmd_set *cmd UNUSED) { int page_width; @@ -650,7 +651,7 @@ stc_custom_width (struct cmd_set *cmd unused) /* Parses FORMAT subcommand, which consists of a numeric format specifier. */ static int -stc_custom_format (struct cmd_set *cmd unused) +stc_custom_format (struct cmd_set *cmd UNUSED) { struct fmt_spec fmt; @@ -670,7 +671,7 @@ stc_custom_format (struct cmd_set *cmd unused) } static int -stc_custom_journal (struct cmd_set *cmd unused) +stc_custom_journal (struct cmd_set *cmd UNUSED) { lex_match ('='); if (lex_match_id ("ON")) @@ -688,9 +689,9 @@ stc_custom_journal (struct cmd_set *cmd unused) /* Parses COLOR subcommand. PC+: either ON or OFF or two or three comma-delimited numbers inside parentheses. */ static int -stc_custom_color (struct cmd_set *cmd unused) +stc_custom_color (struct cmd_set *cmd UNUSED) { - msg (MW, "COLOR is obsolete."); + msg (MW, _("%s is obsolete."),"COLOR"); lex_match ('='); if (!lex_match_id ("ON") && !lex_match_id ("YES") && !lex_match_id ("OFF") && !lex_match_id ("NO")) @@ -739,7 +740,7 @@ stc_custom_color (struct cmd_set *cmd unused) } static int -stc_custom_listing (struct cmd_set *cmd unused) +stc_custom_listing (struct cmd_set *cmd UNUSED) { lex_match ('='); if (lex_match_id ("ON") || lex_match_id ("YES")) @@ -755,23 +756,23 @@ stc_custom_listing (struct cmd_set *cmd unused) } static int -stc_custom_disk (struct cmd_set *cmd unused) +stc_custom_disk (struct cmd_set *cmd UNUSED) { stc_custom_listing (cmd); return 0; } static int -stc_custom_log (struct cmd_set *cmd unused) +stc_custom_log (struct cmd_set *cmd UNUSED) { stc_custom_journal (cmd); return 0; } static int -stc_custom_rcolor (struct cmd_set *cmd unused) +stc_custom_rcolor (struct cmd_set *cmd UNUSED) { - msg (SW, _("RCOLOR is obsolete.")); + msg (SW, _("%s is obsolete."),"RCOLOR"); lex_match ('='); if (!lex_force_match ('(')) @@ -818,7 +819,7 @@ stc_custom_rcolor (struct cmd_set *cmd unused) } static int -stc_custom_viewlength (struct cmd_set *cmd unused) +stc_custom_viewlength (struct cmd_set *cmd UNUSED) { if (lex_match_id ("MINIMUM")) set_viewlength = 25; @@ -830,7 +831,7 @@ stc_custom_viewlength (struct cmd_set *cmd unused) { if (!lex_force_int ()) return 0; -#if __MSDOS__ +#ifdef __MSDOS__ if (lex_integer () >= (43 + 25) / 2) set_viewlength = 43; else @@ -841,18 +842,18 @@ stc_custom_viewlength (struct cmd_set *cmd unused) lex_get (); } -#if __MSDOS__ - msg (SW, _("VIEWLENGTH not implemented.")); +#ifdef __MSDOS__ + msg (SW, _("%s is not yet implemented."),"VIEWLENGTH"); #endif /* dos */ return 1; } static int -stc_custom_workdev (struct cmd_set *cmd unused) +stc_custom_workdev (struct cmd_set *cmd UNUSED) { char c[2]; - msg (SW, _("WORKDEV is obsolete.")); + msg (SW, _("%s is obsolete."),"WORKDEV"); c[1] = 0; for (*c = 'A'; *c <= 'Z'; (*c)++) @@ -865,16 +866,6 @@ stc_custom_workdev (struct cmd_set *cmd unused) return 0; } - -/* GSET. */ - -int -cmd_gset (void) -{ - /* FIXME */ - return CMD_FAILURE; -} - /* Local Variables: mode: c