summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/gcc/f/runtime/libI77
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-12-15 23:37:20 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-12-15 23:37:20 +0000
commitd4e3d326d83fd256b3bbe4ee946dd8f88624d842 (patch)
tree20c7839b7d8c2d9f0eccddbd0468abf9346ceb6a /gnu/usr.bin/gcc/f/runtime/libI77
parent1183132477cddceaebf3aed5106bec981b2f4de2 (diff)
Update to g77 0.5.19
Diffstat (limited to 'gnu/usr.bin/gcc/f/runtime/libI77')
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/Makefile.in10
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/README21
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/Version.c18
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/backspace.c3
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/close.c2
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/endfile.c10
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/err.c6
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/f2ch.add2
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/fio.h6
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/fmt.h5
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/ftell_.c54
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/inquire.c2
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/lread.c16
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/open.c8
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/rawio.h2
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/rdfmt.c4
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/rsli.c3
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/rsne.c8
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/uio.c12
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/util.c4
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/wref.c6
-rw-r--r--gnu/usr.bin/gcc/f/runtime/libI77/xwsne.c2
22 files changed, 146 insertions, 58 deletions
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/Makefile.in b/gnu/usr.bin/gcc/f/runtime/libI77/Makefile.in
index 4c452f150b4..9dde6519245 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/Makefile.in
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/Makefile.in
@@ -1,7 +1,7 @@
# Makefile for GNU F77 compiler runtime.
# Copyright 1990 - 1994 by AT&T Bell Laboratories and Bellcore (see the
# file `Notice').
-# Portions of this file Copyright (C) 1995 Free Software Foundation, Inc.
+# Portions of this file Copyright (C) 1995, 1996 Free Software Foundation, Inc.
# Contributed by Dave Love (d.love@dl.ac.uk).
#
#This file is part of GNU Fortran.
@@ -38,7 +38,7 @@ DEFS = @DEFS@
CGFLAGS = -g0
# f2c.h should already be installed in xgcc's include directory but add that
# to -I anyhow in case not using xgcc.
-ALL_CFLAGS = -I$(srcdir) -I../../include $(CPPFLAGS) $(DEFS) $(CFLAGS)
+ALL_CFLAGS = -I$(srcdir) -I../../../include $(CPPFLAGS) $(DEFS) $(CFLAGS)
AR = @AR@
AR_FLAGS = rc
RANLIB = @RANLIB@
@@ -58,13 +58,14 @@ CROSS = @CROSS@
OBJ = VersionI.o backspace.o close.o dfe.o dolio.o due.o endfile.o err.o \
fmt.o fmtlib.o iio.o ilnw.o inquire.o lread.o lwrite.o open.o \
rdfmt.o rewind.o rsfe.o rsli.o rsne.o sfe.o sue.o typesize.o uio.o \
- util.o wref.o wrtfmt.o wsfe.o wsle.o wsne.o xwsne.o
+ util.o wref.o wrtfmt.o wsfe.o wsle.o wsne.o xwsne.o \
+ ftell_.o
lib = ../../../libf2c.a
F2C_H = ../../include/f2c.h
-all: ../../include/f2c.h $(lib)
+all: $(F2C_H) $(lib)
$(lib): force $(OBJ)
# Don't worry if ar fails, that can happen when a root-like user installs a
@@ -97,6 +98,7 @@ endfile.o: fio.h rawio.h
err.o: fio.h rawio.h
fmt.o: fio.h
fmt.o: fmt.h
+ftell_.o: fio.h
iio.o: fio.h
iio.o: fmt.h
ilnw.o: fio.h
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/README b/gnu/usr.bin/gcc/f/runtime/libI77/README
index 012279998f8..3e822f8c506 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/README
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/README
@@ -134,6 +134,10 @@ not specify a file name (and does not specify STATUS='SCRATCH')
assumes FILE='fort.n' . You can change this by editing open.c
and endfile.c suitably.
+Unless you adjust the "#define MXUNIT" line in fio.h, Fortran units
+0, 1, ..., 99 are available, i.e., the highest allowed unit number
+is MXUNIT - 1.
+
Lines protected from compilation by #ifdef Allow_TYQUAD
are for a possible extension to 64-bit integers in which
integer = int = 32 bits and longint = long = 64 bits.
@@ -199,3 +203,20 @@ one-line shell script
or (on some systems)
exec /usr/bin/ar lts $1 >/dev/null
+
+Most of the routines in libI77 are support routines for Fortran
+I/O. There are a few exceptions, summarized below -- I/O related
+functions and subroutines that appear to your program as ordinary
+external Fortran routines.
+
+1. CALL FLUSH flushes all buffers.
+
+2. FTELL(i) is an INTEGER function that returns the current
+ offset of Fortran unit i (or -1 if unit i is not open).
+
+3. CALL FSEEK(i, offset, whence, *errlab) attemps to move
+ Fortran unit i to the specified offset: absolute offset
+ if whence = 0; relative to the current offset if whence = 1;
+ relative to the end of the file if whence = 2. It branches
+ to label errlab if unit i is not open or if the call
+ otherwise fails.
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/Version.c b/gnu/usr.bin/gcc/f/runtime/libI77/Version.c
index 11b9943f333..f59a17679db 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/Version.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/Version.c
@@ -1,9 +1,9 @@
-static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19960315\n";
+static char junk[] = "\n@(#) LIBI77 VERSION pjw,dmg-mods 19960925\n";
/*
*/
-char __G77_LIBI77_VERSION__[] = "0.5.18";
+char __G77_LIBI77_VERSION__[] = "0.5.19";
/*
2.01 $ format added
@@ -100,7 +100,7 @@ wrtfmt.c:
/* 17 Oct. 1991: change type of length field in sequential unformatted
records from int to long (for systems where sizeof(int)
can vary, depending on the compiler or compiler options). */
-/* 14 Nov. 1991: change uint to Uint in fmt.h, rdfmt.c, wrtfmt.c.
+/* 14 Nov. 1991: change uint to Uint in fmt.h, rdfmt.c, wrtfmt.c. */
/* 25 Nov. 1991: change uint to Uint in lwrite.c; change sizeof(int) to
sizeof(uioint) in fseeks in sue.c (missed on 17 Oct.). */
/* 1 Dec. 1991: uio.c: add test for read failure (seq. unformatted reads);
@@ -233,7 +233,17 @@ wrtfmt.c:
to err.c */
/* 15 Mar. 1996: lread.c, rsfe.c: honor END= in READ stmt with empty iolist */
-#include "stdio.h"
+/* 13 May 1996: add ftell_.c and fseek_.c */
+/* 9 June 1996: Adjust rsli.c and lread.c so internal list input with
+ too few items in the input string will honor end= . */
+/* 12 Sept. 1995:fmtlib.c: fix glitch in printing the most negative integer. */
+/* 25 Sept. 1995:fmt.h: for formatted writes of negative integer*1 values,
+ make ic signed on ANSI systems. If formatted writes of
+ integer*1 values trouble you when using a K&R C compiler,
+ switch to an ANSI compiler or use a compiler flag that
+ makes characters signed. */
+
+#include <stdio.h>
void
g77_libi77_version ()
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/backspace.c b/gnu/usr.bin/gcc/f/runtime/libI77/backspace.c
index 001ffbf4c02..f995db22ed9 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/backspace.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/backspace.c
@@ -1,3 +1,4 @@
+#include <sys/types.h>
#include "f2c.h"
#include "fio.h"
#ifdef KR_headers
@@ -58,7 +59,7 @@ integer f_back(alist *a)
else
x -= sizeof(buf);
(void) fseek(b->ufd,x,SEEK_SET);
- n=fread(buf,1,(int)(y-x), b->ufd);
+ n=fread(buf,1,(size_t)(y-x), b->ufd);
for(i = n - ndec; --i >= 0; )
{
if(buf[i]!='\n') continue;
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/close.c b/gnu/usr.bin/gcc/f/runtime/libI77/close.c
index 043a8b327ed..2ed158fd7d6 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/close.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/close.c
@@ -6,7 +6,7 @@ integer f_clos(a) cllist *a;
#undef abs
#undef min
#undef max
-#include "stdlib.h"
+#include <stdlib.h>
#ifdef NON_UNIX_STDIO
#ifndef unlink
#define unlink remove
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/endfile.c b/gnu/usr.bin/gcc/f/runtime/libI77/endfile.c
index 454be1388b7..b86dad9dd5d 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/endfile.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/endfile.c
@@ -1,6 +1,6 @@
#include "f2c.h"
#include "fio.h"
-#include "sys/types.h"
+#include <sys/types.h>
#include "rawio.h"
#ifdef KR_headers
@@ -9,8 +9,8 @@ extern char *strcpy();
#undef abs
#undef min
#undef max
-#include "stdlib.h"
-#include "string.h"
+#include <stdlib.h>
+#include <string.h>
#endif
#ifdef NON_UNIX_STDIO
@@ -79,7 +79,7 @@ copy(from, len, to) char *from, *to; register long len;
copy(char *from, register long len, char *to)
#endif
{
- register int n;
+ register size_t n;
int k, rc = 0, tmp;
char buf[BUFSIZ];
@@ -87,7 +87,7 @@ copy(char *from, register long len, char *to)
return 1;
if ((tmp = creat(to,0666)) < 0)
return 1;
- while((n = read(k, buf, len > BUFSIZ ? BUFSIZ : (int)len)) > 0) {
+ while((n = read(k, buf, (size_t) (len > BUFSIZ ? BUFSIZ : (int)len))) > 0) {
if (write(tmp, buf, n) != n)
{ rc = 1; break; }
if ((len -= n) <= 0)
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/err.c b/gnu/usr.bin/gcc/f/runtime/libI77/err.c
index e470bc91991..171cb97f145 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/err.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/err.c
@@ -1,6 +1,6 @@
#ifndef NON_UNIX_STDIO
-#include "sys/types.h"
-#include "sys/stat.h"
+#include <sys/types.h>
+#include <sys/stat.h>
#endif
#include "f2c.h"
#include "fio.h"
@@ -13,7 +13,7 @@ extern char *malloc();
#undef abs
#undef min
#undef max
-#include "stdlib.h"
+#include <stdlib.h>
#endif
#endif
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/f2ch.add b/gnu/usr.bin/gcc/f/runtime/libI77/f2ch.add
index 4ab0d8078c6..a2acc17a159 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/f2ch.add
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/f2ch.add
@@ -150,7 +150,7 @@ extern integer s_wsni(icilist *);
extern integer s_wsue(cilist *);
extern void sig_die(char *, int);
extern integer signal_(integer *, void (*)(int));
-extern int system_(char *, ftnlen);
+extern integer system_(char *, ftnlen);
extern double z_abs(doublecomplex *);
extern void z_cos(doublecomplex *, doublecomplex *);
extern void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/fio.h b/gnu/usr.bin/gcc/f/runtime/libI77/fio.h
index 0fd2c2e6520..d3b8c275c8e 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/fio.h
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/fio.h
@@ -1,8 +1,8 @@
-#include "stdio.h"
-#include "errno.h"
+#include <stdio.h>
+#include <errno.h>
#ifndef NULL
/* ANSI C */
-#include "stddef.h"
+#include <stddef.h>
#endif
#ifndef SEEK_SET
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/fmt.h b/gnu/usr.bin/gcc/f/runtime/libI77/fmt.h
index e94bc1cabc3..509746e13b9 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/fmt.h
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/fmt.h
@@ -45,7 +45,10 @@ typedef union
} ufloat;
typedef union
{ short is;
- char ic;
+#ifndef KR_headers
+ signed
+#endif
+ char ic;
integer il;
#ifdef Allow_TYQUAD
longint ili;
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/ftell_.c b/gnu/usr.bin/gcc/f/runtime/libI77/ftell_.c
new file mode 100644
index 00000000000..8e5b825326d
--- /dev/null
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/ftell_.c
@@ -0,0 +1,54 @@
+#include "f2c.h"
+#include "fio.h"
+
+ static FILE *
+#ifdef KR_headers
+unit_chk(unit, who) integer unit; char *who;
+#else
+unit_chk(integer unit, char *who)
+#endif
+{
+ if (unit >= MXUNIT || unit < 0)
+ f__fatal(101, who);
+ return f__units[unit].ufd;
+ }
+
+ integer
+#ifdef KR_headers
+ftell_(unit) integer *unit;
+#else
+ftell_(integer *unit)
+#endif
+{
+ FILE *f;
+ return (f = unit_chk(*unit, "ftell")) ? ftell(f) : -1L;
+ }
+
+ int
+#ifdef KR_headers
+fseek_(unit, offset, xwhence) integer *unit, *offset, *xwhence;
+#else
+fseek_(integer *unit, integer *offset, integer *xwhence)
+#endif
+{
+ int whence;
+ FILE *f;
+
+ switch (*xwhence) {
+ default:
+ errno = EINVAL;
+ return 1;
+ case 0:
+ whence = SEEK_SET;
+ break;
+ case 1:
+ whence = SEEK_CUR;
+ break;
+ case 2:
+ whence = SEEK_END;
+ break;
+ }
+
+ return !(f = unit_chk(*unit, "fseek"))
+ || fseek(f, *offset, whence) ? 1 : 0;
+ }
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/inquire.c b/gnu/usr.bin/gcc/f/runtime/libI77/inquire.c
index 33587f926c9..f195944cb95 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/inquire.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/inquire.c
@@ -7,7 +7,7 @@ integer f_inqu(a) inlist *a;
#undef abs
#undef min
#undef max
-#include "string.h"
+#include <string.h>
#include "io.h"
#endif
integer f_inqu(inlist *a)
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/lread.c b/gnu/usr.bin/gcc/f/runtime/libI77/lread.c
index 9c0eb857b21..b987a5f18ab 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/lread.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/lread.c
@@ -2,7 +2,7 @@
#include "fio.h"
#include "fmt.h"
#include "lio.h"
-#include "ctype.h"
+#include <ctype.h>
#include "fp.h"
extern char *f__fmtbuf;
@@ -20,7 +20,7 @@ int (*f__lioproc)(), (*l_getc)(), (*l_ungetc)();
#undef abs
#undef min
#undef max
-#include "stdlib.h"
+#include <stdlib.h>
int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint), (*l_getc)(void),
(*l_ungetc)(int,FILE*);
#endif
@@ -524,7 +524,7 @@ l_read(ftnint *number, char *ptr, ftnlen len, ftnint type)
GETC(ch);
switch(ch) {
case EOF:
- goto loopend;
+ err(f__elist->ciend,(EOF),"list in")
case ' ':
case '\t':
case '\n':
@@ -578,13 +578,9 @@ l_read(ftnint *number, char *ptr, ftnlen len, ftnint type)
Ungetc(ch,f__cf);
loopend:
if(f__lquit) return(0);
- if(f__cf) {
- if (feof(f__cf))
- err(f__elist->ciend,(EOF),"list in")
- else if(ferror(f__cf)) {
- clearerr(f__cf);
- errfl(f__elist->cierr,errno,"list in");
- }
+ if(f__cf && ferror(f__cf)) {
+ clearerr(f__cf);
+ errfl(f__elist->cierr,errno,"list in");
}
if(f__ltype==0) goto bump;
switch((int)type)
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/open.c b/gnu/usr.bin/gcc/f/runtime/libI77/open.c
index 75386b9ca9f..14f1c7815a7 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/open.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/open.c
@@ -1,10 +1,10 @@
#ifndef NON_UNIX_STDIO
-#include "sys/types.h"
-#include "sys/stat.h"
+#include <sys/types.h>
+#include <sys/stat.h>
#endif
#include "f2c.h"
#include "fio.h"
-#include "string.h"
+#include <string.h>
#include "rawio.h"
#ifdef KR_headers
@@ -14,7 +14,7 @@ extern integer f_clos();
#undef abs
#undef min
#undef max
-#include "stdlib.h"
+#include <stdlib.h>
extern int f__canseek(FILE*);
extern integer f_clos(cllist*);
#endif
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/rawio.h b/gnu/usr.bin/gcc/f/runtime/libI77/rawio.h
index 75e1ac7ddf1..c1a92f4e973 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/rawio.h
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/rawio.h
@@ -34,7 +34,7 @@ extern char *mktemp(char*);
#endif
#ifndef NO_FCNTL
-#include "fcntl.h"
+#include <fcntl.h>
#endif
#ifndef O_WRONLY
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/rdfmt.c b/gnu/usr.bin/gcc/f/runtime/libI77/rdfmt.c
index 03b325efc6c..3229db08287 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/rdfmt.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/rdfmt.c
@@ -2,7 +2,7 @@
#include "fio.h"
#include "fmt.h"
#include "fp.h"
-#include "ctype.h"
+#include <ctype.h>
extern int f__cursor;
#ifdef KR_headers
@@ -11,7 +11,7 @@ extern double atof();
#undef abs
#undef min
#undef max
-#include "stdlib.h"
+#include <stdlib.h>
#endif
static int
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/rsli.c b/gnu/usr.bin/gcc/f/runtime/libI77/rsli.c
index 999b0d4abe5..a081cd589aa 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/rsli.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/rsli.c
@@ -18,7 +18,8 @@ static int i_getc(Void)
z_rnew();
}
f__recpos++;
- if(f__icptr >= f__icend) err(f__svic->iciend,(EOF),"internal read");
+ if(f__icptr >= f__icend)
+ return EOF;
return(*f__icptr++);
}
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/rsne.c b/gnu/usr.bin/gcc/f/runtime/libI77/rsne.c
index ad7ad26c8fb..9e2acad3d7d 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/rsne.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/rsne.c
@@ -54,8 +54,8 @@ un_getc(x,f__cf) int x; FILE *f__cf;
#undef abs
#undef min
#undef max
-#include "stdlib.h"
-#include "string.h"
+#include <stdlib.h>
+#include <string.h>
#ifdef ungetc
static int
@@ -340,7 +340,7 @@ x_rsne(cilist *a)
#endif
}
have_amp:
- if (ch = getname(buf,sizeof(buf)))
+ if (ch = getname(buf,(int) sizeof(buf)))
return ch;
nl = (Namelist *)a->cifmt;
if (strcmp(buf, nl->name))
@@ -395,7 +395,7 @@ x_rsne(cilist *a)
if (ch <= ' ' && ch >= 0 || ch == ',')
continue;
Ungetc(ch,f__cf);
- if (ch = getname(buf,sizeof(buf)))
+ if (ch = getname(buf,(int) sizeof(buf)))
return ch;
goto havename;
}
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/uio.c b/gnu/usr.bin/gcc/f/runtime/libI77/uio.c
index 6214009ffdb..645392d7af5 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/uio.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/uio.c
@@ -1,6 +1,6 @@
#include "f2c.h"
#include "fio.h"
-#include "sys/types.h"
+#include <sys/types.h>
uiolen f__reclen;
#ifdef KR_headers
@@ -14,14 +14,14 @@ do_us(ftnint *number, char *ptr, ftnlen len)
f__recpos += (int)(*number * len);
if(f__recpos>f__reclen)
err(f__elist->cierr, 110, "do_us");
- if (fread(ptr,(int)len,(int)(*number),f__cf) != *number)
+ if (fread(ptr,(size_t)len,(size_t)(*number),f__cf) != *number)
err(f__elist->ciend, EOF, "do_us");
return(0);
}
else
{
f__reclen += *number * len;
- (void) fwrite(ptr,(int)len,(int)(*number),f__cf);
+ (void) fwrite(ptr,(size_t)len,(size_t)(*number),f__cf);
return(0);
}
}
@@ -42,19 +42,19 @@ integer do_ud(ftnint *number, char *ptr, ftnlen len)
#else
size_t i;
#endif
- if (!(i = fread(ptr,(int)len,(int)(*number),f__cf))
+ if (!(i = fread(ptr,(size_t)len,(size_t)(*number),f__cf))
&& !(f__recpos - *number*len))
err(f__elist->cierr,EOF,"do_ud")
if (i < *number)
memset(ptr + i*len, 0, (*number - i)*len);
return 0;
#else
- if(fread(ptr,(int)len,(int)(*number),f__cf) != *number)
+ if(fread(ptr,(size_t)len,(size_t)(*number),f__cf) != *number)
err(f__elist->cierr,EOF,"do_ud")
else return(0);
#endif
}
- (void) fwrite(ptr,(int)len,(int)(*number),f__cf);
+ (void) fwrite(ptr,(size_t)len,(size_t)(*number),f__cf);
return(0);
}
#ifdef KR_headers
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/util.c b/gnu/usr.bin/gcc/f/runtime/libI77/util.c
index 5275499e76e..a24932533c1 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/util.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/util.c
@@ -1,6 +1,6 @@
#ifndef NON_UNIX_STDIO
-#include "sys/types.h"
-#include "sys/stat.h"
+#include <sys/types.h>
+#include <sys/stat.h>
#endif
#include "f2c.h"
#include "fio.h"
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/wref.c b/gnu/usr.bin/gcc/f/runtime/libI77/wref.c
index eda9a8fa763..43493dc5496 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/wref.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/wref.c
@@ -3,15 +3,15 @@
#include "fmt.h"
#include "fp.h"
#ifndef VAX
-#include "ctype.h"
+#include <ctype.h>
#endif
#ifndef KR_headers
#undef abs
#undef min
#undef max
-#include "stdlib.h"
-#include "string.h"
+#include <stdlib.h>
+#include <string.h>
#endif
#ifdef KR_headers
diff --git a/gnu/usr.bin/gcc/f/runtime/libI77/xwsne.c b/gnu/usr.bin/gcc/f/runtime/libI77/xwsne.c
index 41c929b0796..71f6f1d5da5 100644
--- a/gnu/usr.bin/gcc/f/runtime/libI77/xwsne.c
+++ b/gnu/usr.bin/gcc/f/runtime/libI77/xwsne.c
@@ -15,7 +15,7 @@ nl_donewrec(Void)
#ifdef KR_headers
x_wsne(a) cilist *a;
#else
-#include "string.h"
+#include <string.h>
VOID
x_wsne(cilist *a)