From 2b6def26f41457eba8f2056432cd1af68a5b58b0 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 20 Apr 2004 17:50:41 +0000 Subject: Infrastructure changes for character set support. ustrtoa, ustrfroma, utoa_dup and ufroma_dup now take a charset parameter, and also have a variety of subtly distinct forms. Also, when a \cfg directive is seen in the input file, the precise octet strings for each parameter are kept in their original form as well as being translated into Unicode, so that when they represent filenames they can be used verbatim. [originally from svn r4097] --- error.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'error.c') diff --git a/error.c b/error.c index 5f5cbda..abd8d61 100644 --- a/error.c +++ b/error.c @@ -82,7 +82,7 @@ static void do_error(int code, va_list ap) { break; case err_badparatype: wsp = va_arg(ap, wchar_t *); - sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf)); + sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf), CS_LOCAL); fpos = *va_arg(ap, filepos *); sprintf(error, "command `%.200s' unrecognised at start of" " paragraph", sp); @@ -90,7 +90,7 @@ static void do_error(int code, va_list ap) { break; case err_badmidcmd: wsp = va_arg(ap, wchar_t *); - sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf)); + sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf), CS_LOCAL); fpos = *va_arg(ap, filepos *); sprintf(error, "command `%.200s' unexpected in mid-paragraph", sp); flags = FILEPOS; @@ -138,20 +138,20 @@ static void do_error(int code, va_list ap) { case err_nosuchkw: fpos = *va_arg(ap, filepos *); wsp = va_arg(ap, wchar_t *); - sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf)); + sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf), CS_LOCAL); sprintf(error, "unable to resolve cross-reference to `%.200s'", sp); flags = FILEPOS; break; case err_multiBR: fpos = *va_arg(ap, filepos *); wsp = va_arg(ap, wchar_t *); - sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf)); + sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf), CS_LOCAL); sprintf(error, "multiple `\\BR' entries given for `%.200s'", sp); flags = FILEPOS; break; case err_nosuchidxtag: wsp = va_arg(ap, wchar_t *); - sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf)); + sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf), CS_LOCAL); sprintf(error, "`\\IM' on unknown index tag `%.200s'", sp); flags = 0; /* FIXME: need to get a filepos to here somehow */ @@ -164,7 +164,7 @@ static void do_error(int code, va_list ap) { case err_macroexists: fpos = *va_arg(ap, filepos *); wsp = va_arg(ap, wchar_t *); - sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf)); + sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf), CS_LOCAL); sprintf(error, "macro `%.200s' already defined", sp); flags = FILEPOS; break; @@ -185,7 +185,7 @@ static void do_error(int code, va_list ap) { fpos = *va_arg(ap, filepos *); fpos2 = *va_arg(ap, filepos *); wsp = va_arg(ap, wchar_t *); - sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf)); + sp = ustrtoa(wsp, auxbuf, sizeof(auxbuf), CS_LOCAL); sprintf(error, "paragraph keyword `%.200s' already defined at ", sp); sprintf(error + strlen(error), "%s:%d", fpos2.filename, fpos2.line); flags = FILEPOS; -- cgit v1.1