mirror of
https://git.zap.org.au/git/trader.git
synced 2025-02-02 15:08:13 -05:00
Allow mkchstr_conv error strings to be localised
This commit is contained in:
parent
6fb62460ca
commit
a49c50b4fd
@ -1091,13 +1091,13 @@ void mkchstr_conv (chtype *restrict chbuf, int chbufsize,
|
||||
(ASCII) one. This is better than terminating! */
|
||||
*wp = EILSEQ_REPL;
|
||||
} else {
|
||||
errno_exit("mkchstr_conv: `%ls'", wcbuf);
|
||||
errno_exit(_("mkchstr_conv: `%ls'"), wcbuf);
|
||||
}
|
||||
} else if (wp != NULL) {
|
||||
// convbuf is too small: truncate wcbuf if possible
|
||||
if (wp == wcbuf) {
|
||||
errno = E2BIG;
|
||||
errno_exit("mkchstr_conv: `%ls'", wcbuf);
|
||||
errno_exit(_("mkchstr_conv: `%ls'"), wcbuf);
|
||||
} else {
|
||||
*(wp - 1) = '\0';
|
||||
}
|
||||
@ -1113,7 +1113,7 @@ void mkchstr_conv (chtype *restrict chbuf, int chbufsize,
|
||||
while (! done) {
|
||||
// Yes, we want to convert a wide NUL, too!
|
||||
if ((n = wcrtomb(convbuf, *wcbuf, &mbstate)) == (size_t) -1) {
|
||||
errno_exit("mkchstr_conv: `%ls'", wcbuf);
|
||||
errno_exit(_("mkchstr_conv: `%ls'"), wcbuf);
|
||||
}
|
||||
|
||||
for (p = convbuf; n > 0; n--, p++, chbuf++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user