summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2001-10-25 19:28:43 +0000
committerSimon Tatham <anakin@pobox.com>2001-10-25 19:28:43 +0000
commit3e043306f1594f7528788a1c593995b391fc7a5a (patch)
tree614dbae4b9d0b18ffaed645887e8243c21c809a7 /error.c
parentdd9eaf09d344a4b18b2750cef08795a097891c08 (diff)
downloadhalibut-3e043306f1594f7528788a1c593995b391fc7a5a.zip
halibut-3e043306f1594f7528788a1c593995b391fc7a5a.tar.gz
halibut-3e043306f1594f7528788a1c593995b391fc7a5a.tar.bz2
halibut-3e043306f1594f7528788a1c593995b391fc7a5a.tar.xz
Enforce proper ordering of heading levels: specifically, ensure the
user doesn't skip a heading level (\H before any \C or \A, or \S straight after \C with no intervening \H). The precise criterion is that when creating section a.b.c.d, sections a.b.c, a.b and a should already exist. This ensures the section tree really is a properly formed tree with no missing nodes. [originally from svn r1329]
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 b4a3898..c81aa8c 100644
--- a/error.c
+++ b/error.c
@@ -162,6 +162,11 @@ static void do_error(int code, va_list ap) {
sprintf(error, "macro `%.200s' already defined", sp);
flags = FILEPOS;
break;
+ case err_sectjump:
+ fpos = *va_arg(ap, filepos *);
+ sprintf(error, "expected higher heading levels before this one");
+ flags = FILEPOS;
+ break;
case err_whatever:
sp = va_arg(ap, char *);
vsprintf(error, sp, ap);