aboutsummaryrefslogtreecommitdiffstats
path: root/z02.c
diff options
context:
space:
mode:
authorJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 20:36:56 +0000
committerJeffrey H. Kingston <jeff@it.usyd.edu.au>2010-09-14 20:36:56 +0000
commit162643f981292504f375a7f834d408a4a0fa7f46 (patch)
treea52e523ace2e98b57c761a8319f45b8aee208fce /z02.c
parentb10d39aec443165093f8f28bc6f940530b89cdaf (diff)
downloadlout-162643f981292504f375a7f834d408a4a0fa7f46.tar.gz
Lout 3.22.
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/trunk@13 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'z02.c')
-rw-r--r--z02.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/z02.c b/z02.c
index 837ea95..a7abeed 100644
--- a/z02.c
+++ b/z02.c
@@ -1,6 +1,6 @@
/*@z02.c:Lexical Analyser:Declarations@***************************************/
/* */
-/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.21) */
+/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.22) */
/* COPYRIGHT (C) 1991, 2000 Jeffrey H. Kingston */
/* */
/* Jeffrey H. Kingston (jeff@cs.usyd.edu.au) */
@@ -389,6 +389,14 @@ static void srcnext(void)
/* at end of file since blksize = 0; so add missing newline char */
blksize++;
last_char = *(buf+blksize-1) = CH_NEWLINE;
+
+ /* this adjustment breaks LexNextTokenPos, so fatal error if database */
+ if( ftype == DATABASE_FILE )
+ {
+ line_num(file_pos) = col_num(file_pos) = 0;
+ Error(2, 25, "a database file must end with a newline; this one doesn't",
+ FATAL, &file_pos);
+ }
}
debugcond4(DLA, DD, stack_free <= 1,
"srcnext: %d = fread(0x%x, %d, %d, fp)",