summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-04-23 17:20:07 +0000
committerSimon Tatham <anakin@pobox.com>2004-04-23 17:20:07 +0000
commit52d5c7f7c4fdc5cbf175bb70c32e88a374045280 (patch)
tree6d114c4837b3a8c8d467a1c75a95c56240cc3774 /error.c
parent5f4b6eee16403e5dbf4571aa7bad06dc19f97597 (diff)
downloadhalibut-52d5c7f7c4fdc5cbf175bb70c32e88a374045280.zip
halibut-52d5c7f7c4fdc5cbf175bb70c32e88a374045280.tar.gz
halibut-52d5c7f7c4fdc5cbf175bb70c32e88a374045280.tar.bz2
halibut-52d5c7f7c4fdc5cbf175bb70c32e88a374045280.tar.xz
Enhance the text backend to support configurable quote characters,
configurable emphasis characters, various other configurable bits which have been marked FIXME in the code for a while, and also to warn when a code paragraph line is too long (because that was the only other thing labelled FIXME). Fallback options are implemented, and defaults set accordingly. A UTF-8 text output file now looks like proper UTF-8. [originally from svn r4128]
Diffstat (limited to 'error.c')
-rw-r--r--error.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/error.c b/error.c
index 42eea37..0e90f0c 100644
--- a/error.c
+++ b/error.c
@@ -16,6 +16,7 @@
static void do_error(int code, va_list ap) {
char error[1024];
char c;
+ int i, j;
char *sp, *sp2;
wchar_t *wsp;
filepos fpos, fpos2;
@@ -221,6 +222,14 @@ static void do_error(int code, va_list ap) {
" node names; removing", c);
flags = FILEPOS;
break;
+ case err_text_codeline:
+ fpos = *va_arg(ap, filepos *);
+ i = va_arg(ap, int);
+ j = va_arg(ap, int);
+ sprintf(error, "warning: code paragraph line is %d chars wide, wider"
+ " than body width %d", i, j);
+ flags = FILEPOS;
+ break;
case err_whatever:
sp = va_arg(ap, char *);
vsprintf(error, sp, ap);