Check for end of file more often while reading CFSML
svn-id: r38796
This commit is contained in:
parent
4c1349e0f4
commit
a5a29a44e9
2 changed files with 429 additions and 378 deletions
File diff suppressed because it is too large
Load diff
|
@ -777,13 +777,18 @@ sub insert_reader_code {
|
||||||
if ($firsttoken) {
|
if ($firsttoken) {
|
||||||
write_line_pp(__LINE__, 0);
|
write_line_pp(__LINE__, 0);
|
||||||
print " const char *_cfsml_inp = $firsttoken;\n";
|
print " const char *_cfsml_inp = $firsttoken;\n";
|
||||||
|
print " {\n";
|
||||||
} else {
|
} else {
|
||||||
write_line_pp(__LINE__, 0);
|
write_line_pp(__LINE__, 0);
|
||||||
print " const char *_cfsml_inp = _cfsml_get_identifier($fh, &($linecounter), &_cfsml_eof, 0);\n\n";
|
print " const char *_cfsml_inp = _cfsml_get_identifier($fh, &($linecounter), &_cfsml_eof, 0);\n";
|
||||||
|
print " if (!_cfsml_inp) {\n";
|
||||||
|
print " _cfsml_error = CFSML_FAILURE;\n";
|
||||||
|
print " } else {\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
write_line_pp(__LINE__, 0);
|
write_line_pp(__LINE__, 0);
|
||||||
print " _cfsml_error = $types{$type}{'reader'}($fh, $datap, _cfsml_inp, &($linecounter), &_cfsml_eof);\n";
|
print " _cfsml_error = $types{$type}{'reader'}($fh, $datap, _cfsml_inp, &($linecounter), &_cfsml_eof);\n";
|
||||||
|
print " }\n";
|
||||||
|
|
||||||
if ($eofvar) {
|
if ($eofvar) {
|
||||||
write_line_pp(__LINE__, 0);
|
write_line_pp(__LINE__, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue