X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fformats.c;h=9ad6efc31bb94db3ed186cb8e14164a566547682;hb=f1696fab032a5ae5c44e3a3dedba343fce9ffd5c;hp=36c019c01d07d50f15c7019a9a007718c0f4260c;hpb=74a57f26f1458b28a0fddbb9f46004ac8f4d9c30;p=pspp diff --git a/src/formats.c b/src/formats.c index 36c019c01d..9ad6efc31b 100644 --- a/src/formats.c +++ b/src/formats.c @@ -30,10 +30,6 @@ #include "debug-print.h" -#if DEBUGGING -static void debug_print (void); -#endif - enum { FORMATS_PRINT = 001, @@ -90,7 +86,7 @@ internal_cmd_formats (int which) msg (SE, _("`(' expected after variable list")); goto fail; } - if (!parse_format_specifier (&f, 0) || !check_output_specifier (&f)) + if (!parse_format_specifier (&f, 0) || !check_output_specifier (&f, 1)) goto fail; /* Catch type mismatch errors. */ @@ -131,30 +127,9 @@ internal_cmd_formats (int which) free (v); v = NULL; } -#if DEBUGGING - debug_print (); -#endif return CMD_SUCCESS; fail: free (v); return CMD_PART_SUCCESS_MAYBE; } - -#if DEBUGGING -static void -debug_print (void) -{ - int i; - - printf (_("Formats:\n")); - printf (_(" Name Print Write\n")); - printf (" -------- ------------ ------------\n"); - for (i = 0; i < default_dict.nvar; i++) - { - struct variable *v = default_dict.var[i]; - printf (" %-8s %-12s", v->name, fmt_to_string (&v->print)); - printf (" %-12s\n", fmt_to_string (&v->write)); - } -} -#endif /* DEBUGGING */