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

Corinna Vinschen vinschen at redhat.com
Mon Jan 26 14:41:14 UTC 2026


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



More information about the Tcsh mailing list