fixed second spot where CRLF split between chunks could cause trouble (bug

* parser.c: fixed second spot where CRLF split between chunks
  could cause trouble (bug #319279)
* gentest.py, testapi.c: fixed two problems involved with
  --with-minimum compilation (compilation errors with schematron
  and formal expressions tests)
diff --git a/parser.c b/parser.c
index 459c5e9..5f561ee 100644
--- a/parser.c
+++ b/parser.c
@@ -3543,6 +3543,8 @@
 	    ctxt->input->cur = in;
 	    if (*in == 0xD) {
 		in++;
+		if (!*in)	/* if end of current chunk return */
+		    return;
 		if (*in == 0xA) {
 		    ctxt->input->cur = in;
 		    in++;
@@ -3937,6 +3939,8 @@
 		ctxt->input->line++; ctxt->input->col = 1;
 		continue; /* while */
 	    }
+	    if (!*in)	/* if end of current chunk return */
+		return;
 	    in--;
 	}
 	SHRINK;