X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Fparse.c;h=43aa553d894456227bcb7eb7eb328627a15de455;hb=3a61659a8fc11c51ad5af02b20f5613dcde50382;hp=0e7a17d5c092352a6c6220c2fc16c2f83549ae1f;hpb=799e56c0e3a9911a860607e1c07caf2acf8cc9ef;p=pspp-builds.git diff --git a/src/language/expressions/parse.c b/src/language/expressions/parse.c index 0e7a17d5..43aa553d 100644 --- a/src/language/expressions/parse.c +++ b/src/language/expressions/parse.c @@ -1,5 +1,5 @@ /* PSPP - computes sample statistics. - Copyright (C) 1997-9, 2000 Free Software Foundation, Inc. + Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc. Written by Ben Pfaff . This program is free software; you can redistribute it and/or @@ -18,26 +18,29 @@ 02110-1301, USA. */ #include + #include "private.h" + #include #include #include #include -#include -#include + +#include "helpers.h" #include #include -#include -#include "helpers.h" +#include +#include #include #include #include +#include +#include #include +#include #include #include -#include #include -#include /* Declarations. */ @@ -351,25 +354,31 @@ type_coercion_core (struct expression *e, NOT_REACHED (); case OP_ni_format: + msg_disable (); if ((*node)->type == OP_format - && check_input_specifier (&(*node)->format.f, false) - && check_specifier_type (&(*node)->format.f, NUMERIC, false)) + && fmt_check_input (&(*node)->format.f) + && fmt_check_type_compat (&(*node)->format.f, NUMERIC)) { + msg_enable (); if (do_coercion) (*node)->type = OP_ni_format; return true; } + msg_enable (); break; case OP_no_format: + msg_disable (); if ((*node)->type == OP_format - && check_output_specifier (&(*node)->format.f, false) - && check_specifier_type (&(*node)->format.f, NUMERIC, false)) + && fmt_check_output (&(*node)->format.f) + && fmt_check_type_compat (&(*node)->format.f, NUMERIC)) { + msg_enable (); if (do_coercion) (*node)->type = OP_no_format; return true; } + msg_enable (); break; case OP_num_var: