[Tcsh] [PATCH] nls: fix localized string for limit error message

Christos Zoulas christos at zoulas.com
Mon Jan 26 16:16:28 UTC 2026


Got all 3, thanks!

christos

> On Jan 26, 2026, at 9:41 AM, Corinna Vinschen <vinschen at redhat.com> wrote:
> 
> On Jan 26 12:57, Corinna Vinschen wrote:
>> On Jan 26 12:28, Corinna Vinschen wrote:
>>> The expression is
>>> 
>>>  xprintf(CGETS(15, 1, "%s: %s: Can't %s%s limit (%s)\n"), bname,
>>>            lp->limname, op, type, strerror(err))
>>> 
>>> but the localized strings are only equivalent to the part up to the
>>> parentheses, thus neglecting to print the strerror text.
>> 
>> Btw., Cygwin is using the NetBSD gencat.c verbatim to create the message
>> catalog files.  The nls/C/set15 file contains this line:
>> 
>>  4 \040hard
>> 
>> When I perform a `make install.catalogs' and restart tcsh, the output
>> of this error message doesn't print the space, e.g.
>> 
>>  limit: maxproc: Can't sethard limit (Operation not permitted)
>>                          ^^
>> 
>> It turns out that this is a tiny bug in NetBSD gencat:
>> 
>> diff --git a/winsup/utils/gencat.c b/winsup/utils/gencat.c
>> index a583a884381f..9902ef75514c 100644
>> --- a/winsup/utils/gencat.c
>> +++ b/winsup/utils/gencat.c
>> @@ -374,6 +374,7 @@ getmsg(int fd, char *cptr, char quote)
>> 							*tptr += (*cptr - '0');
>> 							++cptr;
>> 						}
>> +						++tptr;
>> 					} else {
>> 						warning(cptr, "unrecognized escape sequence");
>> 					}
>> 
>> That means, the space is correctly created, but because tptr doesn't
>> move forward afterwards, the sapce is simply overwritten with the next
>> character.
>> 
>> Does anybody here have a better contact to, or is even a part of to the
>> NetBSD team and would be willing to push this upstream?
> 
> Never mind, I just created a bug report on https://www.netbsd.org/
> 
> Corinna
> 
> -- 
> Tcsh mailing list
> Tcsh at astron.com <mailto:Tcsh at astron.com>
> https://mailman.astron.com/mailman/listinfo/tcsh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20260126/53f10ce5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/tcsh/attachments/20260126/53f10ce5/attachment.asc>


More information about the Tcsh mailing list