summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-04-20 17:50:41 +0000
committerSimon Tatham <anakin@pobox.com>2004-04-20 17:50:41 +0000
commit2b6def26f41457eba8f2056432cd1af68a5b58b0 (patch)
tree6bc7c479673f48b7e488ea383c6076d4f28cf0fc /error.c
parent8a9d3f97956db97b0813a6d24c486371ff14bd80 (diff)
downloadhalibut-2b6def26f41457eba8f2056432cd1af68a5b58b0.zip
halibut-2b6def26f41457eba8f2056432cd1af68a5b58b0.tar.gz
halibut-2b6def26f41457eba8f2056432cd1af68a5b58b0.tar.bz2
halibut-2b6def26f41457eba8f2056432cd1af68a5b58b0.tar.xz
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]
Diffstat (limited to '')
-rw-r--r--error.c14
1 files changed, 7 insertions, 7 deletions
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;