John Darrington <[email protected]> writes: > 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.
You make a good point. If we change it once, we might change it again later. I added that improvement and pushed this patch. -- Ben Pfaff http://benpfaff.org _______________________________________________ pspp-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/pspp-dev
