* libF77/*: Delete KR_headers cruft.
* libI77/*: Likewise.
* libU77/*: Likewise.
From-SVN: r54132
+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.
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" {
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;
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
--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
-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=*)
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
# 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
# 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
# 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
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
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
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
# 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
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
# 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=
# 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
:
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
:
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
:
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*
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>
#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*
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
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
:
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')
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
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>
# 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__
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>
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
# 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. */
; 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
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. */
; 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
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. */
; 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
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
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
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
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) );
}
#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
#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) );
}
#endif
double
-#ifdef KR_headers
-dtime_(tarray) float *tarray;
-#else
dtime_(float *tarray)
-#endif
{
#ifdef USE_CLOCK
#ifndef CLOCKS_PER_SECOND
#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 */
#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) );
}
#endif
double
-#ifdef KR_headers
-etime_(tarray) float *tarray;
-#else
etime_(float *tarray)
-#endif
{
#ifdef USE_CLOCK
#ifndef CLOCKS_PER_SECOND
#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();
* 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
* 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);
}
#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 */
}
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);
}
#include <stdio.h>
#include "signal1.h"
-#ifndef KR_headers
#undef VOID
#include <stdlib.h>
-#endif
#ifndef VOID
#define VOID void
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;
#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 */
}
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) );
}
#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
#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) );
}
#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;
/* 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;
/* 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;
#define PAUSESIG 15
#include "signal1.h"
-#ifdef KR_headers
-#define Void /* void */
-#define Int /* int */
-#else
#define Void void
#define Int int
#undef abs
extern "C" {
#endif
extern int getpid(void), isatty(int), pause(void);
-#endif
extern VOID f_exit(Void);
}
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");
}
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)
/* 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
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
#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;
#endif
#endif
-#ifndef KR_headers
#undef VOID
#include <stdlib.h>
-#endif
#ifndef VOID
#define VOID void
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)
{
#endif
#endif
-#ifdef KR_headers
-void sig_die(s, kill) register char *s; int kill;
-#else
#include <stdlib.h>
#ifdef __cplusplus
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);
#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;
#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
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;
#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
#endif
integer f_clos(cllist *a)
-#endif
{ unit *b;
if (f__init & 2)
return(0);
}
void
-#ifdef KR_headers
-f_exit()
-#else
f_exit(void)
-#endif
{ int i;
static cllist xx;
if (! (f__init & 1))
}
}
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)
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>
# 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__
# 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
# 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
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() {
; 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
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
# 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. */
; 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
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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
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. */
; 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
# 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
# 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
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
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,
return(1);
}
-#ifdef KR_headers
-c_dfe(a) cilist *a;
-#else
c_dfe(cilist *a)
-#endif
{
f__sequential=0;
f__formatted=f__external=1;
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();
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();
#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));
}
#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;
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;
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;
#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;
#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];
#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;
#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 */
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*/
};
#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));
}
void
-#ifdef KR_headers
-f__fatal(n,s) char *s;
-#else
f__fatal(int n, char *s)
-#endif
{
static int dead = 0;
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;
x->uwrt = 0;
return 0;
}
-#ifdef KR_headers
-f__nowwriting(x) unit *x;
-#else
f__nowwriting(unit *x)
-#endif
{
off_t loc;
int ufmt;
}
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);
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" {
#ifdef __cplusplus
}
#endif
-#endif
extern int (*f__doend)(Void);
extern FILE *f__cf; /*current file*/
extern unit *f__curunit; /*current unit*/
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++)
/*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");
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)
}
static
-#ifdef KR_headers
-char *f_s(s,curloc) char *s;
-#else
char *f_s(char *s, int curloc)
-#endif
{
skip(s);
if(*s++!='(')
}
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)
}
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);
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);
}
static
-#ifdef KR_headers
-char *f_list(s) char *s;
-#else
char *f_list(char *s)
-#endif
{
for(;*s!=0;)
{ skip(s);
return(NULL);
}
-#ifdef KR_headers
-pars_f(s) char *s;
-#else
pars_f(char *s)
-#endif
{
char *e;
flag f__workdone, f__nonl;
static
-#ifdef KR_headers
-type_f(n)
-#else
type_f(int n)
-#endif
{
switch(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)
} 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
#ifdef __cplusplus
}
#endif
-#endif
extern flag f__cblank,f__cplus,f__workdone, f__nonl;
extern char *f__fmtbuf;
extern int f__fmtlen;
#define TYQUAD 14
#endif
-#ifdef KR_headers
-extern char *f__icvt();
-#else
extern char *f__icvt(longint, int*, int*, int);
-#endif
#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;
#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);
}
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;
}
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;
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");
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;
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;
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)
}
static void
-#ifdef KR_headers
-c_liw(a) icilist *a;
-#else
c_liw(icilist *a)
-#endif
{
f__reading = 0;
f__external = 0;
}
integer
-#ifdef KR_headers
-s_wsni(a) icilist *a;
-#else
s_wsni(icilist *a)
-#endif
{
cilist ca;
}
integer
-#ifdef KR_headers
-s_wsli(a) icilist *a;
-#else
s_wsli(icilist *a)
-#endif
{
if(f__init != 1) f_init();
f__init = 3;
#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
#include "io.h"
#endif
integer f_inqu(inlist *a)
-#endif
{ flag byfile;
int i, n;
unit *p;
typedef union
{
-#ifndef KR_headers
signed
-#endif
char flchar;
short flshort;
ftnint flint;
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
#ifdef __cplusplus
}
#endif
-#endif
extern ftnint L_len;
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;
#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;
#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;
}
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;
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)
}
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";
}
}
}
-#ifdef KR_headers
-c_le(a) cilist *a;
-#else
c_le(cilist *a)
-#endif
{
if(f__init != 1) f_init();
f__init = 3;
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;
return(0);
#undef Ptr
}
-#ifdef KR_headers
-integer s_rsle(a) cilist *a;
-#else
integer s_rsle(cilist *a)
-#endif
{
int n;
}
static VOID
-#ifdef KR_headers
-lwrt_I(n) longint n;
-#else
lwrt_I(longint n)
-#endif
{
char *p;
int ndigit, sign;
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;
}
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;
}
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++)
}
static VOID
-#ifdef KR_headers
-lwrt_F(n) double n;
-#else
lwrt_F(double n)
-#endif
{
char buf[LEFBL];
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;
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;
#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"};
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;
}
int
-#ifdef KR_headers
-f__putbuf(c) int c;
-#else
f__putbuf(int c)
-#endif
{
char *s, *se;
int n;
}
void
-#ifdef KR_headers
-x_putc(c)
-#else
x_putc(int c)
-#endif
{
if (f__recpos >= f__buflen)
f__bufadj(f__recpos, f__buflen);
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 */
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;
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;
#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;
}
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;
}
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)
}
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;
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);
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++)
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);
return(1);
}
static int
-#ifdef KR_headers
-rd_POS(s) char *s;
-#else
rd_POS(char *s)
-#endif
{ char quote;
int ch;
quote= *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)
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)
(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;
}
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';
}
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();
}
-#ifdef KR_headers
-integer s_rsli(a) icilist *a;
-#else
integer s_rsli(icilist *a)
-#endif
{
f__lioproc = l_read;
f__lquit = 0;
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;
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
#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;
}
hashtab *
-#ifdef KR_headers
-mk_hashtab(nl) Namelist *nl;
-#else
mk_hashtab(Namelist *nl)
-#endif
{
int nht, nv;
hashtab *ht;
#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;
}
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;
}
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;
#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;
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;
}
integer
-#ifdef KR_headers
-s_rsne(a) cilist *a;
-#else
s_rsne(cilist *a)
-#endif
{
extern int l_eof;
int n;
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");
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;
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();
}
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();
#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)
{
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)
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");
(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));
#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;
}
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;
#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;
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;
}
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;
}
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;
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;
return(0);
}
static int
-#ifdef KR_headers
-wrt_AP(s) char *s;
-#else
wrt_AP(char *s)
-#endif
{ char quote;
int i;
return(1);
}
static int
-#ifdef KR_headers
-wrt_H(a,s) char *s;
-#else
wrt_H(int a, char *s)
-#endif
{
int i;
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;
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--;
}
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;
}
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;
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)
{
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;
#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);
#include "lio.h"
integer
-#ifdef KR_headers
-s_wsne(a) cilist *a;
-#else
s_wsne(cilist *a)
-#endif
{
int n;
PUT(' ');
}
-#ifdef KR_headers
-x_wsne(a) cilist *a;
-#else
#include <string.h>
VOID
x_wsne(cilist *a)
-#endif
{
Namelist *nl;
char *s;
# 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;
#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)
#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;
#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;
/* 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
/* 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
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>
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
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*
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() {
; 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
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
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
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
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>
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
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>
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
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>
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
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>
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
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
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
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
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. */
; 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
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. */
; 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
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
else
cat > conftest.$ac_ext <<EOF
-#line 1581 "configure"
+#line 1580 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
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
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
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
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)
/* 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 ();
#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,
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;
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;
#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;
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;
/* 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");
#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");
#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;
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;
#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;
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;
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;
# 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;
#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;
}
#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 ();
/* 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;
#include <sys/types.h>
#include "f2c.h"
-#ifdef KR_headers
-integer G77_getpid_0 ()
-#else
integer G77_getpid_0 (void)
-#endif
{
return getpid ();
}
#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 ();
#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;
/* 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;
#include <errno.h>
#include "f2c.h"
-#ifdef KR_headers
-integer G77_ierrno_0 ()
-#else
integer G77_ierrno_0 (void)
-#endif
{
return errno;
}
/* 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:
#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");
#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;
/* 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;
#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;
/* 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;
#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;
/* 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 ();
#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;
/* 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:
#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;
#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;
#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;
#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;
#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;
#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;
/* 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);
#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;
#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);
}
#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;
/* 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;
#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);
#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;