X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fformats.c;h=4bc6e3f47767335bba767099bc38a76be1d85c8e;hb=84e4d346b557748b62d43158c1b50f655e357f9f;hp=9e62d9930b9d7b3c21efa82cc5c920b3e80c9569;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp diff --git a/src/language/dictionary/formats.c b/src/language/dictionary/formats.c index 9e62d9930b..4bc6e3f477 100644 --- a/src/language/dictionary/formats.c +++ b/src/language/dictionary/formats.c @@ -18,21 +18,24 @@ 02110-1301, USA. */ #include + #include #include #include -#include "command.h" -#include "message.h" -#include "lexer.h" -#include "misc.h" -#include "str.h" -#include "variable.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "gettext.h" #define _(msgid) gettext (msgid) -#include "debug-print.h" - enum { FORMATS_PRINT = 001, @@ -81,15 +84,15 @@ internal_cmd_formats (int which) break; if (!parse_variables (default_dict, &v, &cv, PV_NUMERIC)) - return CMD_PART_SUCCESS_MAYBE; + return CMD_FAILURE; type = v[0]->type; if (!lex_match ('(')) { - msg (SE, _("`(' expected after variable list")); + msg (SE, _("`(' expected after variable list.")); goto fail; } - if (!parse_format_specifier (&f, 0) + if (!parse_format_specifier (&f) || !check_output_specifier (&f, true) || !check_specifier_type (&f, NUMERIC, true)) goto fail; @@ -114,5 +117,5 @@ internal_cmd_formats (int which) fail: free (v); - return CMD_PART_SUCCESS_MAYBE; + return CMD_FAILURE; }