|
Last change
on this file was
5390,
checked in by westram, 18 years ago
|
|
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
|
File size:
634 bytes
|
| Line | |
|---|
| 1 | #include <stdio.h> |
|---|
| 2 | #include "convert.h" |
|---|
| 3 | #include "global.h" |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | /* ------------------------------------------------------------ */ |
|---|
| 7 | /* Function truncate_over_80(). |
|---|
| 8 | /* Initially used for truncating line over 80 char. |
|---|
| 9 | /* of AE2 file. Now might not be useful anymore... |
|---|
| 10 | */ |
|---|
| 11 | void |
|---|
| 12 | truncate_over_80(inf, outf) |
|---|
| 13 | FILE *inf, *outf; |
|---|
| 14 | { |
|---|
| 15 | char *fgets(), *eof, line[80], c; |
|---|
| 16 | |
|---|
| 17 | eof=fgets(line, 80, inf); |
|---|
| 18 | for(;eof!=NULL; ) { |
|---|
| 19 | if(strlen(line)>=79) { |
|---|
| 20 | fprintf(stderr, "OVERFLOW LINE: %s", line); |
|---|
| 21 | for(; (c=fgetc(inf))!='\n'&&c!=NULL; ); |
|---|
| 22 | } |
|---|
| 23 | eof=fgets(line, 80, inf); |
|---|
| 24 | } |
|---|
| 25 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.