*patsch* wieder eine runde eof-bugs erschlagen

This commit is contained in:
dlichteblau
2005-11-27 16:46:48 +00:00
parent cd56af0303
commit e815ffed02
2 changed files with 17 additions and 10 deletions

View File

@ -113,12 +113,7 @@ xmltest/not-wf/sa/112.xml [not validating:] not-wf [validating:] invalid
xmltest/not-wf/sa/113.xml [not validating:] not-wf [validating:] not-wf
xmltest/not-wf/sa/114.xml [not validating:] not-wf [validating:] not-wf
xmltest/not-wf/sa/115.xml [not validating:] not-wf [validating:] not-wf
xmltest/not-wf/sa/116.xml [not validating:] FAILED:
Argument Y is not a REAL: :EOF
[
Internal general parsed entities are only well formed if
they match the "content" production. This is a partial
character reference, not a full one. ]
xmltest/not-wf/sa/116.xml [not validating:] not-wf [validating:] invalid
xmltest/not-wf/sa/117.xml [not validating:] not-wf [validating:] invalid
xmltest/not-wf/sa/118.xml [not validating:] not-wf [validating:] invalid
xmltest/not-wf/sa/119.xml [not validating:] not-wf [validating:] invalid
@ -1886,4 +1881,4 @@ ibm/valid/P86/ibm86v01.xml [not validating:] input [validating:] input
ibm/valid/P87/ibm87v01.xml [not validating:] input [validating:] input
ibm/valid/P88/ibm88v01.xml [not validating:] input [validating:] input
ibm/valid/P89/ibm89v01.xml [not validating:] input [validating:] input
21/1786 tests failed; 376 tests were skipped
20/1786 tests failed; 376 tests were skipped

View File

@ -1506,16 +1506,24 @@
(let ((c (read-rune input)))
(check-rune input c #/#)
(setq c (read-rune input))
(cond ((eql c #/x)
(cond ((eql c :eof)
(eox input))
((eql c #/x)
;; hexadecimal
(setq c (read-rune input))
(when (eql c :eof)
(eox input))
(unless (digit-rune-p c 16)
(wf-error "garbage in character reference"))
(prog1
(parse-integer
(with-output-to-string (sink)
(write-char (rune-char c) sink)
(while (digit-rune-p (setq c (read-rune input)) 16)
(while (progn
(setq c (read-rune input))
(when (eql c :eof)
(eox input))
(digit-rune-p c 16))
(write-char (rune-char c) sink)))
:radix 16)
(check-rune input c #/\;)))
@ -1525,7 +1533,11 @@
(parse-integer
(with-output-to-string (sink)
(write-char (rune-char c) sink)
(while (rune<= #/0 (setq c (read-rune input)) #/9)
(while (progn
(setq c (read-rune input))
(when (eql c :eof)
(eox input))
(rune<= #/0 c #/9))
(write-char (rune-char c) sink)))
:radix 10)
(check-rune input c #/\;)))