aboutsummaryrefslogtreecommitdiff
path: root/libf2c/libI77
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2002-06-01 01:53:53 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2002-06-01 01:53:53 +0000
commit4d85a6fea685603493f2a4dbcfd36d6fd25fbe26 (patch)
tree693a2481f59e62982389a205d2b15b5bfa3e0b2b /libf2c/libI77
parent1e730c5ca76832a10c16300f12ab0447ca1b07a1 (diff)
downloadgcc-4d85a6fea685603493f2a4dbcfd36d6fd25fbe26.zip
gcc-4d85a6fea685603493f2a4dbcfd36d6fd25fbe26.tar.gz
gcc-4d85a6fea685603493f2a4dbcfd36d6fd25fbe26.tar.bz2
*: Delete KR_headers cruft.
* libF77/*: Delete KR_headers cruft. * libI77/*: Likewise. * libU77/*: Likewise. From-SVN: r54132
Diffstat (limited to 'libf2c/libI77')
-rw-r--r--libf2c/libI77/backspace.c4
-rw-r--r--libf2c/libI77/close.c13
-rwxr-xr-xlibf2c/libI77/configure85
-rw-r--r--libf2c/libI77/configure.in11
-rw-r--r--libf2c/libI77/dfe.c12
-rw-r--r--libf2c/libI77/dolio.c6
-rw-r--r--libf2c/libI77/due.c12
-rw-r--r--libf2c/libI77/endfile.c17
-rw-r--r--libf2c/libI77/err.c31
-rw-r--r--libf2c/libI77/fio.h11
-rw-r--r--libf2c/libI77/fmt.c45
-rw-r--r--libf2c/libI77/fmt.h13
-rw-r--r--libf2c/libI77/fmtlib.c5
-rw-r--r--libf2c/libI77/ftell_.c12
-rw-r--r--libf2c/libI77/iio.c16
-rw-r--r--libf2c/libI77/ilnw.c16
-rw-r--r--libf2c/libI77/inquire.c4
-rw-r--r--libf2c/libI77/lio.h7
-rw-r--r--libf2c/libI77/lread.c48
-rw-r--r--libf2c/libI77/lwrite.c36
-rw-r--r--libf2c/libI77/open.c32
-rw-r--r--libf2c/libI77/rdfmt.c44
-rw-r--r--libf2c/libI77/rewind.c4
-rw-r--r--libf2c/libI77/rsfe.c4
-rw-r--r--libf2c/libI77/rsli.c16
-rw-r--r--libf2c/libI77/rsne.c47
-rw-r--r--libf2c/libI77/sfe.c4
-rw-r--r--libf2c/libI77/sue.c12
-rw-r--r--libf2c/libI77/uio.c16
-rw-r--r--libf2c/libI77/util.c12
-rw-r--r--libf2c/libI77/wref.c10
-rw-r--r--libf2c/libI77/wrtfmt.c44
-rw-r--r--libf2c/libI77/wsfe.c4
-rw-r--r--libf2c/libI77/wsle.c4
-rw-r--r--libf2c/libI77/wsne.c4
-rw-r--r--libf2c/libI77/xwsne.c4
36 files changed, 43 insertions, 622 deletions
diff --git a/libf2c/libI77/backspace.c b/libf2c/libI77/backspace.c
index 8489239..ba1dfa1 100644
--- a/libf2c/libI77/backspace.c
+++ b/libf2c/libI77/backspace.c
@@ -2,11 +2,7 @@
#include <sys/types.h>
#include "f2c.h"
#include "fio.h"
-#ifdef KR_headers
-integer f_back(a) alist *a;
-#else
integer f_back(alist *a)
-#endif
{ unit *b;
off_t v, w, x, y, z;
uiolen n;
diff --git a/libf2c/libI77/close.c b/libf2c/libI77/close.c
index 79a3493..e016fda 100644
--- a/libf2c/libI77/close.c
+++ b/libf2c/libI77/close.c
@@ -1,9 +1,7 @@
#include "config.h"
#include "f2c.h"
#include "fio.h"
-#ifdef KR_headers
-integer f_clos(a) cllist *a;
-#else
+
#undef abs
#undef min
#undef max
@@ -25,7 +23,6 @@ extern int unlink(const char*);
#endif
integer f_clos(cllist *a)
-#endif
{ unit *b;
if (f__init & 2)
@@ -66,11 +63,7 @@ integer f_clos(cllist *a)
return(0);
}
void
-#ifdef KR_headers
-f_exit()
-#else
f_exit(void)
-#endif
{ int i;
static cllist xx;
if (! (f__init & 1))
@@ -93,11 +86,7 @@ f_exit(void)
}
}
int
-#ifdef KR_headers
-G77_flush_0 ()
-#else
G77_flush_0 (void)
-#endif
{ int i;
for(i=0;i<MXUNIT;i++)
if(f__units[i].ufd != NULL && f__units[i].uwrt)
diff --git a/libf2c/libI77/configure b/libf2c/libI77/configure
index e064fba..7b8efd8 100755
--- a/libf2c/libI77/configure
+++ b/libf2c/libI77/configure
@@ -988,14 +988,13 @@ EOF
fi
-
echo $ac_n "checking for posix""... $ac_c" 1>&6
-echo "configure:994: checking for posix" >&5
+echo "configure:993: checking for posix" >&5
if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 999 "configure"
+#line 998 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
@@ -1021,12 +1020,12 @@ echo "$ac_t""$g77_cv_header_posix" 1>&6
# We can rely on the GNU library being posix-ish. I guess checking the
# header isn't actually like checking the functions, though...
echo $ac_n "checking for GNU library""... $ac_c" 1>&6
-echo "configure:1025: checking for GNU library" >&5
+echo "configure:1024: checking for GNU library" >&5
if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1030 "configure"
+#line 1029 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef __GNU_LIBRARY__
@@ -1050,12 +1049,12 @@ echo "$ac_t""$g77_cv_lib_gnu" 1>&6
# Apparently cygwin needs to be special-cased.
echo $ac_n "checking for cyg\`win'32""... $ac_c" 1>&6
-echo "configure:1054: checking for cyg\`win'32" >&5
+echo "configure:1053: checking for cyg\`win'32" >&5
if eval "test \"`echo '$''{'g77_cv_sys_cygwin32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1059 "configure"
+#line 1058 "configure"
#include "confdefs.h"
#ifdef __CYGWIN32__
yes
@@ -1078,12 +1077,12 @@ echo "$ac_t""$g77_cv_sys_cygwin32" 1>&6
# ditto for mingw32.
echo $ac_n "checking for mingw32""... $ac_c" 1>&6
-echo "configure:1082: checking for mingw32" >&5
+echo "configure:1081: checking for mingw32" >&5
if eval "test \"`echo '$''{'g77_cv_sys_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1087 "configure"
+#line 1086 "configure"
#include "confdefs.h"
#ifdef __MINGW32__
yes
@@ -1106,12 +1105,12 @@ echo "$ac_t""$g77_cv_sys_mingw32" 1>&6
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1110: checking for working const" >&5
+echo "configure:1109: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1115 "configure"
+#line 1114 "configure"
#include "confdefs.h"
int main() {
@@ -1160,7 +1159,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1181,12 +1180,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1185: checking for size_t" >&5
+echo "configure:1184: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1190 "configure"
+#line 1189 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1219,12 +1218,12 @@ fi
# Apparently positive result on cygwin loses re. NON_UNIX_STDIO
# (as of cygwin b18). Likewise on mingw.
echo $ac_n "checking for fstat""... $ac_c" 1>&6
-echo "configure:1223: checking for fstat" >&5
+echo "configure:1222: checking for fstat" >&5
if eval "test \"`echo '$''{'ac_cv_func_fstat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1228 "configure"
+#line 1227 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char fstat(); below. */
@@ -1247,7 +1246,7 @@ fstat();
; return 0; }
EOF
-if { (eval echo configure:1251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_fstat=yes"
else
@@ -1267,7 +1266,7 @@ else
fi
echo $ac_n "checking need for NON_UNIX_STDIO""... $ac_c" 1>&6
-echo "configure:1271: checking need for NON_UNIX_STDIO" >&5
+echo "configure:1270: checking need for NON_UNIX_STDIO" >&5
if test $g77_cv_sys_cygwin32 = yes \
|| test $g77_cv_sys_mingw32 = yes \
|| test $ac_cv_func_fstat = no; then
@@ -1283,12 +1282,12 @@ fi
for ac_func in fseeko
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1287: checking for $ac_func" >&5
+echo "configure:1286: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1292 "configure"
+#line 1291 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1311,7 +1310,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1338,12 +1337,12 @@ done
for ac_func in ftello
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1342: checking for $ac_func" >&5
+echo "configure:1341: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1347 "configure"
+#line 1346 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1366,7 +1365,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1393,12 +1392,12 @@ done
for ac_func in ftruncate
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1397: checking for $ac_func" >&5
+echo "configure:1396: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1402 "configure"
+#line 1401 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1421,7 +1420,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1448,12 +1447,12 @@ done
for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1452: checking for $ac_func" >&5
+echo "configure:1451: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1457 "configure"
+#line 1456 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1476,7 +1475,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1503,12 +1502,12 @@ done
for ac_func in tempnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1507: checking for $ac_func" >&5
+echo "configure:1506: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1512 "configure"
+#line 1511 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1531,7 +1530,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1558,12 +1557,12 @@ done
for ac_func in tmpnam
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1562: checking for $ac_func" >&5
+echo "configure:1561: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1567 "configure"
+#line 1566 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1586,7 +1585,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1616,19 +1615,19 @@ done
# However, on my sunos4/gcc setup unistd.h leads us wrongly to believe
# we're posix-conformant, so always do the test.
echo $ac_n "checking for ansi/posix sprintf result""... $ac_c" 1>&6
-echo "configure:1620: checking for ansi/posix sprintf result" >&5
+echo "configure:1619: checking for ansi/posix sprintf result" >&5
if test "$cross_compiling" = yes; then
g77_cv_sys_sprintf_ansi=no
else
cat > conftest.$ac_ext <<EOF
-#line 1625 "configure"
+#line 1624 "configure"
#include "confdefs.h"
#include <stdio.h>
/* does sprintf return the number of chars transferred? */
main () {char foo[2]; (sprintf(foo, "1") == 1) ? exit(0) : exit(1);}
EOF
-if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
g77_cv_sys_sprintf_ansi=yes
else
@@ -1659,9 +1658,9 @@ fi
# define NON_ANSI_RW_MODES on unix (can't hurt)
echo $ac_n "checking NON_ANSI_RW_MODES""... $ac_c" 1>&6
-echo "configure:1663: checking NON_ANSI_RW_MODES" >&5
+echo "configure:1662: checking NON_ANSI_RW_MODES" >&5
cat > conftest.$ac_ext <<EOF
-#line 1665 "configure"
+#line 1664 "configure"
#include "confdefs.h"
#ifdef unix
yes
@@ -1706,12 +1705,12 @@ EOF
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1710: checking for off_t" >&5
+echo "configure:1709: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1715 "configure"
+#line 1714 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
diff --git a/libf2c/libI77/configure.in b/libf2c/libI77/configure.in
index 988a8e5..0455647 100644
--- a/libf2c/libI77/configure.in
+++ b/libf2c/libI77/configure.in
@@ -62,17 +62,6 @@ the G77 runtime system. If necessary, install gcc now with \`LANGUAGES=c',
then the target library, then build with \`LANGUAGES=f77'.])])
AC_HEADER_STDC
-dnl We could do this if we didn't know we were using gcc
-dnl AC_MSG_CHECKING(for prototype-savvy compiler)
-dnl AC_CACHE_VAL(g77_cv_sys_proto,
-dnl [AC_TRY_LINK(,
-dnl dnl looks screwy because TRY_LINK expects a function body
-dnl [return 0;} int foo (int * bar) {],
-dnl g77_cv_sys_proto=yes,
-dnl [g77_cv_sys_proto=no
-dnl AC_DEFINE(KR_headers)])])
-dnl AC_MSG_RESULT($g77_cv_sys_proto)
-
AC_MSG_CHECKING(for posix)
AC_CACHE_VAL(g77_cv_header_posix,
AC_EGREP_CPP(yes,
diff --git a/libf2c/libI77/dfe.c b/libf2c/libI77/dfe.c
index 18edabc..cfadb15 100644
--- a/libf2c/libI77/dfe.c
+++ b/libf2c/libI77/dfe.c
@@ -61,11 +61,7 @@ y_newrec(Void)
return(1);
}
-#ifdef KR_headers
-c_dfe(a) cilist *a;
-#else
c_dfe(cilist *a)
-#endif
{
f__sequential=0;
f__formatted=f__external=1;
@@ -86,11 +82,7 @@ c_dfe(cilist *a)
f__curunit->uend = 0;
return(0);
}
-#ifdef KR_headers
-integer s_rdfe(a) cilist *a;
-#else
integer s_rdfe(cilist *a)
-#endif
{
int n;
if(f__init != 1) f_init();
@@ -109,11 +101,7 @@ integer s_rdfe(cilist *a)
fmt_bg();
return(0);
}
-#ifdef KR_headers
-integer s_wdfe(a) cilist *a;
-#else
integer s_wdfe(cilist *a)
-#endif
{
int n;
if(f__init != 1) f_init();
diff --git a/libf2c/libI77/dolio.c b/libf2c/libI77/dolio.c
index 1e0c377..860af54 100644
--- a/libf2c/libI77/dolio.c
+++ b/libf2c/libI77/dolio.c
@@ -4,15 +4,9 @@
#ifdef __cplusplus
extern "C" {
#endif
-#ifdef KR_headers
-extern int (*f__lioproc)();
-
-integer do_lio(type,number,ptr,len) ftnint *number,*type; char *ptr; ftnlen len;
-#else
extern int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint);
integer do_lio(ftnint *type, ftnint *number, char *ptr, ftnlen len)
-#endif
{
return((*f__lioproc)(number,ptr,len,*type));
}
diff --git a/libf2c/libI77/due.c b/libf2c/libI77/due.c
index f7d6941..d118c4d 100644
--- a/libf2c/libI77/due.c
+++ b/libf2c/libI77/due.c
@@ -2,11 +2,7 @@
#include "f2c.h"
#include "fio.h"
-#ifdef KR_headers
-c_due(a) cilist *a;
-#else
c_due(cilist *a)
-#endif
{
if(f__init != 1) f_init();
f__init = 3;
@@ -29,11 +25,7 @@ c_due(cilist *a)
f__curunit->uend = 0;
return(0);
}
-#ifdef KR_headers
-integer s_rdue(a) cilist *a;
-#else
integer s_rdue(cilist *a)
-#endif
{
int n;
f__reading=1;
@@ -42,11 +34,7 @@ integer s_rdue(cilist *a)
err(a->cierr,errno,"read start");
return(0);
}
-#ifdef KR_headers
-integer s_wdue(a) cilist *a;
-#else
integer s_wdue(cilist *a)
-#endif
{
int n;
f__reading=0;
diff --git a/libf2c/libI77/endfile.c b/libf2c/libI77/endfile.c
index 4c5a9dd..bd7f0c1 100644
--- a/libf2c/libI77/endfile.c
+++ b/libf2c/libI77/endfile.c
@@ -5,24 +5,15 @@
#include <sys/types.h>
#include <unistd.h>
-#ifdef KR_headers
-extern char *strcpy();
-extern FILE *tmpfile();
-#else
#undef abs
#undef min
#undef max
#include <stdlib.h>
#include <string.h>
-#endif
extern char *f__r_mode[], *f__w_mode[];
-#ifdef KR_headers
-integer f_end(a) alist *a;
-#else
integer f_end(alist *a)
-#endif
{
unit *b;
FILE *tf;
@@ -44,11 +35,7 @@ integer f_end(alist *a)
#ifndef HAVE_FTRUNCATE
static int
-#ifdef KR_headers
-copy(from, len, to) FILE *from, *to; register long len;
-#else
copy(FILE *from, register long len, FILE *to)
-#endif
{
int len1;
char buf[BUFSIZ];
@@ -64,11 +51,7 @@ copy(FILE *from, register long len, FILE *to)
#endif /* !defined(HAVE_FTRUNCATE) */
int
-#ifdef KR_headers
-t_runc(a) alist *a;
-#else
t_runc(alist *a)
-#endif
{
off_t loc, len;
unit *b;
diff --git a/libf2c/libI77/err.c b/libf2c/libI77/err.c
index 1c21f19..15cee11 100644
--- a/libf2c/libI77/err.c
+++ b/libf2c/libI77/err.c
@@ -6,14 +6,10 @@
#include <sys/stat.h>
#endif
#include "f2c.h"
-#ifdef KR_headers
-extern char *malloc();
-#else
#undef abs
#undef min
#undef max
#include <stdlib.h>
-#endif
#include "fio.h"
#include "fmt.h" /* for struct syl */
@@ -29,17 +25,10 @@ flag f__cplus,f__cblank;
char *f__fmtbuf;
int f__fmtlen;
flag f__external; /*1 if external io, 0 if internal */
-#ifdef KR_headers
-int (*f__doed)(),(*f__doned)();
-int (*f__doend)(),(*f__donewrec)(),(*f__dorevert)();
-int (*f__getn)(); /* for formatted input */
-void (*f__putn)(); /* for formatted output */
-#else
int (*f__getn)(void); /* for formatted input */
void (*f__putn)(int); /* for formatted output */
int (*f__doed)(struct syl*, char*, ftnlen),(*f__doned)(struct syl*);
int (*f__dorevert)(void),(*f__donewrec)(void),(*f__doend)(void);
-#endif
flag f__sequential; /*1 if sequential io, 0 if direct*/
flag f__formatted; /*1 if formatted io, 0 if unformatted*/
FILE *f__cf; /*current file*/
@@ -87,11 +76,7 @@ char *F_err[] =
};
#define MAXERR (sizeof(F_err)/sizeof(char *)+100)
-#ifdef KR_headers
-f__canseek(f) FILE *f; /*SYSDEP*/
-#else
f__canseek(FILE *f) /*SYSDEP*/
-#endif
{
#ifdef NON_UNIX_STDIO
return !isatty(fileno(f));
@@ -142,11 +127,7 @@ f__canseek(FILE *f) /*SYSDEP*/
}
void
-#ifdef KR_headers
-f__fatal(n,s) char *s;
-#else
f__fatal(int n, char *s)
-#endif
{
static int dead = 0;
@@ -204,11 +185,7 @@ f_init(Void)
p->ufmt=1;
p->uwrt=1;
}
-#ifdef KR_headers
-f__nowreading(x) unit *x;
-#else
f__nowreading(unit *x)
-#endif
{
off_t loc;
int ufmt, urw;
@@ -235,11 +212,7 @@ f__nowreading(unit *x)
x->uwrt = 0;
return 0;
}
-#ifdef KR_headers
-f__nowwriting(x) unit *x;
-#else
f__nowwriting(unit *x)
-#endif
{
off_t loc;
int ufmt;
@@ -275,11 +248,7 @@ f__nowwriting(unit *x)
}
int
-#ifdef KR_headers
-err__fl(f, m, s) int f, m; char *s;
-#else
err__fl(int f, int m, char *s)
-#endif
{
if (!f)
f__fatal(m, s);
diff --git a/libf2c/libI77/fio.h b/libf2c/libI77/fio.h
index 8c6d274..52086ba 100644
--- a/libf2c/libI77/fio.h
+++ b/libf2c/libI77/fio.h
@@ -59,16 +59,6 @@ extern int f__init;
extern cilist *f__elist; /*active external io list*/
extern flag f__reading,f__external,f__sequential,f__formatted;
#undef Void
-#ifdef KR_headers
-#define Void /*void*/
-extern int (*f__getn)(); /* for formatted input */
-extern void (*f__putn)(); /* for formatted output */
-extern void x_putc();
-extern long f__inode();
-extern VOID sig_die();
-extern int (*f__donewrec)(), t_putc(), x_wSL();
-extern int c_sfe(), err__fl(), xrd_SL(), f__putbuf();
-#else
#define Void void
#ifdef __cplusplus
extern "C" {
@@ -94,7 +84,6 @@ extern int f__putbuf(int);
#ifdef __cplusplus
}
#endif
-#endif
extern int (*f__doend)(Void);
extern FILE *f__cf; /*current file*/
extern unit *f__curunit; /*current unit*/
diff --git a/libf2c/libI77/fmt.c b/libf2c/libI77/fmt.c
index 793dceb..af41fd8 100644
--- a/libf2c/libI77/fmt.c
+++ b/libf2c/libI77/fmt.c
@@ -23,11 +23,7 @@ static struct syl f__syl[SYLMX];
int f__parenlvl,f__pc,f__revloc;
static
-#ifdef KR_headers
-char *ap_end(s) char *s;
-#else
char *ap_end(char *s)
-#endif
{ char quote;
quote= *s++;
for(;*s;s++)
@@ -42,11 +38,7 @@ char *ap_end(char *s)
/*NOTREACHED*/ return 0;
}
static
-#ifdef KR_headers
-op_gen(a,b,c,d)
-#else
op_gen(int a, int b, int c, int d)
-#endif
{ struct syl *p= &f__syl[f__pc];
if(f__pc>=SYLMX)
{ fprintf(stderr,"format too complicated:\n");
@@ -58,13 +50,8 @@ op_gen(int a, int b, int c, int d)
p->p2.i[1]=d;
return(f__pc++);
}
-#ifdef KR_headers
-static char *f_list();
-static char *gt_num(s,n,n1) char *s; int *n, n1;
-#else
static char *f_list(char*);
static char *gt_num(char *s, int *n, int n1)
-#endif
{ int m=0,f__cnt=0;
char c;
for(c= *s;;c = *s)
@@ -87,11 +74,7 @@ static char *gt_num(char *s, int *n, int n1)
}
static
-#ifdef KR_headers
-char *f_s(s,curloc) char *s;
-#else
char *f_s(char *s, int curloc)
-#endif
{
skip(s);
if(*s++!='(')
@@ -108,11 +91,7 @@ char *f_s(char *s, int curloc)
}
static
-#ifdef KR_headers
-ne_d(s,p) char *s,**p;
-#else
ne_d(char *s, char **p)
-#endif
{ int n,x,sign=0;
struct syl *sp;
switch(*s)
@@ -200,11 +179,7 @@ ne_d(char *s, char **p)
}
static
-#ifdef KR_headers
-e_d(s,p) char *s,**p;
-#else
e_d(char *s, char **p)
-#endif
{ int i,im,n,w,d,e,found=0,x=0;
char *sv=s;
s=gt_num(s,&n,1);
@@ -319,11 +294,7 @@ e_d(char *s, char **p)
return(1);
}
static
-#ifdef KR_headers
-char *i_tem(s) char *s;
-#else
char *i_tem(char *s)
-#endif
{ char *t;
int n,curloc;
if(*s==')') return(s);
@@ -335,11 +306,7 @@ char *i_tem(char *s)
}
static
-#ifdef KR_headers
-char *f_list(s) char *s;
-#else
char *f_list(char *s)
-#endif
{
for(;*s!=0;)
{ skip(s);
@@ -359,11 +326,7 @@ char *f_list(char *s)
return(NULL);
}
-#ifdef KR_headers
-pars_f(s) char *s;
-#else
pars_f(char *s)
-#endif
{
char *e;
@@ -405,11 +368,7 @@ int f__cnt[STKSZ],f__ret[STKSZ],f__cp,f__rp;
flag f__workdone, f__nonl;
static
-#ifdef KR_headers
-type_f(n)
-#else
type_f(int n)
-#endif
{
switch(n)
{
@@ -437,11 +396,7 @@ type_f(int n)
return(ED);
}
}
-#ifdef KR_headers
-integer do_fio(number,ptr,len) ftnint *number; ftnlen len; char *ptr;
-#else
integer do_fio(ftnint *number, char *ptr, ftnlen len)
-#endif
{ struct syl *p;
int n,i;
for(i=0;i<*number;i++,ptr+=len)
diff --git a/libf2c/libI77/fmt.h b/libf2c/libI77/fmt.h
index 6197e76..7219dce 100644
--- a/libf2c/libI77/fmt.h
+++ b/libf2c/libI77/fmt.h
@@ -46,21 +46,13 @@ typedef union
} ufloat;
typedef union
{ short is;
-#ifndef KR_headers
signed
-#endif
char ic;
integer il;
#ifdef Allow_TYQUAD
longint ili;
#endif
} Uint;
-#ifdef KR_headers
-extern int (*f__doed)(),(*f__doned)();
-extern int (*f__dorevert)();
-extern int rd_ed(),rd_ned();
-extern int w_ed(),w_ned();
-#else
#ifdef __cplusplus
extern "C" {
#endif
@@ -76,7 +68,6 @@ extern int wrt_L(Uint*, int, ftnlen);
#ifdef __cplusplus
}
#endif
-#endif
extern flag f__cblank,f__cplus,f__workdone, f__nonl;
extern char *f__fmtbuf;
extern int f__fmtlen;
@@ -94,8 +85,4 @@ extern int f__cursor;
#define TYQUAD 14
#endif
-#ifdef KR_headers
-extern char *f__icvt();
-#else
extern char *f__icvt(longint, int*, int*, int);
-#endif
diff --git a/libf2c/libI77/fmtlib.c b/libf2c/libI77/fmtlib.c
index 69c0d9b..afc8bfd 100644
--- a/libf2c/libI77/fmtlib.c
+++ b/libf2c/libI77/fmtlib.c
@@ -10,12 +10,7 @@
#define ulongint unsigned long
#endif
-#ifdef KR_headers
-char *f__icvt(value,ndigit,sign, base) longint value; int *ndigit,*sign;
- register int base;
-#else
char *f__icvt(longint value, int *ndigit, int *sign, int base)
-#endif
{
static char buf[MAXINTLENGTH+1];
register int i;
diff --git a/libf2c/libI77/ftell_.c b/libf2c/libI77/ftell_.c
index 250a0cc..44a5bbc 100644
--- a/libf2c/libI77/ftell_.c
+++ b/libf2c/libI77/ftell_.c
@@ -3,11 +3,7 @@
#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);
@@ -15,22 +11,14 @@ unit_chk(integer Unit, char *who)
}
integer
-#ifdef KR_headers
-G77_ftell_0 (Unit) integer *Unit;
-#else
G77_ftell_0 (integer *Unit)
-#endif
{
FILE *f;
return (f = unit_chk(*Unit, "ftell")) ? (integer) FTELL(f) : -1L;
}
integer
-#ifdef KR_headers
-G77_fseek_0 (Unit, offset, xwhence) integer *Unit, *offset, *xwhence;
-#else
G77_fseek_0 (integer *Unit, integer *offset, integer *xwhence)
-#endif
{
FILE *f;
int w = (int)*xwhence;
diff --git a/libf2c/libI77/iio.c b/libf2c/libI77/iio.c
index 931f15a..ee782f4 100644
--- a/libf2c/libI77/iio.c
+++ b/libf2c/libI77/iio.c
@@ -16,11 +16,7 @@ z_getc(Void)
}
void
-#ifdef KR_headers
-z_putc(c)
-#else
z_putc(int c)
-#endif
{
if (f__icptr < f__icend && f__recpos++ < f__svic->icirlen)
*f__icptr++ = c;
@@ -41,11 +37,7 @@ z_endp(Void)
return 0;
}
-#ifdef KR_headers
-c_si(a) icilist *a;
-#else
c_si(icilist *a)
-#endif
{
if (f__init & 2)
f__fatal (131, "I/O recursion");
@@ -78,11 +70,7 @@ iw_rev(Void)
return(f__workdone=0);
}
-#ifdef KR_headers
-integer s_rsfi(a) icilist *a;
-#else
integer s_rsfi(icilist *a)
-#endif
{ int n;
if(n=c_si(a)) return(n);
f__reading=1;
@@ -109,11 +97,7 @@ z_wnew(Void)
f__icnum++;
return 1;
}
-#ifdef KR_headers
-integer s_wsfi(a) icilist *a;
-#else
integer s_wsfi(icilist *a)
-#endif
{ int n;
if(n=c_si(a)) return(n);
f__reading=0;
diff --git a/libf2c/libI77/ilnw.c b/libf2c/libI77/ilnw.c
index 58fca0d..bf9f87b 100644
--- a/libf2c/libI77/ilnw.c
+++ b/libf2c/libI77/ilnw.c
@@ -6,11 +6,7 @@ extern char *f__icptr;
extern char *f__icend;
extern icilist *f__svic;
extern int f__icnum;
-#ifdef KR_headers
-extern void z_putc();
-#else
extern void z_putc(int);
-#endif
static int
z_wSL(Void)
@@ -21,11 +17,7 @@ z_wSL(Void)
}
static void
-#ifdef KR_headers
-c_liw(a) icilist *a;
-#else
c_liw(icilist *a)
-#endif
{
f__reading = 0;
f__external = 0;
@@ -44,11 +36,7 @@ c_liw(icilist *a)
}
integer
-#ifdef KR_headers
-s_wsni(a) icilist *a;
-#else
s_wsni(icilist *a)
-#endif
{
cilist ca;
@@ -62,11 +50,7 @@ s_wsni(icilist *a)
}
integer
-#ifdef KR_headers
-s_wsli(a) icilist *a;
-#else
s_wsli(icilist *a)
-#endif
{
if(f__init != 1) f_init();
f__init = 3;
diff --git a/libf2c/libI77/inquire.c b/libf2c/libI77/inquire.c
index 5c5575a..53cba24 100644
--- a/libf2c/libI77/inquire.c
+++ b/libf2c/libI77/inquire.c
@@ -2,9 +2,6 @@
#include "f2c.h"
#include "fio.h"
#include <string.h>
-#ifdef KR_headers
-integer f_inqu(a) inlist *a;
-#else
#if defined (MSDOS) && !defined (GO32)
#undef abs
#undef min
@@ -12,7 +9,6 @@ integer f_inqu(a) inlist *a;
#include "io.h"
#endif
integer f_inqu(inlist *a)
-#endif
{ flag byfile;
int i, n;
unit *p;
diff --git a/libf2c/libI77/lio.h b/libf2c/libI77/lio.h
index ec0c23d..c9540db 100644
--- a/libf2c/libI77/lio.h
+++ b/libf2c/libI77/lio.h
@@ -43,9 +43,7 @@
typedef union
{
-#ifndef KR_headers
signed
-#endif
char flchar;
short flshort;
ftnint flint;
@@ -56,10 +54,6 @@ typedef union
doublereal fldouble;
} flex;
extern int f__scale;
-#ifdef KR_headers
-extern int (*f__lioproc)(), (*l_getc)(), (*l_ungetc)();
-extern int l_read(), l_write();
-#else
#ifdef __cplusplus
extern "C" {
#endif
@@ -73,5 +67,4 @@ extern int z_rnew(void);
#ifdef __cplusplus
}
#endif
-#endif
extern ftnint L_len;
diff --git a/libf2c/libI77/lread.c b/libf2c/libI77/lread.c
index d546efc..2b99175 100644
--- a/libf2c/libI77/lread.c
+++ b/libf2c/libI77/lread.c
@@ -16,25 +16,17 @@ static longint f__llx;
static int quad_read;
#endif
-#ifdef KR_headers
-extern double atof();
-extern char *malloc(), *realloc();
-int (*f__lioproc)(), (*l_getc)(), (*l_ungetc)();
-#else
#undef abs
#undef min
#undef max
#include <stdlib.h>
-#endif
#include "fmt.h"
#include "lio.h"
#include "fp.h"
-#ifndef KR_headers
int (*f__lioproc)(ftnint*, char*, ftnlen, ftnint), (*l_getc)(void),
(*l_ungetc)(int,FILE*);
-#endif
int l_eof;
@@ -64,20 +56,12 @@ char f__ltab[128+1] = { /* offset one for EOF */
#ifdef ungetc
static int
-#ifdef KR_headers
-un_getc(x,f__cf) int x; FILE *f__cf;
-#else
un_getc(int x, FILE *f__cf)
-#endif
{ return ungetc(x,f__cf); }
#else
#define un_getc ungetc
-#ifdef KR_headers
- extern int ungetc();
-#else
extern int ungetc(int, FILE*); /* for systems with a buggy stdio.h */
#endif
-#endif
t_getc(Void)
{ int ch;
@@ -110,11 +94,7 @@ double f__lx,f__ly;
#define Ungetc(x,y) (*l_ungetc)(x,y)
static int
-#ifdef KR_headers
-l_R(poststar, reqint) int poststar, reqint;
-#else
l_R(int poststar, int reqint)
-#endif
{
char s[FMAX+EXPMAXDIGS+4];
register int ch;
@@ -261,11 +241,7 @@ bad:
}
static int
-#ifdef KR_headers
-rd_count(ch) register int ch;
-#else
rd_count(register int ch)
-#endif
{
if (ch < '0' || ch > '9')
return 1;
@@ -342,11 +318,7 @@ l_C(Void)
static char nmLbuf[256], *nmL_next;
static int (*nmL_getc_save)(Void);
-#ifdef KR_headers
- static int (*nmL_ungetc_save)(/* int, FILE* */);
-#else
static int (*nmL_ungetc_save)(int, FILE*);
-#endif
static int
nmL_getc(Void)
@@ -360,22 +332,14 @@ nmL_getc(Void)
}
static int
-#ifdef KR_headers
-nmL_ungetc(x, f) int x; FILE *f;
-#else
nmL_ungetc(int x, FILE *f)
-#endif
{
f = f; /* banish non-use warning */
return *--nmL_next = x;
}
static int
-#ifdef KR_headers
-Lfinish(ch, dot, rvp) int ch, dot, *rvp;
-#else
Lfinish(int ch, int dot, int *rvp)
-#endif
{
char *s, *se;
static char what[] = "namelist input";
@@ -619,11 +583,7 @@ l_CHAR(Void)
}
}
}
-#ifdef KR_headers
-c_le(a) cilist *a;
-#else
c_le(cilist *a)
-#endif
{
if(f__init != 1) f_init();
f__init = 3;
@@ -640,11 +600,7 @@ c_le(cilist *a)
if(!f__curunit->ufmt) err(a->cierr,103,"lio");
return(0);
}
-#ifdef KR_headers
-l_read(number,ptr,len,type) ftnint *number,type; char *ptr; ftnlen len;
-#else
l_read(ftnint *number, char *ptr, ftnlen len, ftnint type)
-#endif
{
#define Ptr ((flex *)ptr)
int i,n,ch;
@@ -771,11 +727,7 @@ l_read(ftnint *number, char *ptr, ftnlen len, ftnint type)
return(0);
#undef Ptr
}
-#ifdef KR_headers
-integer s_rsle(a) cilist *a;
-#else
integer s_rsle(cilist *a)
-#endif
{
int n;
diff --git a/libf2c/libI77/lwrite.c b/libf2c/libI77/lwrite.c
index bf209f4..d21a0fe 100644
--- a/libf2c/libI77/lwrite.c
+++ b/libf2c/libI77/lwrite.c
@@ -14,11 +14,7 @@ donewrec(Void)
}
static VOID
-#ifdef KR_headers
-lwrt_I(n) longint n;
-#else
lwrt_I(longint n)
-#endif
{
char *p;
int ndigit, sign;
@@ -33,22 +29,14 @@ lwrt_I(longint n)
PUT(*p++);
}
static VOID
-#ifdef KR_headers
-lwrt_L(n, len) ftnint n; ftnlen len;
-#else
lwrt_L(ftnint n, ftnlen len)
-#endif
{
if(f__recpos+LLOGW>=L_len)
donewrec();
wrt_L((Uint *)&n,LLOGW, len);
}
static VOID
-#ifdef KR_headers
-lwrt_A(p,len) char *p; ftnlen len;
-#else
lwrt_A(char *p, ftnlen len)
-#endif
{
int a;
char *p1, *pe;
@@ -89,11 +77,7 @@ lwrt_A(char *p, ftnlen len)
}
static int
-#ifdef KR_headers
-l_g(buf, n) char *buf; double n;
-#else
l_g(char *buf, double n)
-#endif
{
#ifdef Old_list_output
doublereal absn;
@@ -167,17 +151,9 @@ l_g(char *buf, double n)
}
static VOID
-#ifdef KR_headers
-l_put(s) register char *s;
-#else
l_put(register char *s)
-#endif
{
-#ifdef KR_headers
- register void (*pn)() = f__putn;
-#else
register void (*pn)(int) = f__putn;
-#endif
register int c;
while(c = *s++)
@@ -185,11 +161,7 @@ l_put(register char *s)
}
static VOID
-#ifdef KR_headers
-lwrt_F(n) double n;
-#else
lwrt_F(double n)
-#endif
{
char buf[LEFBL];
@@ -198,11 +170,7 @@ lwrt_F(double n)
l_put(buf);
}
static VOID
-#ifdef KR_headers
-lwrt_C(a,b) double a,b;
-#else
lwrt_C(double a, double b)
-#endif
{
char *ba, *bb, bufa[LEFBL], bufb[LEFBL];
int al, bl;
@@ -231,11 +199,7 @@ lwrt_C(double a, double b)
l_put(bb);
PUT(')');
}
-#ifdef KR_headers
-l_write(number,ptr,len,type) ftnint *number,type; char *ptr; ftnlen len;
-#else
l_write(ftnint *number, char *ptr, ftnlen len, ftnint type)
-#endif
{
#define Ptr ((flex *)ptr)
int i;
diff --git a/libf2c/libI77/open.c b/libf2c/libI77/open.c
index 52e70d5..9e3ce67 100644
--- a/libf2c/libI77/open.c
+++ b/libf2c/libI77/open.c
@@ -10,20 +10,12 @@
#endif
#endif
-#ifdef KR_headers
-extern char *malloc();
-#ifdef NON_ANSI_STDIO
-extern char *mktemp();
-#endif
-extern integer f_clos();
-#else
#undef abs
#undef min
#undef max
#include <stdlib.h>
extern int f__canseek(FILE*);
extern integer f_clos(cllist*);
-#endif
#ifdef NON_ANSI_RW_MODES
char *f__r_mode[2] = {"r", "r"};
@@ -37,11 +29,7 @@ char *f__w_mode[4] = {"wb", "w", "r+b", "r+"};
int f__buflen = (int)sizeof(f__buf0);
static void
-#ifdef KR_headers
-f__bufadj(n, c) int n, c;
-#else
f__bufadj(int n, int c)
-#endif
{
unsigned int len;
char *nbuf, *s, *t, *te;
@@ -64,11 +52,7 @@ f__bufadj(int n, int c)
}
int
-#ifdef KR_headers
-f__putbuf(c) int c;
-#else
f__putbuf(int c)
-#endif
{
char *s, *se;
int n;
@@ -94,11 +78,7 @@ f__putbuf(int c)
}
void
-#ifdef KR_headers
-x_putc(c)
-#else
x_putc(int c)
-#endif
{
if (f__recpos >= f__buflen)
f__bufadj(f__recpos, f__buflen);
@@ -109,11 +89,7 @@ x_putc(int c)
do {if(f) {f__init &= ~2; errno= m;} else opn_err(m,s,a); return(m);} while(0)
static void
-#ifdef KR_headers
-opn_err(m, s, a) int m; char *s; olist *a;
-#else
opn_err(int m, char *s, olist *a)
-#endif
{
if (a->ofnm) {
/* supply file name to error message */
@@ -124,11 +100,7 @@ opn_err(int m, char *s, olist *a)
f__fatal(m, s);
}
-#ifdef KR_headers
-integer f_open(a) olist *a;
-#else
integer f_open(olist *a)
-#endif
{ unit *b;
integer rv;
char buf[256], *s, *env;
@@ -284,11 +256,7 @@ integer f_open(olist *a)
opnerr(a->oerr,129,"open");
return(0);
}
-#ifdef KR_headers
-fk_open(seq,fmt,n) ftnint n;
-#else
fk_open(int seq, int fmt, ftnint n)
-#endif
{ char nbuf[10];
olist a;
int rtn;
diff --git a/libf2c/libI77/rdfmt.c b/libf2c/libI77/rdfmt.c
index 81426ae..4da8ed6 100644
--- a/libf2c/libI77/rdfmt.c
+++ b/libf2c/libI77/rdfmt.c
@@ -4,24 +4,16 @@
#include "fio.h"
extern int f__cursor;
-#ifdef KR_headers
-extern double atof();
-#else
#undef abs
#undef min
#undef max
#include <stdlib.h>
-#endif
#include "fmt.h"
#include "fp.h"
static int
-#ifdef KR_headers
-rd_Z(n,w,len) Uint *n; ftnlen len;
-#else
rd_Z(Uint *n, int w, ftnlen len)
-#endif
{
long x[9];
char *s, *s0, *s1, *se, *t;
@@ -95,11 +87,7 @@ rd_Z(Uint *n, int w, ftnlen len)
}
static int
-#ifdef KR_headers
-rd_I(n,w,len, base) Uint *n; int w; ftnlen len; register int base;
-#else
rd_I(Uint *n, int w, ftnlen len, register int base)
-#endif
{
int bad, ch, sign;
longint x = 0;
@@ -166,11 +154,7 @@ rd_I(Uint *n, int w, ftnlen len, register int base)
}
static int
-#ifdef KR_headers
-rd_L(n,w,len) ftnint *n; ftnlen len;
-#else
rd_L(ftnint *n, int w, ftnlen len)
-#endif
{ int ch, dot, lv;
if (w <= 0)
@@ -227,11 +211,7 @@ rd_L(ftnint *n, int w, ftnlen len)
}
static int
-#ifdef KR_headers
-rd_F(p, w, d, len) ufloat *p; ftnlen len;
-#else
rd_F(ufloat *p, int w, int d, ftnlen len)
-#endif
{
char s[FMAX+EXPMAXDIGS+4];
register int ch;
@@ -394,11 +374,7 @@ zero:
static int
-#ifdef KR_headers
-rd_A(p,len) char *p; ftnlen len;
-#else
rd_A(char *p, ftnlen len)
-#endif
{ int i,ch;
for(i=0;i<len;i++)
{ GET(ch);
@@ -407,11 +383,7 @@ rd_A(char *p, ftnlen len)
return(0);
}
static int
-#ifdef KR_headers
-rd_AW(p,w,len) char *p; ftnlen len;
-#else
rd_AW(char *p, int w, ftnlen len)
-#endif
{ int i,ch;
if(w>=len)
{ for(i=0;i<w-len;i++)
@@ -430,11 +402,7 @@ rd_AW(char *p, int w, ftnlen len)
return(0);
}
static int
-#ifdef KR_headers
-rd_H(n,s) char *s;
-#else
rd_H(int n, char *s)
-#endif
{ int i,ch;
for(i=0;i<n;i++)
if((ch=(*f__getn)())<0) return(ch);
@@ -442,11 +410,7 @@ rd_H(int n, char *s)
return(1);
}
static int
-#ifdef KR_headers
-rd_POS(s) char *s;
-#else
rd_POS(char *s)
-#endif
{ char quote;
int ch;
quote= *s++;
@@ -456,11 +420,7 @@ rd_POS(char *s)
else *s = ch=='\n'?' ':ch;
return(1);
}
-#ifdef KR_headers
-rd_ed(p,ptr,len) struct syl *p; char *ptr; ftnlen len;
-#else
rd_ed(struct syl *p, char *ptr, ftnlen len)
-#endif
{ int ch;
for(;f__cursor>0;f__cursor--) if((ch=(*f__getn)())<0) return(ch);
if(f__cursor<0)
@@ -519,11 +479,7 @@ rd_ed(struct syl *p, char *ptr, ftnlen len)
clearerr(f__cf);
return(errno);
}
-#ifdef KR_headers
-rd_ned(p) struct syl *p;
-#else
rd_ned(struct syl *p)
-#endif
{
switch(p->op)
{
diff --git a/libf2c/libI77/rewind.c b/libf2c/libI77/rewind.c
index 0691519..39c2dae 100644
--- a/libf2c/libI77/rewind.c
+++ b/libf2c/libI77/rewind.c
@@ -1,11 +1,7 @@
#include "config.h"
#include "f2c.h"
#include "fio.h"
-#ifdef KR_headers
-integer f_rew(a) alist *a;
-#else
integer f_rew(alist *a)
-#endif
{
unit *b;
if (f__init & 2)
diff --git a/libf2c/libI77/rsfe.c b/libf2c/libI77/rsfe.c
index 1be4531..5014665 100644
--- a/libf2c/libI77/rsfe.c
+++ b/libf2c/libI77/rsfe.c
@@ -44,11 +44,7 @@ x_rev(Void)
(void) xrd_SL();
return(0);
}
-#ifdef KR_headers
-integer s_rsfe(a) cilist *a; /* start */
-#else
integer s_rsfe(cilist *a) /* start */
-#endif
{ int n;
if(f__init != 1) f_init();
f__init = 3;
diff --git a/libf2c/libI77/rsli.c b/libf2c/libI77/rsli.c
index baf2ba5..d083d48 100644
--- a/libf2c/libI77/rsli.c
+++ b/libf2c/libI77/rsli.c
@@ -24,11 +24,7 @@ static int i_getc(Void)
}
static
-#ifdef KR_headers
-int i_ungetc(ch, f) int ch; FILE *f;
-#else
int i_ungetc(int ch, FILE *f)
-#endif
{
if (--f__recpos == f__svic->icirlen)
return '\n';
@@ -39,11 +35,7 @@ int i_ungetc(int ch, FILE *f)
}
static void
-#ifdef KR_headers
-c_lir(a) icilist *a;
-#else
c_lir(icilist *a)
-#endif
{
extern int l_eof;
if(f__init != 1) f_init();
@@ -67,11 +59,7 @@ c_lir(icilist *a)
}
-#ifdef KR_headers
-integer s_rsli(a) icilist *a;
-#else
integer s_rsli(icilist *a)
-#endif
{
f__lioproc = l_read;
f__lquit = 0;
@@ -84,13 +72,9 @@ integer s_rsli(icilist *a)
integer e_rsli(Void)
{ f__init = 1; return 0; }
-#ifdef KR_headers
-integer s_rsni(a) icilist *a;
-#else
extern int x_rsne(cilist*);
integer s_rsni(icilist *a)
-#endif
{
extern int nml_read;
integer rv;
diff --git a/libf2c/libI77/rsne.c b/libf2c/libI77/rsne.c
index a0d0bfe..78497e8 100644
--- a/libf2c/libI77/rsne.c
+++ b/libf2c/libI77/rsne.c
@@ -39,19 +39,6 @@
extern int f__lcount, nml_read;
extern t_getc(Void);
-#ifdef KR_headers
- extern char *malloc(), *memset();
-
-#ifdef ungetc
- static int
-un_getc(x,f__cf) int x; FILE *f__cf;
-{ return ungetc(x,f__cf); }
-#else
-#define un_getc ungetc
- extern int ungetc();
-#endif
-
-#else
#undef abs
#undef min
#undef max
@@ -66,14 +53,9 @@ un_getc(int x, FILE *f__cf)
#define un_getc ungetc
extern int ungetc(int, FILE*); /* for systems with a buggy stdio.h */
#endif
-#endif
static Vardesc *
-#ifdef KR_headers
-hash(ht, s) hashtab *ht; register char *s;
-#else
hash(hashtab *ht, register char *s)
-#endif
{
register int c, x;
register hashentry *h;
@@ -88,11 +70,7 @@ hash(hashtab *ht, register char *s)
}
hashtab *
-#ifdef KR_headers
-mk_hashtab(nl) Namelist *nl;
-#else
mk_hashtab(Namelist *nl)
-#endif
{
int nht, nv;
hashtab *ht;
@@ -164,11 +142,7 @@ nl_init(Void) {
#define Ungetc(x,y) (*l_ungetc)(x,y)
static int
-#ifdef KR_headers
-getname(s, slen) register char *s; int slen;
-#else
getname(register char *s, int slen)
-#endif
{
register char *se = s + slen - 1;
register int ch;
@@ -190,11 +164,7 @@ getname(register char *s, int slen)
}
static int
-#ifdef KR_headers
-getnum(chp, val) int *chp; ftnlen *val;
-#else
getnum(int *chp, ftnlen *val)
-#endif
{
register int ch, sign;
register ftnlen x;
@@ -224,12 +194,7 @@ getnum(int *chp, ftnlen *val)
}
static int
-#ifdef KR_headers
-getdimen(chp, d, delta, extent, x1)
- int *chp; dimen *d; ftnlen delta, extent, *x1;
-#else
getdimen(int *chp, dimen *d, ftnlen delta, ftnlen extent, ftnlen *x1)
-#endif
{
register int k;
ftnlen x2, x3;
@@ -263,11 +228,7 @@ getdimen(int *chp, dimen *d, ftnlen delta, ftnlen extent, ftnlen *x1)
#ifndef No_Namelist_Questions
static Void
-#ifdef KR_headers
-print_ne(a) cilist *a;
-#else
print_ne(cilist *a)
-#endif
{
flag intext = f__external;
int rpsave = f__recpos;
@@ -289,11 +250,7 @@ print_ne(cilist *a)
static char where0[] = "namelist read start ";
-#ifdef KR_headers
-x_rsne(a) cilist *a;
-#else
x_rsne(cilist *a)
-#endif
{
int ch, got1, k, n, nd, quote, readall;
Namelist *nl;
@@ -582,11 +539,7 @@ x_rsne(cilist *a)
}
integer
-#ifdef KR_headers
-s_rsne(a) cilist *a;
-#else
s_rsne(cilist *a)
-#endif
{
extern int l_eof;
int n;
diff --git a/libf2c/libI77/sfe.c b/libf2c/libI77/sfe.c
index b67d823..c036751 100644
--- a/libf2c/libI77/sfe.c
+++ b/libf2c/libI77/sfe.c
@@ -12,11 +12,7 @@ integer e_rsfe(Void)
f__fmtbuf=NULL;
return(n);
}
-#ifdef KR_headers
-c_sfe(a) cilist *a; /* check */
-#else
c_sfe(cilist *a) /* check */
-#endif
{ unit *p;
if(a->ciunit >= MXUNIT || a->ciunit<0)
err(a->cierr,101,"startio");
diff --git a/libf2c/libI77/sue.c b/libf2c/libI77/sue.c
index 8865054..79e251d 100644
--- a/libf2c/libI77/sue.c
+++ b/libf2c/libI77/sue.c
@@ -4,11 +4,7 @@
extern uiolen f__reclen;
off_t f__recloc;
-#ifdef KR_headers
-c_sue(a) cilist *a;
-#else
c_sue(cilist *a)
-#endif
{
f__external=f__sequential=1;
f__formatted=0;
@@ -23,11 +19,7 @@ c_sue(cilist *a)
if(!f__curunit->useek) err(a->cierr,103,"sue");
return(0);
}
-#ifdef KR_headers
-integer s_rsue(a) cilist *a;
-#else
integer s_rsue(cilist *a)
-#endif
{
int n;
if(f__init != 1) f_init();
@@ -48,11 +40,7 @@ integer s_rsue(cilist *a)
}
return(0);
}
-#ifdef KR_headers
-integer s_wsue(a) cilist *a;
-#else
integer s_wsue(cilist *a)
-#endif
{
int n;
if(f__init != 1) f_init();
diff --git a/libf2c/libI77/uio.c b/libf2c/libI77/uio.c
index ea733ce..d282ee4 100644
--- a/libf2c/libI77/uio.c
+++ b/libf2c/libI77/uio.c
@@ -3,11 +3,7 @@
#include <sys/types.h>
uiolen f__reclen;
-#ifdef KR_headers
-do_us(number,ptr,len) ftnint *number; char *ptr; ftnlen len;
-#else
do_us(ftnint *number, char *ptr, ftnlen len)
-#endif
{
if(f__reading)
{
@@ -25,11 +21,7 @@ do_us(ftnint *number, char *ptr, ftnlen len)
return(0);
}
}
-#ifdef KR_headers
-integer do_ud(number,ptr,len) ftnint *number; char *ptr; ftnlen len;
-#else
integer do_ud(ftnint *number, char *ptr, ftnlen len)
-#endif
{
f__recpos += (int)(*number * len);
if(f__recpos > f__curunit->url && f__curunit->url!=1)
@@ -37,11 +29,7 @@ integer do_ud(ftnint *number, char *ptr, ftnlen len)
if(f__reading)
{
#ifdef Pad_UDread
-#ifdef KR_headers
- int i;
-#else
size_t i;
-#endif
if (!(i = fread(ptr,(size_t)len,(size_t)(*number),f__cf))
&& !(f__recpos - *number*len))
err(f__elist->cierr,EOF,"do_ud");
@@ -57,11 +45,7 @@ integer do_ud(ftnint *number, char *ptr, ftnlen len)
(void) fwrite(ptr,(size_t)len,(size_t)(*number),f__cf);
return(0);
}
-#ifdef KR_headers
-integer do_uio(number,ptr,len) ftnint *number; char *ptr; ftnlen len;
-#else
integer do_uio(ftnint *number, char *ptr, ftnlen len)
-#endif
{
if(f__sequential)
return(do_us(number,ptr,len));
diff --git a/libf2c/libI77/util.c b/libf2c/libI77/util.c
index 8280ac0..ff7051e 100644
--- a/libf2c/libI77/util.c
+++ b/libf2c/libI77/util.c
@@ -9,11 +9,7 @@
#include "fio.h"
VOID
-#ifdef KR_headers
-g_char(a,alen,b) char *a,*b; ftnlen alen;
-#else
g_char(char *a, ftnlen alen, char *b)
-#endif
{
char *x = a + alen, *y = b + alen;
@@ -31,21 +27,13 @@ g_char(char *a, ftnlen alen, char *b)
}
VOID
-#ifdef KR_headers
-b_char(a,b,blen) char *a,*b; ftnlen blen;
-#else
b_char(char *a, char *b, ftnlen blen)
-#endif
{ int i;
for(i=0;i<blen && *a!=0;i++) *b++= *a++;
for(;i<blen;i++) *b++=' ';
}
#ifndef NON_UNIX_STDIO
-#ifdef KR_headers
-long f__inode(a, dev) char *a; int *dev;
-#else
long f__inode(char *a, int *dev)
-#endif
{ struct stat x;
if(stat(a,&x)<0) return(-1);
*dev = x.st_dev;
diff --git a/libf2c/libI77/wref.c b/libf2c/libI77/wref.c
index a10bcaa..677364c 100644
--- a/libf2c/libI77/wref.c
+++ b/libf2c/libI77/wref.c
@@ -4,22 +4,16 @@
#include <ctype.h>
#endif
-#ifndef KR_headers
#undef abs
#undef min
#undef max
#include <stdlib.h>
#include <string.h>
-#endif
#include "fmt.h"
#include "fp.h"
-#ifdef KR_headers
-wrt_E(p,w,d,e,len) ufloat *p; ftnlen len;
-#else
wrt_E(ufloat *p, int w, int d, int e, ftnlen len)
-#endif
{
char buf[FMAX+EXPMAXDIGS+4], *s, *se;
int d1, delta, e1, i, sign, signspace;
@@ -191,11 +185,7 @@ nogood:
return 0;
}
-#ifdef KR_headers
-wrt_F(p,w,d,len) ufloat *p; ftnlen len;
-#else
wrt_F(ufloat *p, int w, int d, ftnlen len)
-#endif
{
int d1, sign, n;
double x;
diff --git a/libf2c/libI77/wrtfmt.c b/libf2c/libI77/wrtfmt.c
index 37006ba..5fcab71 100644
--- a/libf2c/libI77/wrtfmt.c
+++ b/libf2c/libI77/wrtfmt.c
@@ -66,11 +66,7 @@ mv_cur(Void) /* shouldn't use fseek because it insists on calling fflush */
}
static int
-#ifdef KR_headers
-wrt_Z(n,w,minlen,len) Uint *n; int w, minlen; ftnlen len;
-#else
wrt_Z(Uint *n, int w, int minlen, ftnlen len)
-#endif
{
register char *s, *se;
register int i, w1;
@@ -121,11 +117,7 @@ wrt_Z(Uint *n, int w, int minlen, ftnlen len)
}
static int
-#ifdef KR_headers
-wrt_I(n,w,len, base) Uint *n; ftnlen len; register int base;
-#else
wrt_I(Uint *n, int w, ftnlen len, register int base)
-#endif
{ int ndigit,sign,spare,i;
longint x;
char *ans;
@@ -149,11 +141,7 @@ wrt_I(Uint *n, int w, ftnlen len, register int base)
return(0);
}
static int
-#ifdef KR_headers
-wrt_IM(n,w,m,len,base) Uint *n; ftnlen len; int base;
-#else
wrt_IM(Uint *n, int w, int m, ftnlen len, int base)
-#endif
{ int ndigit,sign,spare,i,xsign;
longint x;
char *ans;
@@ -186,11 +174,7 @@ wrt_IM(Uint *n, int w, int m, ftnlen len, int base)
return(0);
}
static int
-#ifdef KR_headers
-wrt_AP(s) char *s;
-#else
wrt_AP(char *s)
-#endif
{ char quote;
int i;
@@ -205,11 +189,7 @@ wrt_AP(char *s)
return(1);
}
static int
-#ifdef KR_headers
-wrt_H(a,s) char *s;
-#else
wrt_H(int a, char *s)
-#endif
{
int i;
@@ -218,11 +198,7 @@ wrt_H(int a, char *s)
while(a--) (*f__putn)(*s++);
return(1);
}
-#ifdef KR_headers
-wrt_L(n,len, sz) Uint *n; ftnlen sz;
-#else
wrt_L(Uint *n, int len, ftnlen sz)
-#endif
{ int i;
long x;
if(sizeof(long)==sz) x=n->il;
@@ -235,21 +211,13 @@ wrt_L(Uint *n, int len, ftnlen sz)
return(0);
}
static int
-#ifdef KR_headers
-wrt_A(p,len) char *p; ftnlen len;
-#else
wrt_A(char *p, ftnlen len)
-#endif
{
while(len-- > 0) (*f__putn)(*p++);
return(0);
}
static int
-#ifdef KR_headers
-wrt_AW(p,w,len) char * p; ftnlen len;
-#else
wrt_AW(char * p, int w, ftnlen len)
-#endif
{
while(w>len)
{ w--;
@@ -261,11 +229,7 @@ wrt_AW(char * p, int w, ftnlen len)
}
static int
-#ifdef KR_headers
-wrt_G(p,w,d,e,len) ufloat *p; ftnlen len;
-#else
wrt_G(ufloat *p, int w, int d, int e, ftnlen len)
-#endif
{ double up = 1,x;
int i=0,oldscale,n,j;
x = len==sizeof(real)?p->pf:p->pd;
@@ -290,11 +254,7 @@ wrt_G(ufloat *p, int w, int d, int e, ftnlen len)
}
return(wrt_E(p,w,d,e,len));
}
-#ifdef KR_headers
-w_ed(p,ptr,len) struct syl *p; char *ptr; ftnlen len;
-#else
w_ed(struct syl *p, char *ptr, ftnlen len)
-#endif
{
int i;
@@ -336,11 +296,7 @@ w_ed(struct syl *p, char *ptr, ftnlen len)
return(wrt_Z((Uint *)ptr,p->p1,p->p2.i[0],len));
}
}
-#ifdef KR_headers
-w_ned(p) struct syl *p;
-#else
w_ned(struct syl *p)
-#endif
{
switch(p->op)
{
diff --git a/libf2c/libI77/wsfe.c b/libf2c/libI77/wsfe.c
index 490231a..c4b1532 100644
--- a/libf2c/libI77/wsfe.c
+++ b/libf2c/libI77/wsfe.c
@@ -40,11 +40,7 @@ xw_rev(Void)
return n;
}
-#ifdef KR_headers
-integer s_wsfe(a) cilist *a; /*start*/
-#else
integer s_wsfe(cilist *a) /*start*/
-#endif
{ int n;
if(f__init != 1) f_init();
f__init = 3;
diff --git a/libf2c/libI77/wsle.c b/libf2c/libI77/wsle.c
index 386e867..82c3326 100644
--- a/libf2c/libI77/wsle.c
+++ b/libf2c/libI77/wsle.c
@@ -5,11 +5,7 @@
#include "lio.h"
#include "string.h"
-#ifdef KR_headers
-integer s_wsle(a) cilist *a;
-#else
integer s_wsle(cilist *a)
-#endif
{
int n;
if(n=c_le(a)) return(n);
diff --git a/libf2c/libI77/wsne.c b/libf2c/libI77/wsne.c
index ae3f817..7c08925 100644
--- a/libf2c/libI77/wsne.c
+++ b/libf2c/libI77/wsne.c
@@ -3,11 +3,7 @@
#include "lio.h"
integer
-#ifdef KR_headers
-s_wsne(a) cilist *a;
-#else
s_wsne(cilist *a)
-#endif
{
int n;
diff --git a/libf2c/libI77/xwsne.c b/libf2c/libI77/xwsne.c
index 96fdd02..525fcdb 100644
--- a/libf2c/libI77/xwsne.c
+++ b/libf2c/libI77/xwsne.c
@@ -13,14 +13,10 @@ nl_donewrec(Void)
PUT(' ');
}
-#ifdef KR_headers
-x_wsne(a) cilist *a;
-#else
#include <string.h>
VOID
x_wsne(cilist *a)
-#endif
{
Namelist *nl;
char *s;