From 9e8ca006788e2148154711e1e67b88f495d94e26 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 2 Jun 2006 19:19:12 +0000 Subject: Introduce global (cross-backend) \cfg{contents} and \cfg{index} commands, allowing the fixed words "Contents" and "Index" generated in various output formats to be reconfigured into other languages. [originally from svn r6724] --- error.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'error.c') diff --git a/error.c b/error.c index f7461ef..dfe65e3 100644 --- a/error.c +++ b/error.c @@ -19,7 +19,7 @@ static void do_error(int code, va_list ap) { int i, j; char *sp, *sp2; wchar_t *wsp, *wsp2; - filepos fpos, fpos2; + filepos fpos, fpos2, *fposp; int flags; switch(code) { @@ -248,11 +248,14 @@ static void do_error(int code, va_list ap) { flags = FILEPOS; break; case err_infonodechar: - fpos = *va_arg(ap, filepos *); + fposp = va_arg(ap, filepos *); c = (char)va_arg(ap, int); sprintf(error, "info output format does not support '%c' in" " node names; removing", c); - flags = FILEPOS; + if (fposp) { + flags = FILEPOS; + fpos = *fposp; + } break; case err_text_codeline: fpos = *va_arg(ap, filepos *); -- cgit v1.1