summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-06-12 21:53:26 +0000
committerSimon Tatham <anakin@pobox.com>2004-06-12 21:53:26 +0000
commitcb775f9b2f26acb3bb34f357b778b42d70a39eb2 (patch)
treee313fed2920fde280846e3bed86738d6062c4604 /error.c
parenta5d800d080a9eb557082042216636ac872eac7ec (diff)
downloadhalibut-cb775f9b2f26acb3bb34f357b778b42d70a39eb2.zip
halibut-cb775f9b2f26acb3bb34f357b778b42d70a39eb2.tar.gz
halibut-cb775f9b2f26acb3bb34f357b778b42d70a39eb2.tar.bz2
halibut-cb775f9b2f26acb3bb34f357b778b42d70a39eb2.tar.xz
Enforce that \q may not be used anywhere within \c. It shouldn't be
necessary since the whole point of \c should be that the user wants to exercise exact control over the glyphs used, and forbidding it has the useful effect of relieving some backends of having to make difficult decisions: it means the text backend doesn't have to nest two pairs of identical quotes, and the paper backends don't have to downgrade their quote characters if (as is perfectly plausible) the fixed-pitch font doesn't support the same range as the body text fonts. [originally from svn r4277]
Diffstat (limited to 'error.c')
-rw-r--r--error.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/error.c b/error.c
index 0e90f0c..350e71a 100644
--- a/error.c
+++ b/error.c
@@ -117,6 +117,11 @@ static void do_error(int code, va_list ap) {
sprintf(error, "expected `}' after cross-reference");
flags = FILEPOS;
break;
+ case err_codequote:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "unable to nest \\q{...} within \\c{...} or \\cw{...}");
+ flags = FILEPOS;
+ break;
case err_missingrbrace:
fpos = *va_arg(ap, filepos *);
sprintf(error, "unclosed braces at end of paragraph");