From: John Darrington Date: Tue, 8 Mar 2005 04:56:43 +0000 (+0000) Subject: Made DEBUG commands only available in testing mode. X-Git-Tag: v0.4.0~152 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=829c9392ee103e34cd81e7c9aee5cdf24d6029dc;p=pspp-builds.git Made DEBUG commands only available in testing mode. Adjusted the relevant tests accordingly. --- diff --git a/po/en_GB.po b/po/en_GB.po index b11dc75e..3e211346 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.3.1\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2005-03-07 06:29+0800\n" +"POT-Creation-Date: 2005-03-08 12:50+0800\n" "PO-Revision-Date: 2004-01-23 13:04+0800\n" "Last-Translator: John Darrington \n" "Language-Team: John Darrington \n" @@ -226,9 +226,9 @@ msgstr "" msgid "Source variable count (%d) does not match target variable count (%d)." msgstr "" -#: src/autorecode.c:139 src/command.c:780 src/compute.c:277 +#: src/autorecode.c:139 src/command.c:791 src/compute.c:277 #: src/data-list.c:410 src/data-list.c:900 src/data-list.c:1751 -#: src/do-if.c:253 src/get.c:406 src/lexer.c:419 src/loop.c:241 +#: src/do-if.c:253 src/get.c:406 src/lexer.c:421 src/loop.c:241 #: src/matrix-data.c:527 src/print.c:335 src/print.c:1048 src/recode.c:405 #: src/sel-if.c:54 src/sel-if.c:131 src/vector.c:193 src/file-handle.q:140 msgid "expecting end of command" @@ -289,13 +289,13 @@ msgstr "" msgid "%s: Temporary file ended unexpectedly." msgstr "" -#: src/cmdline.c:142 src/cmdline.c:161 src/cmdline.c:173 src/command.c:202 +#: src/cmdline.c:143 src/cmdline.c:162 src/cmdline.c:174 src/command.c:207 #: src/set.q:425 src/set.q:427 src/set.q:994 #, c-format msgid "%s is not yet implemented." msgstr "" -#: src/cmdline.c:243 +#: src/cmdline.c:245 #, c-format msgid "" "PSPP, a program for statistical analysis of sample data.\n" @@ -345,32 +345,32 @@ msgid "" "\n" msgstr "" -#: src/cmdline.c:281 +#: src/cmdline.c:283 #, c-format msgid "" "\n" "Report bugs to <%s>.\n" msgstr "" -#: src/command.c:140 +#: src/command.c:145 #, c-format msgid "%s not allowed inside FILE TYPE/END FILE TYPE." msgstr "" -#: src/command.c:144 +#: src/command.c:149 #, c-format msgid "%s not allowed inside FILE TYPE GROUPED/END FILE TYPE." msgstr "" -#: src/command.c:147 +#: src/command.c:152 msgid "RECORD TYPE must be the first command inside a FILE TYPE structure." msgstr "" -#: src/command.c:192 +#: src/command.c:197 msgid "expecting command name" msgstr "" -#: src/command.c:221 +#: src/command.c:226 #, c-format msgid "" "%s is not allowed (1) before a command to specify the input program, such as " @@ -378,57 +378,57 @@ msgid "" "PROGRAM and END INPUT PROGRAM." msgstr "" -#: src/command.c:225 +#: src/command.c:230 #, c-format msgid "%s is not allowed within an input program." msgstr "" -#: src/command.c:226 src/command.c:227 +#: src/command.c:231 src/command.c:232 #, c-format msgid "%s is only allowed within an input program." msgstr "" -#: src/command.c:506 +#: src/command.c:511 #, c-format msgid "Unknown command %s." msgstr "" -#: src/command.c:606 +#: src/command.c:617 msgid "" "This command is not accepted in a syntax file. Instead, use FINISH to " "terminate a syntax file." msgstr "" -#: src/command.c:624 +#: src/command.c:635 msgid "" "This command is not executed in interactive mode. Instead, PSPP drops down " "to the command prompt. Use EXIT if you really want to quit." msgstr "" -#: src/command.c:667 src/command.c:798 src/permissions.c:101 +#: src/command.c:678 src/command.c:809 src/permissions.c:101 msgid "This command not allowed when the SAFER option is set." msgstr "" -#: src/command.c:679 +#: src/command.c:690 #, c-format msgid "Error removing `%s': %s." msgstr "" -#: src/command.c:729 +#: src/command.c:740 #, c-format msgid "Couldn't fork: %s." msgstr "" -#: src/command.c:771 +#: src/command.c:782 #, c-format msgid "Error executing command: %s." msgstr "" -#: src/command.c:819 +#: src/command.c:830 msgid "No operating system support for this command." msgstr "" -#: src/command.c:842 +#: src/command.c:853 msgid "This command is not valid in a syntax file." msgstr "" @@ -480,160 +480,159 @@ msgstr "" msgid ", field type %s) " msgstr "" -#: src/data-in.c:223 -msgid "Field contents followed by garbage." +#: src/data-in.c:210 +msgid "Field does not form a valid floating-point constant." msgstr "" -#: src/data-in.c:256 -msgid "Overflow in floating-point constant." +#: src/data-in.c:239 +msgid "Field contents followed by garbage." msgstr "" -#: src/data-in.c:262 +#: src/data-in.c:257 msgid "Underflow in floating-point constant." msgstr "" #: src/data-in.c:268 -msgid "Field does not form a valid floating-point constant." +msgid "Overflow in floating-point constant." msgstr "" -#: src/data-in.c:294 +#: src/data-in.c:301 msgid "All characters in field must be digits." msgstr "" -#: src/data-in.c:319 +#: src/data-in.c:325 msgid "Unrecognized character in field." msgstr "" -#: src/data-in.c:337 src/data-in.c:587 +#: src/data-in.c:343 src/data-in.c:596 msgid "Field must have even length." msgstr "" -#: src/data-in.c:347 src/data-in.c:597 +#: src/data-in.c:353 src/data-in.c:606 msgid "Field must contain only hex digits." msgstr "" -#: src/data-in.c:385 +#: src/data-in.c:392 #, c-format msgid "" "Quality of zoned decimal (Z) input format code is suspect. Check your " "results three times. Report bugs to %s." msgstr "" -#: src/data-in.c:397 +#: src/data-in.c:404 msgid "Zoned decimal field contains fewer than 2 characters." msgstr "" -#: src/data-in.c:405 +#: src/data-in.c:412 msgid "Bad sign byte in zoned decimal number." msgstr "" -#: src/data-in.c:422 +#: src/data-in.c:432 msgid "Format error in zoned decimal number." msgstr "" -#: src/data-in.c:436 +#: src/data-in.c:446 msgid "Error in syntax of zoned decimal number." msgstr "" -#: src/data-in.c:637 +#: src/data-in.c:646 msgid "Unexpected end of field." msgstr "" -#: src/data-in.c:663 +#: src/data-in.c:672 msgid "Digit expected in field." msgstr "" -#: src/data-in.c:688 +#: src/data-in.c:697 #, c-format msgid "Day (%ld) must be between 1 and 31." msgstr "" -#: src/data-in.c:713 +#: src/data-in.c:722 msgid "Delimiter expected between fields in date." msgstr "" -#: src/data-in.c:810 +#: src/data-in.c:755 #, c-format -msgid "Month (%ld) must be between 1 and 12." +msgid "Parse error at `%c' expecting %s." msgstr "" -#: src/data-in.c:851 +#: src/data-in.c:769 #, c-format -msgid "Month (%s) must be between I and XII." +msgid "Unknown %s `%.*s'." msgstr "" -#: src/data-in.c:878 +#: src/data-in.c:819 #, c-format -msgid "Month name (%s...) is too long." +msgid "Month (%ld) must be between 1 and 12." msgstr "" -#: src/data-in.c:889 -#, c-format -msgid "Bad month name (%s)." +#: src/data-in.c:823 +msgid "month" msgstr "" -#: src/data-in.c:905 +#: src/data-in.c:837 #, c-format msgid "Year (%ld) must be between 1582 and 19999." msgstr "" -#: src/data-in.c:916 +#: src/data-in.c:848 #, c-format msgid "Trailing garbage \"%s\" following date." msgstr "" -#: src/data-in.c:931 +#: src/data-in.c:863 #, c-format msgid "Julian day (%d) must be between 1 and 366." msgstr "" -#: src/data-in.c:943 +#: src/data-in.c:875 #, c-format msgid "Year (%d) must be between 1582 and 19999." msgstr "" -#: src/data-in.c:959 +#: src/data-in.c:891 #, c-format msgid "Quarter (%ld) must be between 1 and 4." msgstr "" -#: src/data-in.c:969 +#: src/data-in.c:901 msgid "`Q' expected between quarter and year." msgstr "" -#: src/data-in.c:985 +#: src/data-in.c:917 #, c-format msgid "Week (%ld) must be between 1 and 53." msgstr "" -#: src/data-in.c:996 +#: src/data-in.c:928 msgid "`WK' expected between week and year." msgstr "" -#: src/data-in.c:1019 +#: src/data-in.c:950 msgid "Delimiter expected between fields in time." msgstr "" -#: src/data-in.c:1031 +#: src/data-in.c:962 #, c-format msgid "Hour (%ld) must be positive." msgstr "" -#: src/data-in.c:1043 +#: src/data-in.c:974 #, c-format msgid "Minute (%ld) must be between 0 and 59." msgstr "" -#: src/data-in.c:1090 +#: src/data-in.c:1021 #, c-format msgid "Hour (%ld) must be between 0 and 23." msgstr "" -#: src/data-in.c:1104 src/data-in.c:1139 -msgid "Day of the week expected in date value." +#: src/data-in.c:1049 +msgid "weekday" msgstr "" -#: src/data-in.c:1477 +#: src/data-in.c:1378 #, c-format msgid "Field too long (%d characters). Truncated after character %d." msgstr "" @@ -1861,101 +1860,101 @@ msgid "" "REREAD: Column numbers must be positive finite numbers. Column set to 1." msgstr "" -#: src/lexer.c:251 +#: src/lexer.c:254 #, c-format msgid "%s does not form a valid number." msgstr "" -#: src/lexer.c:369 +#: src/lexer.c:371 #, c-format msgid "Bad character in input: `%c'." msgstr "" -#: src/lexer.c:371 +#: src/lexer.c:373 #, c-format msgid "Bad character in input: `\\%o'." msgstr "" -#: src/lexer.c:392 +#: src/lexer.c:394 msgid "Syntax error at end of file." msgstr "" -#: src/lexer.c:402 +#: src/lexer.c:404 #, c-format msgid "Syntax error %s at `%s'." msgstr "" -#: src/lexer.c:405 +#: src/lexer.c:407 #, c-format msgid "Syntax error at `%s'." msgstr "" -#: src/lexer.c:525 +#: src/lexer.c:526 #, c-format msgid "expecting `%s'" msgstr "" -#: src/lexer.c:542 +#: src/lexer.c:543 #, c-format msgid "expecting %s" msgstr "" -#: src/lexer.c:556 src/val-labs.c:154 +#: src/lexer.c:557 src/val-labs.c:154 msgid "expecting string" msgstr "" -#: src/lexer.c:570 src/val-labs.c:163 +#: src/lexer.c:571 src/val-labs.c:163 msgid "expecting integer" msgstr "" -#: src/lexer.c:584 +#: src/lexer.c:585 msgid "expecting number" msgstr "" -#: src/lexer.c:598 +#: src/lexer.c:599 msgid "expecting identifier" msgstr "" -#: src/lexer.c:867 +#: src/lexer.c:868 msgid "" msgstr "" -#: src/lexer.c:1000 src/pfm-read.c:129 src/repeat.c:214 +#: src/lexer.c:1002 src/pfm-read.c:129 src/repeat.c:214 msgid "Unexpected end of file." msgstr "" -#: src/lexer.c:1026 +#: src/lexer.c:1028 msgid "binary" msgstr "" -#: src/lexer.c:1026 +#: src/lexer.c:1028 msgid "octal" msgstr "" -#: src/lexer.c:1026 +#: src/lexer.c:1028 msgid "hex" msgstr "" -#: src/lexer.c:1040 +#: src/lexer.c:1042 #, c-format msgid "String of %s digits has %d characters, which is not a multiple of %d." msgstr "" -#: src/lexer.c:1069 +#: src/lexer.c:1071 #, c-format msgid "`%c' is not a valid %s digit." msgstr "" -#: src/lexer.c:1100 +#: src/lexer.c:1102 msgid "Unterminated string constant." msgstr "" -#: src/lexer.c:1172 +#: src/lexer.c:1174 #, c-format msgid "String exceeds 255 characters in length (%d characters)." msgstr "" -#: src/lexer.c:1187 +#: src/lexer.c:1189 msgid "" "Sorry, literal strings may not contain null characters. Replacing with " "spaces." diff --git a/po/pspp.pot b/po/pspp.pot index dc364070..c67a0aa8 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2005-03-07 06:29+0800\n" +"POT-Creation-Date: 2005-03-08 12:50+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -227,9 +227,9 @@ msgstr "" msgid "Source variable count (%d) does not match target variable count (%d)." msgstr "" -#: src/autorecode.c:139 src/command.c:780 src/compute.c:277 +#: src/autorecode.c:139 src/command.c:791 src/compute.c:277 #: src/data-list.c:410 src/data-list.c:900 src/data-list.c:1751 -#: src/do-if.c:253 src/get.c:406 src/lexer.c:419 src/loop.c:241 +#: src/do-if.c:253 src/get.c:406 src/lexer.c:421 src/loop.c:241 #: src/matrix-data.c:527 src/print.c:335 src/print.c:1048 src/recode.c:405 #: src/sel-if.c:54 src/sel-if.c:131 src/vector.c:193 src/file-handle.q:140 msgid "expecting end of command" @@ -290,13 +290,13 @@ msgstr "" msgid "%s: Temporary file ended unexpectedly." msgstr "" -#: src/cmdline.c:142 src/cmdline.c:161 src/cmdline.c:173 src/command.c:202 +#: src/cmdline.c:143 src/cmdline.c:162 src/cmdline.c:174 src/command.c:207 #: src/set.q:425 src/set.q:427 src/set.q:994 #, c-format msgid "%s is not yet implemented." msgstr "" -#: src/cmdline.c:243 +#: src/cmdline.c:245 #, c-format msgid "" "PSPP, a program for statistical analysis of sample data.\n" @@ -346,32 +346,32 @@ msgid "" "\n" msgstr "" -#: src/cmdline.c:281 +#: src/cmdline.c:283 #, c-format msgid "" "\n" "Report bugs to <%s>.\n" msgstr "" -#: src/command.c:140 +#: src/command.c:145 #, c-format msgid "%s not allowed inside FILE TYPE/END FILE TYPE." msgstr "" -#: src/command.c:144 +#: src/command.c:149 #, c-format msgid "%s not allowed inside FILE TYPE GROUPED/END FILE TYPE." msgstr "" -#: src/command.c:147 +#: src/command.c:152 msgid "RECORD TYPE must be the first command inside a FILE TYPE structure." msgstr "" -#: src/command.c:192 +#: src/command.c:197 msgid "expecting command name" msgstr "" -#: src/command.c:221 +#: src/command.c:226 #, c-format msgid "" "%s is not allowed (1) before a command to specify the input program, such as " @@ -379,57 +379,57 @@ msgid "" "PROGRAM and END INPUT PROGRAM." msgstr "" -#: src/command.c:225 +#: src/command.c:230 #, c-format msgid "%s is not allowed within an input program." msgstr "" -#: src/command.c:226 src/command.c:227 +#: src/command.c:231 src/command.c:232 #, c-format msgid "%s is only allowed within an input program." msgstr "" -#: src/command.c:506 +#: src/command.c:511 #, c-format msgid "Unknown command %s." msgstr "" -#: src/command.c:606 +#: src/command.c:617 msgid "" "This command is not accepted in a syntax file. Instead, use FINISH to " "terminate a syntax file." msgstr "" -#: src/command.c:624 +#: src/command.c:635 msgid "" "This command is not executed in interactive mode. Instead, PSPP drops down " "to the command prompt. Use EXIT if you really want to quit." msgstr "" -#: src/command.c:667 src/command.c:798 src/permissions.c:101 +#: src/command.c:678 src/command.c:809 src/permissions.c:101 msgid "This command not allowed when the SAFER option is set." msgstr "" -#: src/command.c:679 +#: src/command.c:690 #, c-format msgid "Error removing `%s': %s." msgstr "" -#: src/command.c:729 +#: src/command.c:740 #, c-format msgid "Couldn't fork: %s." msgstr "" -#: src/command.c:771 +#: src/command.c:782 #, c-format msgid "Error executing command: %s." msgstr "" -#: src/command.c:819 +#: src/command.c:830 msgid "No operating system support for this command." msgstr "" -#: src/command.c:842 +#: src/command.c:853 msgid "This command is not valid in a syntax file." msgstr "" @@ -481,160 +481,159 @@ msgstr "" msgid ", field type %s) " msgstr "" -#: src/data-in.c:223 -msgid "Field contents followed by garbage." +#: src/data-in.c:210 +msgid "Field does not form a valid floating-point constant." msgstr "" -#: src/data-in.c:256 -msgid "Overflow in floating-point constant." +#: src/data-in.c:239 +msgid "Field contents followed by garbage." msgstr "" -#: src/data-in.c:262 +#: src/data-in.c:257 msgid "Underflow in floating-point constant." msgstr "" #: src/data-in.c:268 -msgid "Field does not form a valid floating-point constant." +msgid "Overflow in floating-point constant." msgstr "" -#: src/data-in.c:294 +#: src/data-in.c:301 msgid "All characters in field must be digits." msgstr "" -#: src/data-in.c:319 +#: src/data-in.c:325 msgid "Unrecognized character in field." msgstr "" -#: src/data-in.c:337 src/data-in.c:587 +#: src/data-in.c:343 src/data-in.c:596 msgid "Field must have even length." msgstr "" -#: src/data-in.c:347 src/data-in.c:597 +#: src/data-in.c:353 src/data-in.c:606 msgid "Field must contain only hex digits." msgstr "" -#: src/data-in.c:385 +#: src/data-in.c:392 #, c-format msgid "" "Quality of zoned decimal (Z) input format code is suspect. Check your " "results three times. Report bugs to %s." msgstr "" -#: src/data-in.c:397 +#: src/data-in.c:404 msgid "Zoned decimal field contains fewer than 2 characters." msgstr "" -#: src/data-in.c:405 +#: src/data-in.c:412 msgid "Bad sign byte in zoned decimal number." msgstr "" -#: src/data-in.c:422 +#: src/data-in.c:432 msgid "Format error in zoned decimal number." msgstr "" -#: src/data-in.c:436 +#: src/data-in.c:446 msgid "Error in syntax of zoned decimal number." msgstr "" -#: src/data-in.c:637 +#: src/data-in.c:646 msgid "Unexpected end of field." msgstr "" -#: src/data-in.c:663 +#: src/data-in.c:672 msgid "Digit expected in field." msgstr "" -#: src/data-in.c:688 +#: src/data-in.c:697 #, c-format msgid "Day (%ld) must be between 1 and 31." msgstr "" -#: src/data-in.c:713 +#: src/data-in.c:722 msgid "Delimiter expected between fields in date." msgstr "" -#: src/data-in.c:810 +#: src/data-in.c:755 #, c-format -msgid "Month (%ld) must be between 1 and 12." +msgid "Parse error at `%c' expecting %s." msgstr "" -#: src/data-in.c:851 +#: src/data-in.c:769 #, c-format -msgid "Month (%s) must be between I and XII." +msgid "Unknown %s `%.*s'." msgstr "" -#: src/data-in.c:878 +#: src/data-in.c:819 #, c-format -msgid "Month name (%s...) is too long." +msgid "Month (%ld) must be between 1 and 12." msgstr "" -#: src/data-in.c:889 -#, c-format -msgid "Bad month name (%s)." +#: src/data-in.c:823 +msgid "month" msgstr "" -#: src/data-in.c:905 +#: src/data-in.c:837 #, c-format msgid "Year (%ld) must be between 1582 and 19999." msgstr "" -#: src/data-in.c:916 +#: src/data-in.c:848 #, c-format msgid "Trailing garbage \"%s\" following date." msgstr "" -#: src/data-in.c:931 +#: src/data-in.c:863 #, c-format msgid "Julian day (%d) must be between 1 and 366." msgstr "" -#: src/data-in.c:943 +#: src/data-in.c:875 #, c-format msgid "Year (%d) must be between 1582 and 19999." msgstr "" -#: src/data-in.c:959 +#: src/data-in.c:891 #, c-format msgid "Quarter (%ld) must be between 1 and 4." msgstr "" -#: src/data-in.c:969 +#: src/data-in.c:901 msgid "`Q' expected between quarter and year." msgstr "" -#: src/data-in.c:985 +#: src/data-in.c:917 #, c-format msgid "Week (%ld) must be between 1 and 53." msgstr "" -#: src/data-in.c:996 +#: src/data-in.c:928 msgid "`WK' expected between week and year." msgstr "" -#: src/data-in.c:1019 +#: src/data-in.c:950 msgid "Delimiter expected between fields in time." msgstr "" -#: src/data-in.c:1031 +#: src/data-in.c:962 #, c-format msgid "Hour (%ld) must be positive." msgstr "" -#: src/data-in.c:1043 +#: src/data-in.c:974 #, c-format msgid "Minute (%ld) must be between 0 and 59." msgstr "" -#: src/data-in.c:1090 +#: src/data-in.c:1021 #, c-format msgid "Hour (%ld) must be between 0 and 23." msgstr "" -#: src/data-in.c:1104 src/data-in.c:1139 -msgid "Day of the week expected in date value." +#: src/data-in.c:1049 +msgid "weekday" msgstr "" -#: src/data-in.c:1477 +#: src/data-in.c:1378 #, c-format msgid "Field too long (%d characters). Truncated after character %d." msgstr "" @@ -1862,101 +1861,101 @@ msgid "" "REREAD: Column numbers must be positive finite numbers. Column set to 1." msgstr "" -#: src/lexer.c:251 +#: src/lexer.c:254 #, c-format msgid "%s does not form a valid number." msgstr "" -#: src/lexer.c:369 +#: src/lexer.c:371 #, c-format msgid "Bad character in input: `%c'." msgstr "" -#: src/lexer.c:371 +#: src/lexer.c:373 #, c-format msgid "Bad character in input: `\\%o'." msgstr "" -#: src/lexer.c:392 +#: src/lexer.c:394 msgid "Syntax error at end of file." msgstr "" -#: src/lexer.c:402 +#: src/lexer.c:404 #, c-format msgid "Syntax error %s at `%s'." msgstr "" -#: src/lexer.c:405 +#: src/lexer.c:407 #, c-format msgid "Syntax error at `%s'." msgstr "" -#: src/lexer.c:525 +#: src/lexer.c:526 #, c-format msgid "expecting `%s'" msgstr "" -#: src/lexer.c:542 +#: src/lexer.c:543 #, c-format msgid "expecting %s" msgstr "" -#: src/lexer.c:556 src/val-labs.c:154 +#: src/lexer.c:557 src/val-labs.c:154 msgid "expecting string" msgstr "" -#: src/lexer.c:570 src/val-labs.c:163 +#: src/lexer.c:571 src/val-labs.c:163 msgid "expecting integer" msgstr "" -#: src/lexer.c:584 +#: src/lexer.c:585 msgid "expecting number" msgstr "" -#: src/lexer.c:598 +#: src/lexer.c:599 msgid "expecting identifier" msgstr "" -#: src/lexer.c:867 +#: src/lexer.c:868 msgid "" msgstr "" -#: src/lexer.c:1000 src/pfm-read.c:129 src/repeat.c:214 +#: src/lexer.c:1002 src/pfm-read.c:129 src/repeat.c:214 msgid "Unexpected end of file." msgstr "" -#: src/lexer.c:1026 +#: src/lexer.c:1028 msgid "binary" msgstr "" -#: src/lexer.c:1026 +#: src/lexer.c:1028 msgid "octal" msgstr "" -#: src/lexer.c:1026 +#: src/lexer.c:1028 msgid "hex" msgstr "" -#: src/lexer.c:1040 +#: src/lexer.c:1042 #, c-format msgid "String of %s digits has %d characters, which is not a multiple of %d." msgstr "" -#: src/lexer.c:1069 +#: src/lexer.c:1071 #, c-format msgid "`%c' is not a valid %s digit." msgstr "" -#: src/lexer.c:1100 +#: src/lexer.c:1102 msgid "Unterminated string constant." msgstr "" -#: src/lexer.c:1172 +#: src/lexer.c:1174 #, c-format msgid "String exceeds 255 characters in length (%d characters)." msgstr "" -#: src/lexer.c:1187 +#: src/lexer.c:1189 msgid "" "Sorry, literal strings may not contain null characters. Replacing with " "spaces." diff --git a/src/ChangeLog b/src/ChangeLog index 967dd857..4cdd2acb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 8 12:47:53 WST 2005 John Darrington + + * command.c command.def glob.[ch] cmdline.c: Made DEBUG cmds + available only in testing mode. + Sun Mar 6 23:25:40 2005 Ben Pfaff * data-in.c: Use `bool' throughout, where relevant. diff --git a/src/cmdline.c b/src/cmdline.c index 630aab88..81ec7d80 100644 --- a/src/cmdline.c +++ b/src/cmdline.c @@ -36,6 +36,7 @@ #include "var.h" #include "version.h" #include "copyleft.h" +#include "glob.h" void welcome (void); static void usage (void); @@ -201,6 +202,7 @@ parse_command_line (int argc, char **argv) { /* FIXME: Later this option should do some other things, too. */ force_long_view(); + test_mode = 1; } diff --git a/src/command.c b/src/command.c index 86f776ae..dc53eba8 100644 --- a/src/command.c +++ b/src/command.c @@ -27,6 +27,7 @@ #include "alloc.h" #include "dictionary.h" #include "error.h" +#include "glob.h" #include "getline.h" #include "lexer.h" #include "main.h" @@ -63,20 +64,24 @@ struct command int (*func) (void); /* Function to call. */ int skip_entire_name; /* If zero, we don't skip the final token in the command name. */ + short debug; /* Set if this cmd available only in test mode*/ }; /* Define the command array. */ #define DEFCMD(NAME, T1, T2, T3, T4, FUNC) \ - {NAME, {T1, T2, T3, T4}, FUNC, 1}, + {NAME, {T1, T2, T3, T4}, FUNC, 1, 0}, +#define DBGCMD(NAME, T1, T2, T3, T4, FUNC) \ + {NAME, {T1, T2, T3, T4}, FUNC, 1, 1}, #define SPCCMD(NAME, T1, T2, T3, T4, FUNC) \ - {NAME, {T1, T2, T3, T4}, FUNC, 0}, + {NAME, {T1, T2, T3, T4}, FUNC, 0, 0}, #define UNIMPL(NAME, T1, T2, T3, T4) \ - {NAME, {T1, T2, T3, T4}, NULL, 1}, + {NAME, {T1, T2, T3, T4}, NULL, 1, 0}, static const struct command commands[] = { #include "command.def" }; #undef DEFCMD +#undef DBGCMD #undef UNIMPL @@ -99,7 +104,7 @@ pspp_completion_function (const char *text, int state) cmd = &commands[state + skip]; - if ( cmd->transition[pgm_state] == STATE_ERROR ) + if ( cmd->transition[pgm_state] == STATE_ERROR || ( cmd->debug && ! test_mode ) ) { skip++; continue; @@ -543,6 +548,8 @@ parse_command_name (void) { if (command->skip_entire_name) lex_get (); + if ( command->debug & !test_mode ) + goto error; free_words (words, word_cnt); return command; } @@ -586,10 +593,14 @@ parse_command_name (void) free (words[word_cnt]); } + if ( command->debug && !test_mode ) + goto error; + free_words (words, word_cnt); return command; } +error: unknown_command_error (words, word_cnt); free_words (words, word_cnt); return NULL; diff --git a/src/command.def b/src/command.def index 223035cd..ddad0ae7 100644 --- a/src/command.def +++ b/src/command.def @@ -48,10 +48,10 @@ DEFCMD ("CROSSTABS", ERRO, ERRO, PROC, PROC, cmd_crosstabs) UNIMPL ("CURVEFIT", ERRO, ERRO, ERRO, ERRO) DEFCMD ("DATA LIST", TRAN, INPU, TRAN, TRAN, cmd_data_list) UNIMPL ("DATE", ERRO, ERRO, ERRO, ERRO) -DEFCMD ("DEBUG CASEFILE", INIT, INPU, TRAN, PROC, cmd_debug_casefile) -DEFCMD ("DEBUG EVALUATE", INIT, INPU, TRAN, PROC, cmd_debug_evaluate) -DEFCMD ("DEBUG MOMENTS", INIT, INPU, TRAN, PROC, cmd_debug_moments) -DEFCMD ("DEBUG POOL", INIT, INPU, TRAN, PROC, cmd_debug_pool) +DBGCMD ("DEBUG CASEFILE", INIT, INPU, TRAN, PROC, cmd_debug_casefile) +DBGCMD ("DEBUG EVALUATE", INIT, INPU, TRAN, PROC, cmd_debug_evaluate) +DBGCMD ("DEBUG MOMENTS", INIT, INPU, TRAN, PROC, cmd_debug_moments) +DBGCMD ("DEBUG POOL", INIT, INPU, TRAN, PROC, cmd_debug_pool) DEFCMD ("DESCRIPTIVES", ERRO, ERRO, PROC, PROC, cmd_descriptives) UNIMPL ("DISCRIMINANT", ERRO, ERRO, ERRO, ERRO) DEFCMD ("DISPLAY", ERRO, INPU, TRAN, PROC, cmd_display) diff --git a/src/command.h b/src/command.h index d4d6b839..7b51fbcf 100644 --- a/src/command.h +++ b/src/command.h @@ -54,10 +54,13 @@ int cmd_parse (void); int FUNC (void); #define SPCCMD(NAME, T1, T2, T3, T4, FUNC) \ int FUNC (void); +#define DBGCMD(NAME, T1, T2, T3, T4, FUNC) \ + int FUNC (void); #define UNIMPL(NAME, T1, T2, T3, T4) #include "command.def" #undef DEFCMD #undef SPCCMD #undef UNIMPL +#undef DBGCMD #endif /* !command_h */ diff --git a/src/glob.c b/src/glob.c index 5ddb0e69..cebf3828 100644 --- a/src/glob.c +++ b/src/glob.c @@ -96,6 +96,8 @@ int n_trns; int m_trns; int f_trns; +short test_mode=0; + int FILTER_before_TEMPORARY; struct file_handle *default_handle; diff --git a/src/glob.h b/src/glob.h index 91b70277..9e212bf8 100644 --- a/src/glob.h +++ b/src/glob.h @@ -23,4 +23,6 @@ void init_glob (int argc UNUSED, char **argv); void done_glob (void); +extern short test_mode; + #endif /* glob.h */ diff --git a/tests/expressions/epoch.sh b/tests/expressions/epoch.sh index b1efb5bb..a95f2216 100755 --- a/tests/expressions/epoch.sh +++ b/tests/expressions/epoch.sh @@ -133,7 +133,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp $TEMPDIR/epoch.stat > $TEMPDIR/epoch.err 2> $TEMPDIR/epoch.out +$SUPERVISOR $here/../src/pspp --testing-mode $TEMPDIR/epoch.stat > $TEMPDIR/epoch.err 2> $TEMPDIR/epoch.out activity="compare results" diff -b -B $TEMPDIR/epoch.out - < $TEMPDIR/casefile.out +$SUPERVISOR $here/../src/pspp --testing-mode $TEMPDIR/casefile.stat > $TEMPDIR/casefile.out if [ $? -ne 0 ] ; then no_result ; fi activity="compare results"