pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: msg classes


From: John Darrington
Subject: Re: msg classes
Date: Sat, 24 Dec 2005 09:28:58 +0800
User-agent: Mutt/1.5.4i

On Fri, Dec 23, 2005 at 10:44:03AM -0800, Ben Pfaff wrote:
     John Darrington <address@hidden> writes:
     
     > I've just added a dialog box implementation of msg (from error.c).
     >
     > However it seems that many of the calls to msg have an inappropriate
     > class argument --- at least something that doesn't agree with the
     > comments in error.h
     
     Can you give an example?

Example 1:
In sfm-read.c:614, 
 if (strncmp ("$FL2", hdr.rec_type, 4) != 0)
    lose ((ME, _("%s: Bad magic.  Proper system files begin with "
                 "the four characters `$FL2'. This file will not be read."),
           handle_get_filename (r->fh)));

Shouldn't this be DE ?

Example 2:
In vars-atr.c there are a lot of msg calls with class SE, in
var_is_valid_name.  This function might be called from many places
--- not just a script, so the SE class is inappropriate.  In fact, in
this case it might be an idea to replace the bool issue_error arg with
the class of the error, since the error could have different
significance depending upon where it was called.



Similarly, Example 3:

dictionary.c:703

 if ( w == 0.0 && *warn_on_invalid ) {
          *warn_on_invalid = 0;
          msg (SW, _("At least one case in the data file had a weight value "
                     "that was user-missing, system-missing, zero, or "
                     "negative.  These case(s) were ignored."));


Might not arise as a result of parsing a script.  So DW is probably
more appropriate. Or use the warn_on_invalid arg per above suggestion.

J'




-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: pgp_dVIAzqyNi.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]