Commit 4d85a6fe by Kaveh R. Ghazi Committed by Kaveh Ghazi

*: Delete KR_headers cruft.

	* libF77/*: Delete KR_headers cruft.
	* libI77/*: Likewise.
	* libU77/*: Likewise.

From-SVN: r54132
parent 1e730c5c
Fri May 31 21:50:01 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libF77/*: Delete KR_headers cruft.
* libI77/*: Likewise.
* libU77/*: Likewise.
Thu May 30 23:04:52 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (WARN_CFLAGS): New.
......
......@@ -6,13 +6,6 @@
static integer memfailure = 3;
#ifdef KR_headers
extern char *malloc();
extern void G77_exit_0 ();
char *
F77_aloc(Len, whence) integer Len; char *whence;
#else
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
......@@ -24,7 +17,6 @@ extern void G77_exit_0 (integer*);
char *
F77_aloc(integer Len, char *whence)
#endif
{
char *rv;
unsigned int uLen = (unsigned int) Len; /* for K&R C */
......
#include <stdio.h>
#include "f2c.h"
#ifdef KR_headers
extern VOID sig_die();
int G77_abort_0 ()
#else
extern void sig_die(char*,int);
int G77_abort_0 (void)
#endif
{
sig_die("Fortran abort routine called", 1);
return 0; /* not reached */
......
#include "f2c.h"
#ifdef KR_headers
extern double f__cabs();
double c_abs(z) complex *z;
#else
extern double f__cabs(double, double);
double c_abs(complex *z)
#endif
{
return( f__cabs( z->r, z->i ) );
}
#include "f2c.h"
#ifdef KR_headers
extern double sin(), cos(), sinh(), cosh();
VOID c_cos(r, z) complex *r, *z;
#else
#undef abs
#include "math.h"
void c_cos(complex *r, complex *z)
#endif
{
double zi = z->i, zr = z->r;
r->r = cos(zr) * cosh(zi);
......
#include "f2c.h"
#ifdef KR_headers
extern VOID sig_die();
VOID c_div(c, a, b)
complex *a, *b, *c;
#else
extern void sig_die(char*,int);
void c_div(complex *c, complex *a, complex *b)
#endif
{
double ratio, den;
double abr, abi, cr;
......
#include "f2c.h"
#ifdef KR_headers
extern double exp(), cos(), sin();
VOID c_exp(r, z) complex *r, *z;
#else
#undef abs
#include "math.h"
void c_exp(complex *r, complex *z)
#endif
{
double expx, zi = z->i;
......
#include "f2c.h"
#ifdef KR_headers
extern double log(), f__cabs(), atan2();
VOID c_log(r, z) complex *r, *z;
#else
#undef abs
#include "math.h"
extern double f__cabs(double, double);
void c_log(complex *r, complex *z)
#endif
{
double zi, zr;
r->i = atan2(zi = z->i, zr = z->r);
......
#include "f2c.h"
#ifdef KR_headers
extern double sin(), cos(), sinh(), cosh();
VOID c_sin(r, z) complex *r, *z;
#else
#undef abs
#include "math.h"
void c_sin(complex *r, complex *z)
#endif
{
double zi = z->i, zr = z->r;
r->r = sin(zr) * cosh(zi);
......
#include "f2c.h"
#ifdef KR_headers
extern double sqrt(), f__cabs();
VOID c_sqrt(r, z) complex *r, *z;
#else
#undef abs
#include "math.h"
extern double f__cabs(double, double);
void c_sqrt(complex *r, complex *z)
#endif
{
double mag, t;
double zi = z->i, zr = z->r;
......
#ifdef KR_headers
extern double sqrt();
double f__cabs(real, imag) double real, imag;
#else
#undef abs
#include <math.h>
double f__cabs(double real, double imag)
#endif
{
double temp;
......
......@@ -28,7 +28,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
sitefile=
srcdir=
target=NONE
verbose=
......@@ -143,7 +142,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
......@@ -314,11 +312,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-site-file | --site-file | --site-fil | --site-fi | --site-f)
ac_prev=sitefile ;;
-site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
sitefile="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
......@@ -484,16 +477,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$sitefile"; then
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
else
CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
......@@ -541,7 +530,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:545: checking for $ac_word" >&5
echo "configure:534: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -571,7 +560,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:575: checking for $ac_word" >&5
echo "configure:564: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -622,7 +611,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:626: checking for $ac_word" >&5
echo "configure:615: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -655,7 +644,7 @@ fi
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:659: checking whether we are using GNU C" >&5
echo "configure:648: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -664,7 +653,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
......@@ -683,7 +672,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:687: checking whether ${CC-cc} accepts -g" >&5
echo "configure:676: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -726,7 +715,7 @@ else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:730: checking for $ac_word" >&5
echo "configure:719: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
......@@ -755,7 +744,7 @@ fi
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:759: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:748: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -785,7 +774,7 @@ fi
# Sanity check for the cross-compilation case:
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:789: checking how to run the C preprocessor" >&5
echo "configure:778: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
......@@ -800,13 +789,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 804 "configure"
#line 793 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -817,13 +806,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 821 "configure"
#line 810 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -834,13 +823,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 838 "configure"
#line 827 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
......@@ -866,17 +855,17 @@ echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for stdio.h""... $ac_c" 1>&6
echo "configure:870: checking for stdio.h" >&5
echo "configure:859: checking for stdio.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 875 "configure"
#line 864 "configure"
#include "confdefs.h"
#include <stdio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -904,12 +893,12 @@ fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:908: checking for ANSI C header files" >&5
echo "configure:897: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 913 "configure"
#line 902 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
......@@ -917,7 +906,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -934,7 +923,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 938 "configure"
#line 927 "configure"
#include "confdefs.h"
#include <string.h>
EOF
......@@ -952,7 +941,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 956 "configure"
#line 945 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
......@@ -973,7 +962,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 977 "configure"
#line 966 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
......@@ -984,7 +973,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
......@@ -1007,14 +996,13 @@ EOF
fi
echo $ac_n "checking for posix""... $ac_c" 1>&6
echo "configure:1013: checking for posix" >&5
echo "configure:1001: 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 1018 "configure"
#line 1006 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
......@@ -1040,12 +1028,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:1044: checking for GNU library" >&5
echo "configure:1032: 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 1049 "configure"
#line 1037 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef __GNU_LIBRARY__
......@@ -1068,12 +1056,12 @@ fi
echo "$ac_t""$g77_cv_lib_gnu" 1>&6
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:1072: checking return type of signal handlers" >&5
echo "configure:1060: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1077 "configure"
#line 1065 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
......@@ -1090,7 +1078,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
......@@ -1111,12 +1099,12 @@ EOF
# we'll get atexit by default
if test $ac_cv_header_stdc != yes; then
echo $ac_n "checking for atexit""... $ac_c" 1>&6
echo "configure:1115: checking for atexit" >&5
echo "configure:1103: checking for atexit" >&5
if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1120 "configure"
#line 1108 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char atexit(); below. */
......@@ -1139,7 +1127,7 @@ atexit();
; return 0; }
EOF
if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_atexit=yes"
else
......@@ -1164,12 +1152,12 @@ else
EOF
echo $ac_n "checking for onexit""... $ac_c" 1>&6
echo "configure:1168: checking for onexit" >&5
echo "configure:1156: checking for onexit" >&5
if eval "test \"`echo '$''{'ac_cv_func_onexit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1173 "configure"
#line 1161 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char onexit(); below. */
......@@ -1192,7 +1180,7 @@ onexit();
; return 0; }
EOF
if { (eval echo configure:1196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_onexit=yes"
else
......@@ -1210,12 +1198,12 @@ if eval "test \"`echo '$ac_cv_func_'onexit`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for on_exit""... $ac_c" 1>&6
echo "configure:1214: checking for on_exit" >&5
echo "configure:1202: checking for on_exit" >&5
if eval "test \"`echo '$''{'ac_cv_func_on_exit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1219 "configure"
#line 1207 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char on_exit(); below. */
......@@ -1238,7 +1226,7 @@ on_exit();
; return 0; }
EOF
if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_on_exit=yes"
else
......@@ -1268,7 +1256,7 @@ else true
fi
echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6
echo "configure:1272: checking for drem in -lm" >&5
echo "configure:1260: checking for drem in -lm" >&5
ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1276,7 +1264,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1280 "configure"
#line 1268 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1287,7 +1275,7 @@ int main() {
drem()
; return 0; }
EOF
if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......
......@@ -56,17 +56,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,
......
#include "f2c.h"
#ifdef KR_headers
double d_abs(x) doublereal *x;
#else
double d_abs(doublereal *x)
#endif
{
if(*x >= 0)
return(*x);
......
#include "f2c.h"
#ifdef KR_headers
double acos();
double d_acos(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_acos(doublereal *x)
#endif
{
return( acos(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double asin();
double d_asin(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_asin(doublereal *x)
#endif
{
return( asin(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double atan();
double d_atan(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_atan(doublereal *x)
#endif
{
return( atan(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double atan2();
double d_atn2(x,y) doublereal *x, *y;
#else
#undef abs
#include <math.h>
double d_atn2(doublereal *x, doublereal *y)
#endif
{
return( atan2(*x,*y) );
}
#include "f2c.h"
VOID
#ifdef KR_headers
d_cnjg(r, z) doublecomplex *r, *z;
#else
d_cnjg(doublecomplex *r, doublecomplex *z)
#endif
{
doublereal zi = z->i;
r->r = z->r;
......
#include "f2c.h"
#ifdef KR_headers
double cos();
double d_cos(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_cos(doublereal *x)
#endif
{
return( cos(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double cosh();
double d_cosh(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_cosh(doublereal *x)
#endif
{
return( cosh(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double d_dim(a,b) doublereal *a, *b;
#else
double d_dim(doublereal *a, doublereal *b)
#endif
{
return( *a > *b ? *a - *b : 0);
}
#include "f2c.h"
#ifdef KR_headers
double exp();
double d_exp(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_exp(doublereal *x)
#endif
{
return( exp(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double d_imag(z) doublecomplex *z;
#else
double d_imag(doublecomplex *z)
#endif
{
return(z->i);
}
#include "f2c.h"
#ifdef KR_headers
double floor();
double d_int(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_int(doublereal *x)
#endif
{
return( (*x>0) ? floor(*x) : -floor(- *x) );
}
......@@ -2,14 +2,9 @@
#define log10e 0.43429448190325182765
#ifdef KR_headers
double log();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_lg10(doublereal *x)
#endif
{
return( log10e * log(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double log();
double d_log(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_log(doublereal *x)
#endif
{
return( log(*x) );
}
#include "f2c.h"
#ifdef KR_headers
#ifdef IEEE_drem
double drem();
#else
double floor();
#endif
double d_mod(x,y) doublereal *x, *y;
#else
#ifdef IEEE_drem
double drem(double, double);
#else
......@@ -15,7 +7,6 @@ double drem(double, double);
#include <math.h>
#endif
double d_mod(doublereal *x, doublereal *y)
#endif
{
#ifdef IEEE_drem
double xa, ya, z;
......
#include "f2c.h"
#ifdef KR_headers
double floor();
double d_nint(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_nint(doublereal *x)
#endif
{
return( (*x)>=0 ?
floor(*x + .5) : -floor(.5 - *x) );
......
#include "f2c.h"
#ifdef KR_headers
double d_prod(x,y) real *x, *y;
#else
double d_prod(real *x, real *y)
#endif
{
return( (*x) * (*y) );
}
#include "f2c.h"
#ifdef KR_headers
double d_sign(a,b) doublereal *a, *b;
#else
double d_sign(doublereal *a, doublereal *b)
#endif
{
double x;
x = (*a >= 0 ? *a : - *a);
......
#include "f2c.h"
#ifdef KR_headers
double sin();
double d_sin(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_sin(doublereal *x)
#endif
{
return( sin(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double sinh();
double d_sinh(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_sinh(doublereal *x)
#endif
{
return( sinh(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double sqrt();
double d_sqrt(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_sqrt(doublereal *x)
#endif
{
return( sqrt(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double tan();
double d_tan(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_tan(doublereal *x)
#endif
{
return( tan(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double tanh();
double d_tanh(x) doublereal *x;
#else
#undef abs
#include <math.h>
double d_tanh(doublereal *x)
#endif
{
return( tanh(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double erf();
double G77_derf_0 (x) doublereal *x;
#else
extern double erf(double);
double G77_derf_0 (doublereal *x)
#endif
{
return( erf(*x) );
}
#include "f2c.h"
#ifdef KR_headers
extern double erfc();
double G77_derfc_0 (x) doublereal *x;
#else
extern double erfc(double);
double G77_derfc_0 (doublereal *x)
#endif
{
return( erfc(*x) );
}
......@@ -24,11 +24,7 @@
#endif
double
#ifdef KR_headers
dtime_(tarray) float *tarray;
#else
dtime_(float *tarray)
#endif
{
#ifdef USE_CLOCK
#ifndef CLOCKS_PER_SECOND
......
......@@ -6,13 +6,8 @@
#define M ( (long) (sizeof(long) - 1) )
#define EVEN(x) ( ( (x)+ M) & (~M) )
#ifdef KR_headers
extern VOID s_copy();
G77_ef1asc_0 (a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb;
#else
extern void s_copy(char*,char*,ftnlen,ftnlen);
int G77_ef1asc_0 (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb)
#endif
{
s_copy( (char *)a, (char *)b, EVEN(*la), *lb );
return 0; /* ignored return value */
......
......@@ -2,13 +2,8 @@
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
integer G77_ef1cmc_0 (a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb;
#else
extern integer s_cmp(char*,char*,ftnlen,ftnlen);
integer G77_ef1cmc_0 (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb)
#endif
{
return( s_cmp( (char *)a, (char *)b, *la, *lb) );
}
#include "f2c.h"
#ifdef KR_headers
double erf();
double G77_erf_0 (x) real *x;
#else
extern double erf(double);
double G77_erf_0 (real *x)
#endif
{
return( erf(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double erfc();
double G77_erfc_0 (x) real *x;
#else
extern double erfc(double);
double G77_erfc_0 (real *x)
#endif
{
return( erfc(*x) );
}
......@@ -24,11 +24,7 @@
#endif
double
#ifdef KR_headers
etime_(tarray) float *tarray;
#else
etime_(float *tarray)
#endif
{
#ifdef USE_CLOCK
#ifndef CLOCKS_PER_SECOND
......
......@@ -12,20 +12,14 @@
#undef abs
#undef min
#undef max
#ifndef KR_headers
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
extern void f_exit(void);
#endif
void
#ifdef KR_headers
G77_exit_0 (rc) integer *rc;
#else
G77_exit_0 (integer *rc)
#endif
{
#ifdef NO_ONEXIT
f_exit();
......
......@@ -6,11 +6,7 @@
* variable argument c
*/
#ifdef KR_headers
VOID G77_getarg_0 (n, s, ls) ftnint *n; register char *s; ftnlen ls;
#else
void G77_getarg_0 (ftnint *n, register char *s, ftnlen ls)
#endif
{
extern int f__xargc;
extern char **f__xargv;
......
#include "f2c.h"
#undef abs
#ifdef KR_headers
extern char *F77_aloc(), *getenv();
#else
#include <stdlib.h>
#include <string.h>
extern char *F77_aloc(ftnlen, char*);
#endif
/*
* getenv - f77 subroutine to return environment variables
......@@ -20,13 +16,8 @@ extern char *F77_aloc(ftnlen, char*);
* if ENV_NAME is not defined
*/
#ifdef KR_headers
VOID
G77_getenv_0 (fname, value, flen, vlen) char *value, *fname; ftnlen vlen, flen;
#else
void
G77_getenv_0 (char *fname, char *value, ftnlen flen, ftnlen vlen)
#endif
{
char buf[256], *ep, *fp;
integer i;
......
#include "f2c.h"
#ifdef KR_headers
shortint h_abs(x) shortint *x;
#else
shortint h_abs(shortint *x)
#endif
{
if(*x >= 0)
return(*x);
......
#include "f2c.h"
#ifdef KR_headers
shortint h_dim(a,b) shortint *a, *b;
#else
shortint h_dim(shortint *a, shortint *b)
#endif
{
return( *a > *b ? *a - *b : 0);
}
#include "f2c.h"
#ifdef KR_headers
double floor();
shortint h_dnnt(x) doublereal *x;
#else
#undef abs
#include <math.h>
shortint h_dnnt(doublereal *x)
#endif
{
return (shortint)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));
}
#include "f2c.h"
#ifdef KR_headers
shortint h_indx(a, b, la, lb) char *a, *b; ftnlen la, lb;
#else
shortint h_indx(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
ftnlen i, n;
char *s, *t, *bend;
......
#include "f2c.h"
#ifdef KR_headers
shortint h_len(s, n) char *s; ftnlen n;
#else
shortint h_len(char *s, ftnlen n)
#endif
{
return(n);
}
#include "f2c.h"
#ifdef KR_headers
shortint h_mod(a,b) short *a, *b;
#else
shortint h_mod(short *a, short *b)
#endif
{
return( *a % *b);
}
#include "f2c.h"
#ifdef KR_headers
double floor();
shortint h_nint(x) real *x;
#else
#undef abs
#include <math.h>
shortint h_nint(real *x)
#endif
{
return (shortint)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
}
#include "f2c.h"
#ifdef KR_headers
shortint h_sign(a,b) shortint *a, *b;
#else
shortint h_sign(shortint *a, shortint *b)
#endif
{
shortint x;
x = (*a >= 0 ? *a : - *a);
......
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
shortlogical hl_ge(a,b,la,lb) char *a, *b; ftnlen la, lb;
#else
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
shortlogical hl_ge(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
return(s_cmp(a,b,la,lb) >= 0);
}
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
shortlogical hl_gt(a,b,la,lb) char *a, *b; ftnlen la, lb;
#else
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
shortlogical hl_gt(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
return(s_cmp(a,b,la,lb) > 0);
}
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
shortlogical hl_le(a,b,la,lb) char *a, *b; ftnlen la, lb;
#else
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
shortlogical hl_le(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
return(s_cmp(a,b,la,lb) <= 0);
}
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
shortlogical hl_lt(a,b,la,lb) char *a, *b; ftnlen la, lb;
#else
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
shortlogical hl_lt(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
return(s_cmp(a,b,la,lb) < 0);
}
#include "f2c.h"
#ifdef KR_headers
integer i_abs(x) integer *x;
#else
integer i_abs(integer *x)
#endif
{
if(*x >= 0)
return(*x);
......
#include "f2c.h"
#ifdef KR_headers
integer i_dim(a,b) integer *a, *b;
#else
integer i_dim(integer *a, integer *b)
#endif
{
return( *a > *b ? *a - *b : 0);
}
#include "f2c.h"
#ifdef KR_headers
double floor();
integer i_dnnt(x) doublereal *x;
#else
#undef abs
#include <math.h>
integer i_dnnt(doublereal *x)
#endif
{
return (integer)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));
}
#include "f2c.h"
#ifdef KR_headers
integer i_indx(a, b, la, lb) char *a, *b; ftnlen la, lb;
#else
integer i_indx(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
ftnlen i, n;
char *s, *t, *bend;
......
#include "f2c.h"
#ifdef KR_headers
integer i_len(s, n) char *s; ftnlen n;
#else
integer i_len(char *s, ftnlen n)
#endif
{
return(n);
}
#include "f2c.h"
#ifdef KR_headers
integer i_mod(a,b) integer *a, *b;
#else
integer i_mod(integer *a, integer *b)
#endif
{
return( *a % *b);
}
#include "f2c.h"
#ifdef KR_headers
double floor();
integer i_nint(x) real *x;
#else
#undef abs
#include <math.h>
integer i_nint(real *x)
#endif
{
return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
}
#include "f2c.h"
#ifdef KR_headers
integer i_sign(a,b) integer *a, *b;
#else
integer i_sign(integer *a, integer *b)
#endif
{
integer x;
x = (*a >= 0 ? *a : - *a);
......
#include "f2c.h"
#ifdef KR_headers
ftnint G77_iargc_0 ()
#else
ftnint G77_iargc_0 (void)
#endif
{
extern int f__xargc;
return ( f__xargc - 1 );
......
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
logical l_ge(a,b,la,lb) char *a, *b; ftnlen la, lb;
#else
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
logical l_ge(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
return(s_cmp(a,b,la,lb) >= 0);
}
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
logical l_gt(a,b,la,lb) char *a, *b; ftnlen la, lb;
#else
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
logical l_gt(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
return(s_cmp(a,b,la,lb) > 0);
}
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
logical l_le(a,b,la,lb) char *a, *b; ftnlen la, lb;
#else
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
logical l_le(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
return(s_cmp(a,b,la,lb) <= 0);
}
#include "f2c.h"
#ifdef KR_headers
extern integer s_cmp();
logical l_lt(a,b,la,lb) char *a, *b; ftnlen la, lb;
#else
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
logical l_lt(char *a, char *b, ftnlen la, ftnlen lb)
#endif
{
return(s_cmp(a,b,la,lb) < 0);
}
......@@ -5,11 +5,7 @@
#endif
integer
#ifdef KR_headers
lbit_bits(a, b, len) integer a, b, len;
#else
lbit_bits(integer a, integer b, integer len)
#endif
{
/* Assume 2's complement arithmetic */
......@@ -23,11 +19,7 @@ lbit_bits(integer a, integer b, integer len)
}
integer
#ifdef KR_headers
lbit_cshift(a, b, len) integer a, b, len;
#else
lbit_cshift(integer a, integer b, integer len)
#endif
{
unsigned long x, y, z;
......
#include "f2c.h"
integer
#ifdef KR_headers
lbit_shift(a, b) integer a; integer b;
#else
lbit_shift(integer a, integer b)
#endif
{
return b >= 0 ? a << b : (integer)((uinteger)a >> -b);
}
......@@ -3,10 +3,8 @@
#include <stdio.h>
#include "signal1.h"
#ifndef KR_headers
#undef VOID
#include <stdlib.h>
#endif
#ifndef VOID
#define VOID void
......@@ -16,41 +14,20 @@
extern "C" {
#endif
#ifdef NO__STDC
#define ONEXIT onexit
extern VOID f_exit();
#else
#ifndef KR_headers
extern void f_exit(void);
#ifndef NO_ONEXIT
#define ONEXIT atexit
extern int atexit(void (*)(void));
#endif
#else
#ifndef NO_ONEXIT
#define ONEXIT onexit
extern VOID f_exit();
#endif
#endif
#endif
#ifdef KR_headers
extern VOID f_init();
extern int MAIN__();
#else
extern void f_init(void);
extern int MAIN__(void);
#endif
#ifdef __cplusplus
}
#endif
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
main(int argc, char **argv)
#endif
{
f_setarg(argc, argv);
f_setsig();
......
#include "f2c.h"
#ifdef KR_headers
VOID pow_ci(p, a, b) /* p = a**b */
complex *p, *a; integer *b;
#else
extern void pow_zi(doublecomplex*, doublecomplex*, integer*);
void pow_ci(complex *p, complex *a, integer *b) /* p = a**b */
#endif
{
doublecomplex p1, a1;
......
#include "f2c.h"
#ifdef KR_headers
double pow();
double pow_dd(ap, bp) doublereal *ap, *bp;
#else
#undef abs
#include <math.h>
double pow_dd(doublereal *ap, doublereal *bp)
#endif
{
return(pow(*ap, *bp) );
}
#include "f2c.h"
#ifdef KR_headers
double pow_di(ap, bp) doublereal *ap; integer *bp;
#else
double pow_di(doublereal *ap, integer *bp)
#endif
{
double pow, x;
integer n;
......
#include "f2c.h"
#ifdef KR_headers
shortint pow_hh(ap, bp) shortint *ap, *bp;
#else
shortint pow_hh(shortint *ap, shortint *bp)
#endif
{
shortint pow, x, n;
unsigned u;
......
#include "f2c.h"
#ifdef KR_headers
integer pow_ii(ap, bp) integer *ap, *bp;
#else
integer pow_ii(integer *ap, integer *bp)
#endif
{
integer pow, x, n;
unsigned long u;
......
#include "f2c.h"
#ifdef KR_headers
longint pow_qq(ap, bp) longint *ap, *bp;
#else
longint pow_qq(longint *ap, longint *bp)
#endif
{
longint pow, x, n;
unsigned long long u; /* system-dependent */
......
#include "f2c.h"
#ifdef KR_headers
double pow_ri(ap, bp) real *ap; integer *bp;
#else
double pow_ri(real *ap, integer *bp)
#endif
{
double pow, x;
integer n;
......
#include "f2c.h"
#ifdef KR_headers
VOID pow_zi(p, a, b) /* p = a**b */
doublecomplex *p, *a; integer *b;
#else
extern void z_div(doublecomplex*, doublecomplex*, doublecomplex*);
void pow_zi(doublecomplex *p, doublecomplex *a, integer *b) /* p = a**b */
#endif
{
integer n;
unsigned long u;
......
#include "f2c.h"
#ifdef KR_headers
double log(), exp(), cos(), sin(), atan2(), f__cabs();
VOID pow_zz(r,a,b) doublecomplex *r, *a, *b;
#else
#undef abs
#include <math.h>
extern double f__cabs(double,double);
void pow_zz(doublecomplex *r, doublecomplex *a, doublecomplex *b)
#endif
{
double logr, logi, x, y;
......
......@@ -9,11 +9,7 @@
#endif
integer
#ifdef KR_headers
qbit_bits(a, b, len) longint a; integer b, len;
#else
qbit_bits(longint a, integer b, integer len)
#endif
{
/* Assume 2's complement arithmetic */
......@@ -27,11 +23,7 @@ qbit_bits(longint a, integer b, integer len)
}
longint
#ifdef KR_headers
qbit_cshift(a, b, len) longint a; integer b, len;
#else
qbit_cshift(longint a, integer b, integer len)
#endif
{
ulongint x, y, z;
......
#include "f2c.h"
longint
#ifdef KR_headers
qbit_shift(a, b) longint a; integer b;
#else
qbit_shift(longint a, integer b)
#endif
{
return b >= 0 ? a << b : (longint)((ulongint)a >> -b);
}
#include "f2c.h"
#ifdef KR_headers
double r_abs(x) real *x;
#else
double r_abs(real *x)
#endif
{
if(*x >= 0)
return(*x);
......
#include "f2c.h"
#ifdef KR_headers
double acos();
double r_acos(x) real *x;
#else
#undef abs
#include <math.h>
double r_acos(real *x)
#endif
{
return( acos(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double asin();
double r_asin(x) real *x;
#else
#undef abs
#include <math.h>
double r_asin(real *x)
#endif
{
return( asin(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double atan();
double r_atan(x) real *x;
#else
#undef abs
#include <math.h>
double r_atan(real *x)
#endif
{
return( atan(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double atan2();
double r_atn2(x,y) real *x, *y;
#else
#undef abs
#include <math.h>
double r_atn2(real *x, real *y)
#endif
{
return( atan2(*x,*y) );
}
#include "f2c.h"
#ifdef KR_headers
VOID r_cnjg(r, z) complex *r, *z;
#else
VOID r_cnjg(complex *r, complex *z)
#endif
{
real zi = z->i;
r->r = z->r;
......
#include "f2c.h"
#ifdef KR_headers
double cos();
double r_cos(x) real *x;
#else
#undef abs
#include <math.h>
double r_cos(real *x)
#endif
{
return( cos(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double cosh();
double r_cosh(x) real *x;
#else
#undef abs
#include <math.h>
double r_cosh(real *x)
#endif
{
return( cosh(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double r_dim(a,b) real *a, *b;
#else
double r_dim(real *a, real *b)
#endif
{
return( *a > *b ? *a - *b : 0);
}
#include "f2c.h"
#ifdef KR_headers
double exp();
double r_exp(x) real *x;
#else
#undef abs
#include <math.h>
double r_exp(real *x)
#endif
{
return( exp(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double r_imag(z) complex *z;
#else
double r_imag(complex *z)
#endif
{
return(z->i);
}
#include "f2c.h"
#ifdef KR_headers
double floor();
double r_int(x) real *x;
#else
#undef abs
#include <math.h>
double r_int(real *x)
#endif
{
return( (*x>0) ? floor(*x) : -floor(- *x) );
}
......@@ -2,14 +2,9 @@
#define log10e 0.43429448190325182765
#ifdef KR_headers
double log();
double r_lg10(x) real *x;
#else
#undef abs
#include <math.h>
double r_lg10(real *x)
#endif
{
return( log10e * log(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double log();
double r_log(x) real *x;
#else
#undef abs
#include <math.h>
double r_log(real *x)
#endif
{
return( log(*x) );
}
#include "f2c.h"
#ifdef KR_headers
#ifdef IEEE_drem
double drem();
#else
double floor();
#endif
double r_mod(x,y) real *x, *y;
#else
#ifdef IEEE_drem
double drem(double, double);
#else
......@@ -15,7 +7,6 @@ double drem(double, double);
#include <math.h>
#endif
double r_mod(real *x, real *y)
#endif
{
#ifdef IEEE_drem
double xa, ya, z;
......
#include "f2c.h"
#ifdef KR_headers
double floor();
double r_nint(x) real *x;
#else
#undef abs
#include <math.h>
double r_nint(real *x)
#endif
{
return( (*x)>=0 ?
floor(*x + .5) : -floor(.5 - *x) );
......
#include "f2c.h"
#ifdef KR_headers
double r_sign(a,b) real *a, *b;
#else
double r_sign(real *a, real *b)
#endif
{
double x;
x = (*a >= 0 ? *a : - *a);
......
#include "f2c.h"
#ifdef KR_headers
double sin();
double r_sin(x) real *x;
#else
#undef abs
#include <math.h>
double r_sin(real *x)
#endif
{
return( sin(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double sinh();
double r_sinh(x) real *x;
#else
#undef abs
#include <math.h>
double r_sinh(real *x)
#endif
{
return( sinh(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double sqrt();
double r_sqrt(x) real *x;
#else
#undef abs
#include <math.h>
double r_sqrt(real *x)
#endif
{
return( sqrt(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double tan();
double r_tan(x) real *x;
#else
#undef abs
#include <math.h>
double r_tan(real *x)
#endif
{
return( tan(*x) );
}
#include "f2c.h"
#ifdef KR_headers
double tanh();
double r_tanh(x) real *x;
#else
#undef abs
#include <math.h>
double r_tanh(real *x)
#endif
{
return( tanh(*x) );
}
......@@ -7,25 +7,15 @@
#ifndef NO_OVERWRITE
#include <stdio.h>
#undef abs
#ifdef KR_headers
extern char *F77_aloc();
extern void free();
extern void G77_exit_0 ();
#else
#undef min
#undef max
#include <stdlib.h>
extern char *F77_aloc(ftnlen, char*);
#endif
#include <string.h>
#endif /* NO_OVERWRITE */
VOID
#ifdef KR_headers
s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnint rnp[], *np; ftnlen ll;
#else
s_cat(char *lp, char *rpp[], ftnint rnp[], ftnint *np, ftnlen ll)
#endif
{
ftnlen i, nc;
char *rp;
......
......@@ -2,11 +2,7 @@
/* compare two strings */
#ifdef KR_headers
integer s_cmp(a0, b0, la, lb) char *a0, *b0; ftnlen la, lb;
#else
integer s_cmp(char *a0, char *b0, ftnlen la, ftnlen lb)
#endif
{
register unsigned char *a, *aend, *b, *bend;
a = (unsigned char *)a0;
......
......@@ -8,11 +8,7 @@
/* assign strings: a = b */
#ifdef KR_headers
VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
#else
void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb)
#endif
{
register char *aend, *bend;
......
......@@ -3,10 +3,6 @@
#define PAUSESIG 15
#include "signal1.h"
#ifdef KR_headers
#define Void /* void */
#define Int /* int */
#else
#define Void void
#define Int int
#undef abs
......@@ -17,7 +13,6 @@
extern "C" {
#endif
extern int getpid(void), isatty(int), pause(void);
#endif
extern VOID f_exit(Void);
......@@ -28,11 +23,7 @@ waitpause(Sigarg)
}
static VOID
#ifdef KR_headers
s_1paus(fin) FILE *fin;
#else
s_1paus(FILE *fin)
#endif
{
fprintf(stderr,
"To resume execution, type go. Other input will terminate the job.\n");
......@@ -47,11 +38,7 @@ s_1paus(FILE *fin)
}
int
#ifdef KR_headers
s_paus(s, n) char *s; ftnlen n;
#else
s_paus(char *s, ftnlen n)
#endif
{
fprintf(stderr, "PAUSE ");
if(n > 0)
......
......@@ -3,13 +3,8 @@
/* called when a subscript is out of range */
#ifdef KR_headers
extern VOID sig_die();
integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line;
#else
extern VOID sig_die(char*,int);
integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
#endif
{
register int i;
......
#include <stdio.h>
#include "f2c.h"
#ifdef KR_headers
extern void f_exit();
VOID s_stop(s, n) char *s; ftnlen n;
#else
#undef abs
#undef min
#undef max
......@@ -15,7 +11,6 @@ extern "C" {
void f_exit(void);
int s_stop(char *s, ftnlen n)
#endif
{
int i;
......
/* Set up the global argc/argv info for use by getarg_, iargc_, and
g77's inlined intrinsic equivalents. */
#ifndef KR_headers
#undef VOID
#include <stdlib.h>
#endif
#ifndef VOID
#define VOID void
......@@ -18,11 +16,7 @@ char **f__xargv;
#endif
void
#ifdef KR_headers
f_setarg(argc, argv) int argc; char **argv;
#else
f_setarg(int argc, char **argv)
#endif
{
f__xargc = argc;
f__xargv = argv;
......
......@@ -9,10 +9,8 @@
#endif
#endif
#ifndef KR_headers
#undef VOID
#include <stdlib.h>
#endif
#ifndef VOID
#define VOID void
......@@ -22,13 +20,8 @@
extern "C" {
#endif
#ifdef KR_headers
extern VOID sig_die();
#define Int /* int */
#else
extern void sig_die(char*, int);
#define Int int
#endif
static VOID sigfdie(Sigarg)
{
......
......@@ -7,9 +7,6 @@
#endif
#endif
#ifdef KR_headers
void sig_die(s, kill) register char *s; int kill;
#else
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
......@@ -17,7 +14,6 @@ extern "C" {
extern void f_exit(void);
void sig_die(register char *s, int kill)
#endif
{
/* print error message, then clear buffers */
fprintf(stderr, "%s\n", s);
......
......@@ -11,11 +11,7 @@
#define Sigret_t void
#endif
#ifndef Sigarg_t
#ifdef KR_headers
#define Sigarg_t
#else
#define Sigarg_t int
#endif
#endif /*Sigarg_t*/
#ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */
......
#include "f2c.h"
#include "signal1.h"
#ifdef KR_headers
void *
G77_signal_0 (sigp, proc) integer *sigp; sig_pf proc;
#else
void *
G77_signal_0 (integer *sigp, sig_pf proc)
#endif
{
int sig;
sig = (int)*sigp;
......
......@@ -2,12 +2,6 @@
#include "f2c.h"
#ifdef KR_headers
extern char *F77_aloc();
integer
G77_system_0 (s, n) register char *s; ftnlen n;
#else
#undef abs
#undef min
#undef max
......@@ -16,7 +10,6 @@ extern char *F77_aloc(ftnlen, char*);
integer
G77_system_0 (register char *s, ftnlen n)
#endif
{
char buff0[256], *buff;
register char *bp, *blast;
......
#include "f2c.h"
#ifdef KR_headers
double f__cabs();
double z_abs(z) doublecomplex *z;
#else
double f__cabs(double, double);
double z_abs(doublecomplex *z)
#endif
{
return( f__cabs( z->r, z->i ) );
}
#include "f2c.h"
#ifdef KR_headers
double sin(), cos(), sinh(), cosh();
VOID z_cos(r, z) doublecomplex *r, *z;
#else
#undef abs
#include "math.h"
void z_cos(doublecomplex *r, doublecomplex *z)
#endif
{
double zi = z->i, zr = z->r;
r->r = cos(zr) * cosh(zi);
......
#include "f2c.h"
#ifdef KR_headers
extern VOID sig_die();
VOID z_div(c, a, b) doublecomplex *a, *b, *c;
#else
extern void sig_die(char*, int);
void z_div(doublecomplex *c, doublecomplex *a, doublecomplex *b)
#endif
{
double ratio, den;
double abr, abi, cr;
......
#include "f2c.h"
#ifdef KR_headers
double exp(), cos(), sin();
VOID z_exp(r, z) doublecomplex *r, *z;
#else
#undef abs
#include "math.h"
void z_exp(doublecomplex *r, doublecomplex *z)
#endif
{
double expx, zi = z->i;
......
#include "f2c.h"
#ifdef KR_headers
double log(), f__cabs(), atan2();
VOID z_log(r, z) doublecomplex *r, *z;
#else
#undef abs
#include "math.h"
extern double f__cabs(double, double);
void z_log(doublecomplex *r, doublecomplex *z)
#endif
{
double s, s0, t, t2, u, v;
double zi = z->i, zr = z->r;
......
#include "f2c.h"
#ifdef KR_headers
double sin(), cos(), sinh(), cosh();
VOID z_sin(r, z) doublecomplex *r, *z;
#else
#undef abs
#include "math.h"
void z_sin(doublecomplex *r, doublecomplex *z)
#endif
{
double zi = z->i, zr = z->r;
r->r = sin(zr) * cosh(zi);
......
#include "f2c.h"
#ifdef KR_headers
double sqrt(), f__cabs();
VOID z_sqrt(r, z) doublecomplex *r, *z;
#else
#undef abs
#include "math.h"
extern double f__cabs(double, double);
void z_sqrt(doublecomplex *r, doublecomplex *z)
#endif
{
double mag, zi = z->i, zr = z->r;
......
......@@ -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;
......
#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)
......
......@@ -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
......
......@@ -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,
......
......@@ -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();
......
......@@ -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));
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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*/
......
......@@ -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)
......
......@@ -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
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
{
......
#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)
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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");
......
......@@ -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();
......
......@@ -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));
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -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;
......
......@@ -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);
......
......@@ -3,11 +3,7 @@
#include "lio.h"
integer
#ifdef KR_headers
s_wsne(a) cilist *a;
#else
s_wsne(cilist *a)
#endif
{
int n;
......
......@@ -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;
......
......@@ -45,17 +45,9 @@ Boston, MA 02111-1307, USA. */
# define F_OK 0
#endif
#ifdef KR_headers
void g_char ();
integer G77_access_0 (name, mode, Lname, Lmode)
char *name, *mode;
ftnlen Lname, Lmode;
#else
void g_char(const char *a, ftnlen alen, char *b);
integer G77_access_0 (const char *name, const char *mode, ftnlen Lname, ftnlen Lmode)
#endif
{
char *buff;
char *bp, *blast;
......
......@@ -29,32 +29,18 @@ Boston, MA 02111-1307, USA. */
#ifndef RETSIGTYPE
/* we shouldn't rely on this... */
#ifdef KR_headers
#define RETSIGTYPE int
#else
#define RETSIGTYPE void
#endif
#endif
typedef RETSIGTYPE (*sig_type)();
#ifdef KR_headers
extern sig_type signal();
#else
#include <signal.h>
typedef int (*sig_proc)(int);
#endif
#ifndef SIG_ERR
#define SIG_ERR ((sig_type) -1)
#endif
#ifdef KR_headers
integer G77_alarm_0 (seconds, proc)
integer *seconds;
sig_type proc;
#else
integer G77_alarm_0 (integer *seconds, sig_proc proc)
#endif
{
int status;
#if defined (HAVE_ALARM) && defined (SIGALRM)
......
......@@ -32,17 +32,9 @@ Boston, MA 02111-1307, USA. */
#include "f2c.h"
#ifdef KR_headers
void g_char ();
integer G77_chdir_0 (name, Lname)
char *name;
ftnlen Lname;
#else
void g_char(const char *a, ftnlen alen, char *b);
integer G77_chdir_0 (const char *name, const ftnlen Lname)
#endif
{
char *buff;
char *bp, *blast;
......
......@@ -41,19 +41,10 @@ Boston, MA 02111-1307, USA. */
#define CHMOD_PATH "/bin/chmod"
#endif
#ifdef KR_headers
extern void s_cat ();
void g_char ();
integer G77_chmod_0 (name, mode, Lname, Lmode)
char *name, *mode;
ftnlen Lname, Lmode;
#else
extern void s_cat(char *lp, char *rpp[], ftnlen rnp[], ftnlen *np, ftnlen ll);
void g_char(const char *a, ftnlen alen, char *b);
integer G77_chmod_0 (/* const */ char *name, /* const */ char *mode, const ftnlen Lname, const ftnlen Lmode)
#endif
{
char *buff;
char *bp, *blast;
......
......@@ -33,6 +33,12 @@
/* Define as the path of the `chmod' program. */
#undef CHMOD_PATH
/* Define if your gettimeofday takes only one argument. */
#undef GETTIMEOFDAY_ONE_ARGUMENT
/* Define if your gettimeofday takes a time zome argument. */
#undef HAVE_TIMEZONE
/* Define if you have the alarm function. */
#undef HAVE_ALARM
......@@ -54,6 +60,9 @@
/* Define if you have the getrusage function. */
#undef HAVE_GETRUSAGE
/* Define if you have the gettimeofday function. */
#undef HAVE_GETTIMEOFDAY
/* Define if you have the getuid function. */
#undef HAVE_GETUID
......
......@@ -995,14 +995,13 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1001: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:1000: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1006 "configure"
#line 1005 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
......@@ -1011,7 +1010,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:1015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
......@@ -1036,17 +1035,17 @@ for ac_hdr in limits.h unistd.h sys/time.h string.h stdlib.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1040: checking for $ac_hdr" >&5
echo "configure:1039: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1045 "configure"
#line 1044 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -1074,12 +1073,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1078: checking for working const" >&5
echo "configure:1077: 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 1083 "configure"
#line 1082 "configure"
#include "confdefs.h"
int main() {
......@@ -1128,7 +1127,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:1132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
......@@ -1149,12 +1148,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:1153: checking for size_t" >&5
echo "configure:1152: 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 1158 "configure"
#line 1157 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
......@@ -1182,12 +1181,12 @@ EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
echo "configure:1186: checking for mode_t" >&5
echo "configure:1185: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1191 "configure"
#line 1190 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
......@@ -1216,12 +1215,12 @@ fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
echo "configure:1220: checking for pid_t" >&5
echo "configure:1219: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1225 "configure"
#line 1224 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
......@@ -1249,12 +1248,12 @@ EOF
fi
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
echo "configure:1253: checking for st_blksize in struct stat" >&5
echo "configure:1252: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1258 "configure"
#line 1257 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
......@@ -1262,7 +1261,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
......@@ -1283,12 +1282,12 @@ EOF
fi
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
echo "configure:1287: checking for st_blocks in struct stat" >&5
echo "configure:1286: checking for st_blocks in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+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"
#include <sys/types.h>
#include <sys/stat.h>
......@@ -1296,7 +1295,7 @@ int main() {
struct stat s; s.st_blocks;
; return 0; }
EOF
if { (eval echo configure:1300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blocks=yes
else
......@@ -1319,12 +1318,12 @@ else
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
echo "configure:1323: checking for st_rdev in struct stat" >&5
echo "configure:1322: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1328 "configure"
#line 1327 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
......@@ -1332,7 +1331,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
if { (eval echo configure:1336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
......@@ -1353,12 +1352,12 @@ EOF
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
echo "configure:1357: checking whether struct tm is in sys/time.h or time.h" >&5
echo "configure:1356: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1362 "configure"
#line 1361 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
......@@ -1366,7 +1365,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
if { (eval echo configure:1370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
......@@ -1388,7 +1387,7 @@ fi
echo $ac_n "checking for gethostname in -lsocket""... $ac_c" 1>&6
echo "configure:1392: checking for gethostname in -lsocket" >&5
echo "configure:1391: checking for gethostname in -lsocket" >&5
ac_lib_var=`echo socket'_'gethostname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1396,7 +1395,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1400 "configure"
#line 1399 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
......@@ -1407,7 +1406,7 @@ int main() {
gethostname()
; return 0; }
EOF
if { (eval echo configure:1411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
......@@ -1433,12 +1432,12 @@ for ac_func in symlink getcwd getwd lstat gethostname strerror clock \
getrusage times alarm getlogin getgid getuid kill link ttyname
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1437: checking for $ac_func" >&5
echo "configure:1436: 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 1442 "configure"
#line 1441 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1461,7 +1460,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1464: \"$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
......@@ -1490,12 +1489,12 @@ done
for ac_func in gettimeofday
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1494: checking for $ac_func" >&5
echo "configure:1493: 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 1499 "configure"
#line 1498 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
......@@ -1518,7 +1517,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1521: \"$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
......@@ -1544,19 +1543,19 @@ done
if test "$ac_cv_func_gettimeofday" = yes; then
echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
echo "configure:1548: checking for struct timezone" >&5
echo "configure:1547: checking for struct timezone" >&5
if eval "test \"`echo '$''{'g77_cv_struct_timezone'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1553 "configure"
#line 1552 "configure"
#include "confdefs.h"
#include <sys/time.h>
int main() {
struct timezone tz;
; return 0; }
EOF
if { (eval echo configure:1560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
g77_cv_struct_timezone=yes
else
......@@ -1577,7 +1576,7 @@ EOF
else
cat > conftest.$ac_ext <<EOF
#line 1581 "configure"
#line 1580 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
......@@ -1600,7 +1599,7 @@ main ()
exit (0);
}
EOF
if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cat >> confdefs.h <<\EOF
#define HAVE_TIMEZONE 1
......@@ -1616,12 +1615,12 @@ fi
fi
echo $ac_n "checking whether gettimeofday can accept two arguments""... $ac_c" 1>&6
echo "configure:1620: checking whether gettimeofday can accept two arguments" >&5
echo "configure:1619: checking whether gettimeofday can accept two arguments" >&5
if eval "test \"`echo '$''{'emacs_cv_gettimeofday_two_arguments'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1625 "configure"
#line 1624 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
......@@ -1647,7 +1646,7 @@ int main() {
gettimeofday (&time, DUMMY);
; return 0; }
EOF
if { (eval echo configure:1651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
emacs_cv_gettimeofday_two_arguments=yes
else
......
......@@ -70,17 +70,6 @@ fi
dnl Checks for header files.
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(ac_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 ac_cv_sys_proto=yes,
dnl [ac_cv_sys_proto=no
dnl AC_DEFINE(KR_headers)])])
dnl AC_MSG_RESULT($ac_cv_sys_proto)
AC_HEADER_TIME
AC_CHECK_HEADERS(limits.h unistd.h sys/time.h string.h stdlib.h \
sys/param.h sys/times.h)
......
......@@ -39,14 +39,7 @@ Boston, MA 02111-1307, USA. */
/* may need sys/time.h & long arg for stime (bsd, svr1-3) */
#ifdef KR_headers
/* Character */ void G77_ctime_0 (chtime, Lchtime, xstime)
char *chtime;
longint * xstime;
ftnlen Lchtime;
#else
/* Character */ void G77_ctime_0 (char *chtime, const ftnlen Lchtime, longint * xstime)
#endif
{
int i, l;
int s_copy ();
......
......@@ -33,11 +33,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "f2c.h"
#ifdef KR_headers
VOID s_copy ();
#else
void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
#endif
int G77_date_and_time_0 (char *date, char *fftime, char *zone,
integer *values, ftnlen date_len,
......
......@@ -51,12 +51,7 @@ Boston, MA 02111-1307, USA. */
different to all others. */
static long clk_tck = 0;
#ifdef KR_headers
double G77_dtime_0 (tarray)
real tarray[2];
#else
double G77_dtime_0 (real tarray[2])
#endif
{
#if defined (_WIN32)
static int win32_platform = -1;
......
......@@ -51,12 +51,7 @@ Boston, MA 02111-1307, USA. */
different to all others. */
static long clk_tck = 0;
#ifdef KR_headers
double G77_etime_0 (tarray)
real tarray[2];
#else
double G77_etime_0 (real tarray[2])
#endif
{
#if defined (_WIN32)
static int win32_platform = -1;
......
......@@ -26,14 +26,7 @@ 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
{
int err;
FILE *f = f__units[*lunit].ufd;
......@@ -56,13 +49,7 @@ integer G77_fgetc_0 (const integer *lunit, char *c, ftnlen Lc)
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 five = 5;
......
......@@ -25,16 +25,9 @@ Boston, MA 02111-1307, USA. */
/* This flushes a single unit, c.f. libI77 version. */
#ifdef KR_headers
extern integer G77_fnum_0 ();
/* Subroutine */ int G77_flush1_0 (lunit)
integer *lunit;
#else
extern integer G77_fnum_0 (integer *);
/* Subroutine */ int G77_flush1_0 (const integer *lunit)
#endif
{
if (*lunit>=MXUNIT || *lunit<0)
err(1,101,"flush");
......
......@@ -22,12 +22,7 @@ Boston, MA 02111-1307, USA. */
#include "f2c.h"
#include "fio.h"
#ifdef KR_headers
integer G77_fnum_0 (lunit)
integer *lunit;
#else
integer G77_fnum_0 (integer *lunit)
#endif
{
if (*lunit>=MXUNIT || *lunit<0)
err(1,101,"fnum");
......
......@@ -26,14 +26,7 @@ Boston, MA 02111-1307, USA. */
#include "f2c.h"
#include "fio.h"
#ifdef KR_headers
integer G77_fputc_0 (lunit, c, Lc)
integer *lunit;
ftnlen Lc; /* should be 1 */
char *c;
#else
integer G77_fputc_0 (const integer *lunit, const char *c, const ftnlen Lc)
#endif
{
int err;
FILE *f = f__units[*lunit].ufd;
......@@ -51,13 +44,7 @@ integer G77_fputc_0 (const integer *lunit, const char *c, const ftnlen Lc)
return 0;
}
#ifdef KR_headers
integer G77_fput_0 (c, Lc)
ftnlen Lc; /* should be 1 */
char *c;
#else
integer G77_fput_0 (const char *c, const ftnlen Lc)
#endif
{
integer six = 6;
......
......@@ -26,17 +26,9 @@ Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include <sys/stat.h>
#ifdef KR_headers
extern integer G77_fnum_0 ();
integer G77_fstat_0 (lunit, statb)
integer *lunit;
integer statb[13];
#else
extern integer G77_fnum_0 (const integer *);
integer G77_fstat_0 (const integer *lunit, integer statb[13])
#endif
{
int err;
struct stat buf;
......
......@@ -32,14 +32,8 @@ Boston, MA 02111-1307, USA. */
extern char *sys_errlist [];
# define strerror(i) (sys_errlist[i])
#endif
#ifdef KR_headers
extern void s_copy ();
/* Subroutine */ int G77_gerror_0 (str, Lstr)
char *str; ftnlen Lstr;
#else
extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
/* Subroutine */ int G77_gerror_0 (char *str, ftnlen Lstr)
#endif
{
char * s;
......
......@@ -37,14 +37,8 @@ Boston, MA 02111-1307, USA. */
extern char *getcwd ();
#endif
#ifdef KR_headers
extern void s_copy ();
integer G77_getcwd_0 (str, Lstr)
char *str; ftnlen Lstr;
#else
extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
integer G77_getcwd_0 (char *str, const ftnlen Lstr)
#endif
{
int i;
char *ret;
......@@ -62,14 +56,8 @@ integer G77_getcwd_0 (char *str, const ftnlen Lstr)
# include <sys/param.h>
extern char *getwd ();
#ifdef KR_headers
extern VOID s_copy ();
integer G77_getcwd_0 (str, Lstr)
char *str; ftnlen Lstr;
#else
extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
integer G77_getcwd_0 (char *str, const ftnlen Lstr)
#endif
{
char pathname[MAXPATHLEN];
size_t l;
......@@ -84,14 +72,8 @@ integer G77_getcwd_0 (char *str, const ftnlen Lstr)
#else /* !HAVE_GETWD && !HAVE_GETCWD */
#ifdef KR_headers
extern VOID s_copy ();
integer G77_getcwd_0 (str, Lstr)
char *str; ftnlen Lstr;
#else
extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
integer G77_getcwd_0 (char *str, const ftnlen Lstr)
#endif
{
return errno = ENOSYS;
}
......
......@@ -26,11 +26,7 @@ Boston, MA 02111-1307, USA. */
#include <errno.h> /* for ENOSYS */
#include "f2c.h"
#ifdef KR_headers
integer G77_getgid_0 ()
#else
integer G77_getgid_0 (void)
#endif
{
#if defined (HAVE_GETGID)
return getgid ();
......
......@@ -41,14 +41,8 @@ Boston, MA 02111-1307, USA. */
/* SGI also has character*(*) function getlog() */
#ifdef KR_headers
extern VOID s_copy ();
/* Subroutine */ int G77_getlog_0 (str, Lstr)
char *str; ftnlen Lstr;
#else
extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
/* Subroutine */ int G77_getlog_0 (char *str, const ftnlen Lstr)
#endif
{
size_t i;
char *p;
......
......@@ -25,11 +25,7 @@ Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include "f2c.h"
#ifdef KR_headers
integer G77_getpid_0 ()
#else
integer G77_getpid_0 (void)
#endif
{
return getpid ();
}
......@@ -26,11 +26,7 @@ Boston, MA 02111-1307, USA. */
#include <errno.h> /* for ENOSYS */
#include "f2c.h"
#ifdef KR_headers
integer G77_getuid_0 ()
#else
integer G77_getuid_0 (void)
#endif
{
#if defined (HAVE_GETUID)
return getuid ();
......
......@@ -33,12 +33,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "f2c.h"
#ifdef KR_headers
/* Subroutine */ int G77_gmtime_0 (xstime, tarray)
integer *xstime, tarray[9];
#else
/* Subroutine */ int G77_gmtime_0 (const integer * xstime, integer tarray[9])
#endif
{
struct tm *lt;
time_t stime = *xstime;
......
......@@ -37,12 +37,7 @@ Boston, MA 02111-1307, USA. */
/* libU77 one: */
#ifdef KR_headers
/* Subroutine */ int G77_idate_0 (iarray)
int iarray[3];
#else
/* Subroutine */ int G77_idate_0 (int iarray[3])
#endif
{
struct tm *lt;
time_t tim;
......
......@@ -22,11 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include "f2c.h"
#ifdef KR_headers
integer G77_ierrno_0 ()
#else
integer G77_ierrno_0 (void)
#endif
{
return errno;
}
......@@ -31,12 +31,7 @@ Boston, MA 02111-1307, USA. */
/* Note this is per SunOS -- other s may have no arg. */
#ifdef KR_headers
integer G77_irand_0 (flag)
integer *flag;
#else
integer G77_irand_0 (integer *flag)
#endif
{
switch (*flag) {
case 0:
......
......@@ -25,16 +25,9 @@ Boston, MA 02111-1307, USA. */
#include "f2c.h"
#include "fio.h"
#ifdef KR_headers
extern integer G77_fnum_0 ();
logical G77_isatty_0 (lunit)
integer *lunit;
#else
extern integer G77_fnum_0 (integer *);
logical G77_isatty_0 (integer *lunit)
#endif
{
if (*lunit>=MXUNIT || *lunit<0)
err(1,101,"isatty");
......
......@@ -33,12 +33,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "f2c.h"
#ifdef KR_headers
/* Subroutine */ int G77_itime_0 (tarray)
integer tarray[3];
#else
/* Subroutine */ int G77_itime_0 (integer tarray[3])
#endif
{
struct tm *lt;
time_t tim;
......
......@@ -26,12 +26,7 @@ Boston, MA 02111-1307, USA. */
/* fixme: bsd, svr1-3 use int, not pid_t */
#ifdef KR_headers
integer G77_kill_0 (pid, signum)
integer *pid, *signum;
#else
integer G77_kill_0 (const integer *pid, const integer *signum)
#endif
{
#if defined (HAVE_KILL)
return kill ((pid_t) *pid, *signum) ? errno : 0;
......
......@@ -34,16 +34,9 @@ Boston, MA 02111-1307, USA. */
#include <errno.h> /* for ENOSYS */
#include "f2c.h"
#ifdef KR_headers
void g_char ();
integer G77_link_0 (path1, path2, Lpath1, Lpath2)
char *path1, *path2; ftnlen Lpath1, Lpath2;
#else
void g_char(const char *a, ftnlen alen, char *b);
integer G77_link_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2)
#endif
{
#if defined (HAVE_LINK)
char *buff1, *buff2;
......
......@@ -30,18 +30,9 @@ Boston, MA 02111-1307, USA. */
/* lstat isn't posix */
#ifdef KR_headers
void g_char();
integer G77_lstat_0 (name, statb, Lname)
char *name;
integer statb[13];
ftnlen Lname;
#else
void g_char(const char *a, ftnlen alen, char *b);
integer G77_lstat_0 (const char *name, integer statb[13], const ftnlen Lname)
#endif
{
#if HAVE_LSTAT
char *buff;
......
......@@ -33,12 +33,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "f2c.h"
#ifdef KR_headers
/* Subroutine */ int G77_ltime_0 (xstime, tarray)
integer *xstime, tarray[9];
#else
/* Subroutine */ int G77_ltime_0 (const integer * xstime, integer tarray[9])
#endif
{
struct tm *lt;
time_t stime = *xstime;
......
......@@ -33,11 +33,7 @@ Boston, MA 02111-1307, USA. */
/* Reported by wd42ej@sgi83.wwb.noaa.gov (Russ Jones AUTO-Sun3) on AIX. */
#ifdef KR_headers
longint G77_mclock_0 ()
#else
longint G77_mclock_0 (void)
#endif
{
#if HAVE_CLOCK
return clock ();
......
......@@ -28,12 +28,7 @@ Boston, MA 02111-1307, USA. */
#endif
#include "f2c.h"
#ifdef KR_headers
/* Subroutine */ int G77_perror_0 (str, Lstr)
char *str; ftnlen Lstr;
#else
/* Subroutine */ int G77_perror_0 (const char *str, const ftnlen Lstr)
#endif
{
char buff[1000];
char *bp, *blast;
......
......@@ -34,12 +34,7 @@ Boston, MA 02111-1307, USA. */
/* Note this is per SunOS -- other s may have no arg. */
#ifdef KR_headers
double G77_rand_0 (flag)
integer *flag;
#else
double G77_rand_0 (integer *flag)
#endif
{
switch (*flag) {
case 0:
......
......@@ -29,16 +29,9 @@ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include "f2c.h"
#ifdef KR_headers
void g_char ();
integer G77_rename_0 (path1, path2, Lpath1, Lpath2)
char *path1, *path2; ftnlen Lpath1, Lpath2;
#else
void g_char(const char *a, ftnlen alen, char *b);
integer G77_rename_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2)
#endif
{
char *buff1, *buff2;
char *bp, *blast;
......
......@@ -25,12 +25,7 @@ Boston, MA 02111-1307, USA. */
#include "f2c.h"
/* Subroutine */
#ifdef KR_headers
int G77_sleep_0 (seconds)
integer *seconds;
#else
int G77_sleep_0 (const integer *seconds)
#endif
{
(void) sleep ((unsigned int) *seconds);
return 0;
......
......@@ -25,12 +25,7 @@ Boston, MA 02111-1307, USA. */
#include "f2c.h"
/* Subroutine */
#ifdef KR_headers
int G77_srand_0 (seed)
integer *seed;
#else
int G77_srand_0 (const integer *seed)
#endif
{
srand ((unsigned int) *seed);
return 0;
......
......@@ -27,18 +27,9 @@ Boston, MA 02111-1307, USA. */
#include <sys/stat.h>
#include "f2c.h"
#ifdef KR_headers
void g_char ();
integer G77_stat_0 (name, statb, Lname)
char *name;
integer statb[13];
ftnlen Lname;
#else
void g_char(const char *a, ftnlen alen, char *b);
integer G77_stat_0 (const char *name, integer statb[13], const ftnlen Lname)
#endif
{
char *buff;
char *bp, *blast;
......
......@@ -33,16 +33,9 @@ Boston, MA 02111-1307, USA. */
#endif
#include "f2c.h"
#ifdef KR_headers
void g_char ();
integer G77_symlnk_0 (path1, path2, Lpath1, Lpath2)
char *path1, *path2; ftnlen Lpath1, Lpath2;
#else
void g_char(const char *a, ftnlen alen, char *b);
integer G77_symlnk_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2)
#endif
{
#if HAVE_SYMLINK
char *buff1, *buff2;
......
......@@ -43,12 +43,7 @@ Boston, MA 02111-1307, USA. */
#include <errno.h> /* for ENOSYS */
#include "f2c.h"
#ifdef KR_headers
int G77_system_clock_0 (count, count_rate, count_max)
integer *count, *count_rate, *count_max;
#else
int G77_system_clock_0 (integer *count, integer *count_rate, integer *count_max)
#endif
{
#if defined (HAVE_TIMES)
struct tms buffer;
......
......@@ -35,11 +35,7 @@ Boston, MA 02111-1307, USA. */
/* As well as this external function some compilers have an intrinsic
subroutine which fills a character argument (which is the VMS way)
-- caveat emptor. */
#ifdef KR_headers
longint G77_time_0 ()
#else
longint G77_time_0 (void)
#endif
{
/* There are potential problems with the cast of the time_t here. */
return time (NULL);
......
......@@ -35,16 +35,9 @@ Boston, MA 02111-1307, USA. */
#include <errno.h> /* for ENOSYS */
#include "f2c.h"
#ifdef KR_headers
extern void s_copy ();
extern integer G77_fnum_0 ();
/* Character */ void G77_ttynam_0 (ret_val, ret_val_len, lunit)
char *ret_val; ftnlen ret_val_len; integer *lunit
#else
extern integer G77_fnum_0 (integer *lunit);
extern void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb);
/* Character */ void G77_ttynam_0 (char *ret_val, ftnlen ret_val_len, integer *lunit)
#endif
{
#if defined (HAVE_TTYNAME)
size_t i;
......
......@@ -23,12 +23,7 @@ Boston, MA 02111-1307, USA. */
#include <sys/stat.h>
#include "f2c.h"
#ifdef KR_headers
integer G77_umask_0 (mask)
integer *mask;
#else
integer G77_umask_0 (integer *mask)
#endif
{
return umask ((mode_t) *mask);
}
......@@ -33,16 +33,9 @@ Boston, MA 02111-1307, USA. */
#endif
#include "f2c.h"
#ifdef KR_headers
void g_char ();
integer G77_unlink_0 (str, Lstr)
char *str; ftnlen Lstr;
#else
void g_char(const char *a, ftnlen alen, char *b);
integer G77_unlink_0 (const char *str, const ftnlen Lstr)
#endif
{
char *buff;
char *bp, *blast;
......
......@@ -38,12 +38,7 @@ Boston, MA 02111-1307, USA. */
/* VMS style: */
/* Subroutine */
#ifdef KR_headers
int G77_vxtidate_y2kbug_0 (m, d, y)
integer *y, *m, *d;
#else
int G77_vxtidate_y2kbug_0 (integer *m, integer *d, integer *y)
#endif
{
struct tm *lt;
time_t tim;
......@@ -57,12 +52,7 @@ int G77_vxtidate_y2kbug_0 (integer *m, integer *d, integer *y)
#ifdef PIC
extern const char *G77_Non_Y2K_Compliance_Message;
# ifdef KR_headers
int G77_vxtidate_y2kbuggy_0 (m, d, y)
integer *y, *m, *d;
# else
int G77_vxtidate_y2kbuggy_0 (integer *m, integer *d, integer *y)
# endif
{
extern int G77_abort_0();
fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message);
......
......@@ -39,13 +39,7 @@ Boston, MA 02111-1307, USA. */
#include "f2c.h"
/* Subroutine */
#ifdef KR_headers
void G77_vxttime_0 (chtime, Lchtime)
char chtime[8];
ftnlen Lchtime;
#else
void G77_vxttime_0 (char chtime[8], const ftnlen Lchtime)
#endif
{
time_t tim;
char *ctim;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment