Brilliant, tnx for that!
> Date: Wed, 1 Dec 2010 08:13:19 +0000 > From: j...@darrington.wattle.id.au > To: b...@cs.stanford.edu > CC: f_niet...@hotmail.com; pspp-...@gnu.org; pspp-users@gnu.org > Subject: Re: Value labels > > On Tue, Nov 30, 2010 at 08:37:21PM -0800, Ben Pfaff wrote: > > It looks like the code just hasn't caught up to the > documentation. Here's a patch. If no one has objections then > I'll push this out to "master" when Savannah comes back up. > > I think the git repos are up now. > > + if (ds_length (&label) > 255) > { > + msg (SW, _("Truncating value label to 255 bytes.")); > + ds_truncate (&label, 255); > } > > For code like that, I would have defined a const int max_label_length=255; > and used it in each of the three places. This has at least two advantages: > a) less chance of a cut and paste error; b) Next year when we increase the > length to 512, the translatable string remains unchanged, thus avoiding > creating a nuisance for all the translators. > > 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. > >
_______________________________________________ Pspp-users mailing list Pspp-users@gnu.org http://lists.gnu.org/mailman/listinfo/pspp-users