diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2003-08-27 18:42:30 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2003-08-27 18:42:30 +0000 |
commit | 813bfdc2fbdd9465de3c5217222f869aba00d373 (patch) | |
tree | 6e621efc026ef45ad65a4b8b501c89ad918fabae /lang/open-cobol-devel/files/patch-libcob::fileio.c | |
parent | - Update to version 0.6.8 (diff) |
- Update to version 0.23
PR: 56039
Submitted by: Ports Fury
Notes
Notes:
svn path=/head/; revision=87807
Diffstat (limited to 'lang/open-cobol-devel/files/patch-libcob::fileio.c')
-rw-r--r-- | lang/open-cobol-devel/files/patch-libcob::fileio.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lang/open-cobol-devel/files/patch-libcob::fileio.c b/lang/open-cobol-devel/files/patch-libcob::fileio.c new file mode 100644 index 000000000000..d96315e95d73 --- /dev/null +++ b/lang/open-cobol-devel/files/patch-libcob::fileio.c @@ -0,0 +1,20 @@ +--- libcob/fileio.c.orig Wed Jun 11 15:40:20 2003 ++++ libcob/fileio.c Wed Aug 27 09:57:31 2003 +@@ -202,13 +202,10 @@ + else + { + /* discard input until the next newline */ +- int c = getc (f->file); +- while (c != '\r' && c != '\n' && c != EOF) +- c = getc (f->file); +- if (c == '\r') +- c = getc (f->file); +- if (c != '\n' && c != EOF) +- ungetc (c, f->file); ++ char buff[BUFSIZ]; ++ while (fgets (buff, BUFSIZ, f->file) !=NULL) ++ if (strchr (buff, '\n') != NULL) ++ break; + } + + memcpy (f->record->data, buff, f->record->size); |