diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-12-30 17:35:29 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-12-30 17:35:29 +0000 |
commit | 157d4bd650a3e421c5bac48da7e528af9a6a76e2 (patch) | |
tree | 0379fb2c85e183c3c5669d425b3e42ae4592791b /gnu/lib/libf2c/libU77/fgetc_.c | |
parent | 791194721fec8918406191b62da6dc41f2d690e5 (diff) |
Actual synch with 3.3.5.
Changes in Makefile.bsd-wrapper to avoid prereq.
Fix in lib*/config.h.in to include the right ones and get the correct
definitions.
Bump of shlib_version accordingly.
Diffstat (limited to 'gnu/lib/libf2c/libU77/fgetc_.c')
-rw-r--r-- | gnu/lib/libf2c/libU77/fgetc_.c | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/gnu/lib/libf2c/libU77/fgetc_.c b/gnu/lib/libf2c/libU77/fgetc_.c index 49f39830d2c..ec94829a6a1 100644 --- a/gnu/lib/libf2c/libU77/fgetc_.c +++ b/gnu/lib/libf2c/libU77/fgetc_.c @@ -26,43 +26,36 @@ Boston, MA 02111-1307, USA. */ #include "f2c.h" #include "fio.h" -#ifdef KR_headers -integer G77_fgetc_0 (lunit, c, Lc) - integer *lunit; - ftnlen Lc; /* should be 1 */ - char *c; -#else -integer G77_fgetc_0 (const integer *lunit, char *c, ftnlen Lc) -#endif +integer +G77_fgetc_0 (const integer * lunit, char *c, ftnlen Lc) { int err; FILE *f = f__units[*lunit].ufd; - if (*lunit>=MXUNIT || *lunit<0) + if (*lunit >= MXUNIT || *lunit < 0) return 101; /* bad unit error */ err = getc (f); - if (err == EOF) { - if (feof (f)) - return -1; - else - return ferror (f); } - else { - if (Lc == 0) + if (err == EOF) + { + if (feof (f)) + return -1; + else + return ferror (f); + } + else + { + if (Lc == 0) + return 0; + + c[0] = err; + while (--Lc) + *++c = ' '; return 0; - - c[0] = err; - while (--Lc) - *++c = ' '; - return 0; } + } } -#ifdef KR_headers -integer G77_fget_0 (c, Lc) - ftnlen Lc; /* should be 1 */ - char *c; -#else -integer G77_fget_0 (char *c, const ftnlen Lc) -#endif +integer +G77_fget_0 (char *c, const ftnlen Lc) { integer five = 5; |