(xundump, xundump1): Fix treatment of empty lines.
This commit is contained in:
parent
f76a128f5c
commit
66669be655
1 changed files with 6 additions and 2 deletions
|
@ -593,7 +593,7 @@ int
|
||||||
xundump(FILE *fp, char *file, int expected_table)
|
xundump(FILE *fp, char *file, int expected_table)
|
||||||
{
|
{
|
||||||
struct castr *ca;
|
struct castr *ca;
|
||||||
int type, nca, i;
|
int type, nca, i, ch;
|
||||||
|
|
||||||
if (fname != file) {
|
if (fname != file) {
|
||||||
fname = file;
|
fname = file;
|
||||||
|
@ -619,6 +619,9 @@ xundump(FILE *fp, char *file, int expected_table)
|
||||||
|
|
||||||
cur_type = type;
|
cur_type = type;
|
||||||
if (human) {
|
if (human) {
|
||||||
|
while ((ch = skipfs(fp)) == '\n')
|
||||||
|
lineno++;
|
||||||
|
ungetc(ch, fp);
|
||||||
if (xuflds(fp, xufldname) < 0)
|
if (xuflds(fp, xufldname) < 0)
|
||||||
type = EF_BAD;
|
type = EF_BAD;
|
||||||
} else {
|
} else {
|
||||||
|
@ -656,7 +659,8 @@ xundump1(FILE *fp, int type, struct castr *ca)
|
||||||
int row, ch;
|
int row, ch;
|
||||||
|
|
||||||
for (row = 0;; ++row) {
|
for (row = 0;; ++row) {
|
||||||
ch = skipfs(fp);
|
while ((ch = skipfs(fp)) == '\n')
|
||||||
|
lineno++;
|
||||||
if (ch == '/')
|
if (ch == '/')
|
||||||
break;
|
break;
|
||||||
ungetc(ch, fp);
|
ungetc(ch, fp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue