[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Value labels
From: |
John Darrington |
Subject: |
Re: Value labels |
Date: |
Wed, 1 Dec 2010 08:13:19 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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.
signature.asc
Description: Digital signature
- Re: Value labels,
John Darrington <=