Gcc 3.3.1-pre 2003-07-11 libf2c bits.

This commit is contained in:
kan 2003-07-11 03:42:19 +00:00
parent 8acd2b6930
commit dbceb4fed0
234 changed files with 8109 additions and 8329 deletions

View File

@ -1,12 +1,43 @@
2003-02-05 Release Manager
2003-07-04 H.J. Lu <hongjiu.lu@intel.com>
* GCC 3.2.2 Released.
* Makefile.in: Replace PWD with PWD_COMMAND.
2003-01-28 Christian Cornelssen <ccorn@cs.tu-berlin.de>
2003-05-13 Release Manager
* Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR.
(install, uninstall): Prepend $(DESTDIR) to destination
paths in all (un)installation commands.
* GCC 3.3 Released.
2003-05-13 Release Manager
* GCC 3.3 Released.
2003-05-13 Release Manager
* GCC 3.3 Released.
2003-04-23 Loren J. Rittle <ljrittle@acm.org>
* libI77/configure.in (_XOPEN_SOURCE): Bump to 600.
* libI77/configure: Regenerate.
* libU77/configure.in (_XOPEN_SOURCE): Bump to 600.
* libU77/configure: Regenerate.
2003-04-11 Bud Davis <bdavis9659@comcast.net>
PR Fortran/1832
* libf2c/libI77/iio.c (z_putc): Check for overflowing length
of output string.
2003-03-24 Bud Davis <bdavis9659@comcast.net>
PR fortran/10197
* libI77/open.c (f_open): A DIRECT ACCESS file is
UNFORMATTED by default.
2003-02-20 Alexandre Oliva <aoliva@redhat.com>
* configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to
config.status.
* configure: Rebuilt.
2003-01-27 Alexandre Oliva <aoliva@redhat.com>
@ -16,29 +47,59 @@
version_specific_libs is enabled.
* configure: Rebuilt.
2002-11-19 Release Manager
2003-01-26 Christian Cornelssen <ccorn@cs.tu-berlin.de>
* GCC 3.2.1 Released.
* Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR.
(install, uninstall): Prepend $(DESTDIR) to destination
paths in all (un)installation commands.
2002-11-19 Release Manager
2002-11-19 Toon Moene <toon@moene.indiv.nluug.nl>
* GCC 3.2.1 Released.
PR fortran/8587
* libF77/pow_zz.c: Handle (0.0, 0.0) ** power.
2002-11-18 Release Manager
2002-10-18 Krister Walfridsson <cato@df.lth.se>
* GCC 3.2.1 Released.
* libU77/configure.in (_XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED,
__EXTENSIONS__, _FILE_OFFSET_BITS): Check that _XOPEN_SOURCE 500L
may be defined before defining these.
* libU77/configure: Regenerate.
* libI77/configure.in (_XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED,
__EXTENSIONS__, _FILE_OFFSET_BITS): Check that _XOPEN_SOURCE 500L
may be defined before defining these.
* libI77/configure: Regenerate.
Mon Oct 7 00:32:38 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2002-09-23 Zack Weinberg <zack@codesourcery.com>
* libF77/Version.c: Rename junk to __LIBF77_VERSION__. Add
external decls for __LIBI77_VERSION__ and __LIBU77_VERSION__.
Delete __G77_LIBF77_VERSION__
(g77__fvers__): Print all three __LIB*77_VERSION__ strings,
and __VERSION__ if we have it; nothing else.
* libI77/Version.c: Provide only __LIBI77_VERSION__ (formerly junk).
* libU77/Version.c: Provide only __LIBU77_VERSION__ (formerly junk).
Sun Sep 22 23:43:37 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (all): Fix multilib parallel build.
2002-08-14 Release Manager
2002-09-14 Tim Prince <tprince@computer.org>
* GCC 3.2 Released.
PR libf2c/7384
* libU77/datetime_.c: Use GetLocalTime on MS-Windows.
2002-07-25 Release Manager
2002-08-31 Toon Moene <toon@moene.indiv.nluug.nl>
* GCC 3.1.1 Released.
PR fortran/6367
* libI77/rsne.c (x_rsne): Use local variable no2 to count further
list elements to read.
2002-07-10 Toon Moene <toon@moene.indiv.nluug.nl>
* libI77/open.c (f_open): Do not indicate unformatted file
if record length is given without a FORMATTED/UNFORMATTED
specification.
2002-06-25 DJ Delorie <dj@redhat.com>
@ -47,13 +108,170 @@ Mon Oct 7 00:32:38 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Call it before AC_CANONICAL_SYSTEM.
* configure: Regenerate.
2002-05-14 Release Manager
Wed Jun 5 15:05:41 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* GCC 3.1 Released.
* f2cext.c (alarm_): Mark parameter(s) with attribute `unused'.
* libF77/h_len.c (h_len): Likewise.
* libF77/i_len.c (i_len): Likewise.
* libI77/rsli.c (i_ungetc): Likewise.
* libU77/date_.c (G77_date_y2kbuggy_0): Likewise.
* libU77/fputc_.c (G77_fputc_0): Likewise.
* libU77/vxtidate_.c (G77_vxtidate_y2kbuggy_0): Likewise.
* libU77/vxttime_.c (G77_vxttime_0): Likewise.
2002-05-14 Release Manager
Mon Jun 3 22:24:48 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* GCC 3.1 Released.
* libF77/main.c (f_setarg, f_setsig): Prototype.
* libI77/lread.c (quad_read): Delete.
* libI77/uio.c: Include config.h.
* libI77/wref.c (wrt_E): Cast isdigit arg to unsigned char.
* libU77/dtime_.c (clk_tck): Move to the scope where it is used.
* libU77/etime_.c (clk_tck): Likewise.
Mon Jun 3 22:23:03 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libF77/lbitbits.c (lbit_cshift): disambiguate expressions
with parentheses.
* libF77/qbitbits.c (qbit_cshift): Likewise.
* libI77/inquire.c (f_inqu): Likewise.
* libI77/rdfmt.c (rd_Z): Likewise.
* libI77/rsne.c (x_rsne): Likewise.
Mon Jun 3 22:21:23 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (s-libe77): Add WARN_CFLAGS.
Sun Jun 2 10:32:35 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libI77/dfe.c (s_rdfe, s_wdfe): Wrap parentheses around
assignment used as truth value.
* libI77/due.c (s_rdue, s_wdue): Likewise.
* libI77/endfile.c (f_end): Likewise.
* libI77/iio.c (s_rsfi, s_wsfi): Likewise.
* libI77/lread.c (ERR, l_C, nmL_getc, s_rsle): Likewise.
* libI77/lwrite.c (l_g, l_put): Likewise.
* libI77/open.c (f_open): Likewise.
* libI77/rdfmt.c (rd_Z): Likewise.
* libI77/rsfe.c (s_rsfe): Likewise.
* libI77/rsne.c (hash, mk_hashtab, nl_init, getname, getdimen,
x_rsne, s_rsne): Likewise.
* libI77/sue.c (s_rsue, s_wsue): Likewise.
* libI77/wref.c (wrt_E, wrt_F): Likewise.
* libI77/wsfe.c (s_wsfe): Likewise.
* libI77/wsle.c (s_wsle): Likewise.
* libI77/wsne.c (s_wsne): Likewise.
Sun Jun 2 08:59:50 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libF77/main.c (main): Avoid implicit int.
* libI77/dfe.c (y_rsk, y_getc, c_dfe): Likewise.
* libI77/due.c (c_due): Likewise.
* libI77/err.c (f__canseek, f__nowreading, f__nowwriting):
Likewise.
* libI77/fmt.c (op_gen, ne_d, e_d, pars_f, type_f, en_fio):
Likewise.
* libI77/iio.c (z_getc, z_rnew, c_si, z_wnew): Likewise.
* libI77/lread.c (t_getc, c_le, l_read): Likewise.
* libI77/lwrite.c (l_write): Likewise.
* libI77/open.c (fk_open): Likewise.
* libI77/rdfmt.c (rd_ed, rd_ned): Likewise.
* libI77/rsfe.c (xrd_SL, x_getc, x_endp, x_rev): Likewise.
* libI77/rsne.c (t_getc, x_rsne): Likewise.
* libI77/sfe.c (c_sfe): Likewise.
* libI77/sue.c (c_sue): Likewise.
* libI77/uio.c (do_us): Likewise.
* libI77/wref.c (wrt_E, wrt_F): Likewise.
* libI77/wrtfmt.c (wrt_L, w_ed, w_ned): Likewise.
Sun Jun 2 08:58:05 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libI77/rdfmt.c (rd_I): Delete unused variable(s).
* libU77/access_.c (G77_access_0): Likewise.
* libU77/chdir_.c (G77_chdir_0): Likewise.
* libU77/chmod_.c (G77_chmod_0): Likewise.
* libU77/ctime_.c (G77_ctime_0): Likewise.
* libU77/link_.c (G77_link_0): Likewise.
* libU77/lstat_.c (G77_lstat_0): Likewise.
* libU77/rename_.c (G77_rename_0): Likewise.
* libU77/stat_.c (G77_stat_0): Likewise.
* libU77/symlnk_.c (G77_symlnk_0): Likewise.
* libU77/unlink_.c (G77_unlink_0): Likewise.
Sun Jun 2 08:55:20 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libI77/inquire.c (f_inqu): Avoid ambiguous else clauses.
* libI77/lread.c (l_C, l_L): Likewise.
* libI77/open.c (f_open): Likewise.
* libI77/rsne.c (x_rsne): Likewise.
* libI77/wref.c (wrt_F): Likewise.
Sun Jun 2 08:53:15 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libF77/getenv_.c (G77_getenv_0): Avoid signed/unsigned warning.
* libF77/system_.c (G77_system_0): Likewise.
* libI77/open.c (f_open): Likewise.
* libI77/rdfmt.c (rd_Z): Likewise.
* libI77/uio.c (do_us, do_ud): Likewise.
Sat Jun 1 08:33:14 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libF77/*: Fix formatting.
* libI77/*: Likewise.
* libU77/*: Likewise.
Fri May 31 21:56:30 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* g2c.hin, libF77/d_cnjg.c, libF77/main.c, libF77/r_cnjg.c,
libF77/s_cat.c, libF77/s_paus.c, libF77/s_rnge.c, libF77/setarg.c,
libF77/setsig.c, libF77/signal1.h0, libI77/dfe.c, libI77/due.c,
libI77/err.c, libI77/fio.h, libI77/fmt.c, libI77/iio.c,
libI77/ilnw.c, libI77/lread.c, libI77/lwrite.c, libI77/rsfe.c,
libI77/rsli.c, libI77/rsne.c, libI77/sfe.c, libI77/sue.c,
libI77/util.c, libI77/wrtfmt.c, libI77/wsfe.c, libI77/wsle.c,
libI77/xwsne.c, libU77/date_.c: Kill VOID, Void and Int.
Fri May 31 21:54:37 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libF77/F77_aloc.c, libF77/exit_.c, libF77/main.c,
libF77/s_paus.c, libF77/s_stop.c, libF77/setarg.c,
libF77/setsig.c, libF77/sig_die.c, libF77/signal1.h0,
libI77/close.c, libI77/dolio.c, libI77/fio.h, libI77/fmt.h,
libI77/lio.h: Delete checks on __cplusplus.
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.
(FLAGS_TO_PASS): Add WARN_CFLAGS.
* libF77/Makefile.in (ALL_CFLAGS): Likewise.
* libI77/Makefile.in (ALL_CFLAGS): Likewise.
* libU77/Makefile.in (ALL_CFLAGS): Likewise.
2002-05-30 H.J. Lu (hjl@gnu.org)
* libI77/open.c (_XOPEN_SOURCE): Removed.
Mon May 20 13:03:54 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libF77/Makefile.in (SHELL): Set to @SHELL@.
* libI77/Makefile.in (SHELL): Likewise.
* libU77/Makefile.in (SHELL): Likewise.
2002-05-20 Toon Moene <toon@moene.indiv.nluug.nl>
* Makefile.in: Use @SHELL@, not /bin/sh for SHELL
definition.
2002-05-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Makefile.in: Allow for PWDCMD to override hardcoded pwd.
* aclocal.m4: Likewise.
* configure: Regenerate.
2002-05-08 Alexandre Oliva <aoliva@redhat.com>
@ -63,14 +281,18 @@ Mon Oct 7 00:32:38 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2002-05-02 Alexandre Oliva <aoliva@redhat.com>
* Makefile.in: Fix for multilibbed natives.
* Makefile.in: Fix for multilibbed natives.
2002-04-15 Loren J. Rittle <ljrittle@acm.org>
* aclocal.m4 (gcc_version_trigger): Use robust path construction.
* configure: Rebuilt.
2002-04-01 Phil Edwards <pme@gcc.gnu.org>
2002-04-11 Toon Moene <toon@moene.indiv.nluug.nl>
* libI77/lio.h: Treat INTEGER*1 as signed char.
2002-03-06 Phil Edwards <pme@gcc.gnu.org>
* libF77/Version.c: Fix misplaced leading blanks on first line.
* libI77/Version.c: Likewise.
@ -213,7 +435,7 @@ Mon Oct 7 00:32:38 2002 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
of shared libf2c to 0:0:0.
2001-09-29 Juergen Pfeifer <juergen.pfeifer@gmx.net>
Toon Moene <toon@moene.indiv.nluug.nl>
Toon Moene <toon@moene.indiv.nluug.nl>
Make libf2c a shared library.
@ -287,7 +509,7 @@ Wed Jul 18 11:14:33 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libI77/Makefile.in: Add necessary dependencies on config.h.
2001-07-06 Toon Moene <toon@moene.indiv.nluug.nl>
Pedro Vazquez <vazquez@penelope.iqm.unicamp.br>
Pedro Vazquez <vazquez@penelope.iqm.unicamp.br>
* libI77/configure.in: Check for fseeko, ftello.
* libI77/configure: Rebuilt.
@ -314,7 +536,7 @@ Wed Jul 18 11:14:33 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libI77/fio.h: Include <sys/types.h> for off_t.
2001-07-01 Toon Moene <toon@moene.indiv.nluug.nl>
Pedro Vazquez <vazquez@penelope.iqm.unicamp.br>
Pedro Vazquez <vazquez@penelope.iqm.unicamp.br>
* libI77/fio.h: Use off_t when appropriate.
* libI77/backspace.c (f_back): Ditto.
@ -472,7 +694,7 @@ Wed Jul 18 11:14:33 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
file atomically.
2000-07-03 Donn Terry (donnte@microsoft.com)
* libU77/aclocal.m4: check for 2 argument gettimeofday without
* libU77/aclocal.m4: check for 2 argument gettimeofday without
struct timezone
2000-07-02 Toon Moene <toon@moene.indiv.nluug.nl>

View File

@ -19,7 +19,8 @@
#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#02111-1307, USA.
SHELL = /bin/sh
SHELL = @SHELL@
PWD_COMMAND = $${PWDCMD-pwd}
MAKEOVERRIDES=
.NOEXPORTS:
@ -66,6 +67,7 @@ INSTALL_DATA = @INSTALL_DATA@
LIBTOOL = @LIBTOOL@
CC = @CC@
WARN_CFLAGS = -W -Wall
CFLAGS = @CFLAGS@
AR = @AR@
RANLIB = @RANLIB@
@ -76,6 +78,7 @@ FLAGS_TO_PASS= \
CC='$(CC)' \
LD='$(LD)' \
LIBTOOL='$(LIBTOOL)' \
WARN_CFLAGS='$(WARN_CFLAGS)' \
CFLAGS='$(CFLAGS)' \
CPPFLAGS='$(CPPFLAGS)' \
DESTDIR='$(DESTDIR)' \
@ -173,7 +176,7 @@ s-libe77: f2cext.c
do \
echo $${name}; \
$(LIBTOOL) --mode=compile $(CC) -c -I. -I$(srcdir) -I../../include \
$(CPPFLAGS) $(CFLAGS) -DL$${name} $(srcdir)/f2cext.c \
$(CPPFLAGS) $(WARN_CFLAGS) $(CFLAGS) -DL$${name} $(srcdir)/f2cext.c \
-o libE77/L$${name}.lo ; \
if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
echo libE77/L$${name}.lo >> $@.T; \
@ -256,8 +259,8 @@ rebuilt: configure
installcheck installdirs all-unilib
subdir_do:
@rootpre=`pwd`/; export rootpre; \
srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
@rootpre=`${PWD_COMMAND}`/; export rootpre; \
srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
for i in .. $(DODIRS); do \
if [ x$$i != x.. ]; then \
if [ -f ./$$i/Makefile ]; then \

View File

@ -1,4 +1,4 @@
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl Copyright (C) 1994, 1995-8, 1999, 2001, 2002 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -54,7 +54,7 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
glibcpp_builddir=`pwd`
glibcpp_builddir=`${PWDCMD-pwd}`
case $srcdir in
[\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;

View File

@ -768,7 +768,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
# These need to be absolute paths, yet at the same time need to
# canonicalize only relative paths, because then amd will not unmount
# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
glibcpp_builddir=`pwd`
glibcpp_builddir=`${PWDCMD-pwd}`
case $srcdir in
\\/$* | ?:\\/*) glibcpp_srcdir=${srcdir} ;;
*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
@ -1596,9 +1596,18 @@ gnu*)
;;
hpux10.20*|hpux11*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
case $host_cpu in
hppa*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
ia64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
esac
;;
irix5* | irix6*)
@ -1688,13 +1697,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
echo "configure:1692: checking for object suffix" >&5
echo "configure:1701: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
if { (eval echo configure:1698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@ -1718,7 +1727,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
echo "configure:1722: checking for ${ac_tool_prefix}file" >&5
echo "configure:1731: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1780,7 +1789,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
echo "configure:1784: checking for file" >&5
echo "configure:1793: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1851,7 +1860,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1855: checking for $ac_word" >&5
echo "configure:1864: 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
@ -1883,7 +1892,7 @@ if test -n "$ac_tool_prefix"; then
# 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:1887: checking for $ac_word" >&5
echo "configure:1896: 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
@ -1918,7 +1927,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1922: checking for $ac_word" >&5
echo "configure:1931: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1950,7 +1959,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1954: checking for $ac_word" >&5
echo "configure:1963: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2017,8 +2026,21 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 2021 "configure"' > conftest.$ac_ext
if { (eval echo configure:2022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
echo '#line 2030 "configure"' > conftest.$ac_ext
if { (eval echo configure:2031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
*N32*)
LD="${LD-ld} -melf32bmipn32"
;;
*64-bit*)
LD="${LD-ld} -melf64bmip"
;;
esac
else
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
@ -2030,6 +2052,65 @@ case $host in
LD="${LD-ld} -64"
;;
esac
fi
fi
rm -rf conftest*
;;
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo configure:2064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
;;
*ELF-64*)
HPUX_IA64_MODE="64"
;;
esac
fi
rm -rf conftest*
;;
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo configure:2080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*32-bit*)
case $host in
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
ppc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
LD="${LD-ld} -m elf_s390"
;;
sparc64-*linux*)
LD="${LD-ld} -m elf32_sparc"
;;
esac
;;
*64-bit*)
case $host in
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
ppc*-*linux*|powerpc*-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*)
LD="${LD-ld} -m elf64_s390"
;;
sparc*-*linux*)
LD="${LD-ld} -m elf64_sparc"
;;
esac
;;
esac
fi
rm -rf conftest*
;;
@ -2039,7 +2120,7 @@ case $host in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
echo "configure:2043: checking whether the C compiler needs -belf" >&5
echo "configure:2124: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -2052,14 +2133,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 2056 "configure"
#line 2137 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@ -2183,7 +2264,7 @@ else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2187: checking for $ac_word" >&5
echo "configure:2268: 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
@ -2223,7 +2304,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:2227: checking for a BSD compatible install" >&5
echo "configure:2308: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2276,7 +2357,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:2280: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:2361: 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
@ -2305,7 +2386,7 @@ fi
# Sanity check for the cross-compilation case:
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:2309: checking how to run the C preprocessor" >&5
echo "configure:2390: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -2320,13 +2401,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 2324 "configure"
#line 2405 "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:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2411: \"$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
:
@ -2337,13 +2418,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 2341 "configure"
#line 2422 "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:2347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2428: \"$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
:
@ -2354,13 +2435,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 2358 "configure"
#line 2439 "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:2364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2445: \"$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
:
@ -2386,17 +2467,17 @@ echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for stdio.h""... $ac_c" 1>&6
echo "configure:2390: checking for stdio.h" >&5
echo "configure:2471: 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 2395 "configure"
#line 2476 "configure"
#include "confdefs.h"
#include <stdio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2481: \"$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*
@ -2424,12 +2505,12 @@ fi
echo $ac_n "checking for built-in g77 integer types""... $ac_c" 1>&6
echo "configure:2428: checking for built-in g77 integer types" >&5
echo "configure:2509: checking for built-in g77 integer types" >&5
if eval "test \"`echo '$''{'libf2c_cv_has_g77_builtin_types'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2433 "configure"
#line 2514 "configure"
#include "confdefs.h"
int main() {
@ -2439,7 +2520,7 @@ __g77_longint g77l;
__g77_ulongint g77ul;
; return 0; }
EOF
if { (eval echo configure:2443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libf2c_cv_has_g77_builtin_types=yes
else
@ -2782,6 +2863,7 @@ with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
toplevel_srcdir=${toplevel_srcdir}
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
EOF
cat >> $CONFIG_STATUS <<\EOF

View File

@ -1,5 +1,6 @@
# Process this file with autoconf to produce a configure script.
# Copyright (C) 1995, 1997, 1998, 1999, 2002 Free Software Foundation, Inc.
# Copyright (C) 1995, 1997, 1998, 1999, 2002, 2003
# Free Software Foundation, Inc.
# Contributed by Dave Love (d.love@dl.ac.uk).
#
#This file is part of GNU Fortran.
@ -137,6 +138,7 @@ with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
toplevel_srcdir=${toplevel_srcdir}
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
)

View File

@ -140,7 +140,8 @@ integer access_ (const char *name, const char *mode, ftnlen Lname, ftnlen Lmode)
#endif
#ifdef Lalarm
integer alarm_ (integer *seconds, sig_proc proc, integer *status) {
integer alarm_ (integer *seconds, sig_proc proc,
integer *status __attribute__ ((__unused__))) {
extern integer G77_alarm_0 (integer *seconds, sig_proc proc);
return G77_alarm_0 (seconds, proc);
}

View File

@ -132,8 +132,6 @@ typedef struct
ftnlen inblanklen;
} inlist;
#define VOID void
union Multitype { /* for multiple entry points */
integer1 g;
shortint h;
@ -183,11 +181,11 @@ typedef shortint (*J_fp)(...);
typedef integer (*I_fp)(...);
typedef real (*R_fp)(...);
typedef doublereal (*D_fp)(...), (*E_fp)(...);
typedef /* Complex */ VOID (*C_fp)(...);
typedef /* Double Complex */ VOID (*Z_fp)(...);
typedef /* Complex */ void (*C_fp)(...);
typedef /* Double Complex */ void (*Z_fp)(...);
typedef logical (*L_fp)(...);
typedef shortlogical (*K_fp)(...);
typedef /* Character */ VOID (*H_fp)(...);
typedef /* Character */ void (*H_fp)(...);
typedef /* Subroutine */ int (*S_fp)(...);
#else
typedef int /* Unknown procedure type */ (*U_fp)();
@ -195,17 +193,17 @@ typedef shortint (*J_fp)();
typedef integer (*I_fp)();
typedef real (*R_fp)();
typedef doublereal (*D_fp)(), (*E_fp)();
typedef /* Complex */ VOID (*C_fp)();
typedef /* Double Complex */ VOID (*Z_fp)();
typedef /* Complex */ void (*C_fp)();
typedef /* Double Complex */ void (*Z_fp)();
typedef logical (*L_fp)();
typedef shortlogical (*K_fp)();
typedef /* Character */ VOID (*H_fp)();
typedef /* Character */ void (*H_fp)();
typedef /* Subroutine */ int (*S_fp)();
#endif
/* E_fp is for real functions when -R is not specified */
typedef VOID C_f; /* complex function */
typedef VOID H_f; /* character function */
typedef VOID Z_f; /* double complex function */
typedef void C_f; /* complex function */
typedef void H_f; /* character function */
typedef void Z_f; /* double complex function */
typedef doublereal E_f; /* real function with -R not specified */
/* undef any lower-case symbols that your C compiler predefines, e.g.: */

View File

@ -6,33 +6,19 @@
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" {
#endif
extern void G77_exit_0 (integer*);
#ifdef __cplusplus
}
#endif
extern void G77_exit_0 (integer *);
char *
F77_aloc(integer Len, char *whence)
#endif
char *
F77_aloc (integer Len, char *whence)
{
char *rv;
unsigned int uLen = (unsigned int) Len; /* for K&R C */
char *rv;
unsigned int uLen = (unsigned int) Len; /* for K&R C */
if (!(rv = (char*)malloc(uLen))) {
fprintf(stderr, "malloc(%u) failure in %s\n",
uLen, whence);
G77_exit_0 (&memfailure);
}
return rv;
}
if (!(rv = (char *) malloc (uLen)))
{
fprintf (stderr, "malloc(%u) failure in %s\n", uLen, whence);
G77_exit_0 (&memfailure);
}
return rv;
}

View File

@ -41,11 +41,11 @@ ARFLAGS = rc
RANLIB = @RANLIB@
@SET_MAKE@
SHELL = /bin/sh
SHELL = @SHELL@
#### End of system configuration section. ####
ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR) -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(CFLAGS)
ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR) -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(WARN_CFLAGS) $(CFLAGS)
.SUFFIXES:
.SUFFIXES: .c .lo

View File

@ -1,9 +1,6 @@
static char junk[] = "\n@(#)LIBF77 VERSION 20000929\n";
/*
*/
char __G77_LIBF77_VERSION__[] = "3.2.2 20030205 (release)";
const char __LIBF77_VERSION__[] = "@(#) LIBF77 VERSION 20000929\n";
extern const char __LIBI77_VERSION__[];
extern const char __LIBU77_VERSION__[];
/*
2.00 11 June 1980. File version.c added to library.
@ -87,6 +84,11 @@ char __G77_LIBF77_VERSION__[] = "3.2.2 20030205 (release)";
void
g77__fvers__ ()
{
fprintf (stderr, "__G77_LIBF77_VERSION__: %s", __G77_LIBF77_VERSION__);
fputs (junk, stderr);
fputs ("GNU Fortran library.\n", stderr);
#if defined __GNUC__ && defined __VERSION__
fprintf (stderr, "Compiled by GCC %s\n", __VERSION__);
#endif
fputs (__LIBF77_VERSION__, stderr);
fputs (__LIBI77_VERSION__, stderr);
fputs (__LIBU77_VERSION__, stderr);
}

View File

@ -1,16 +1,11 @@
#include <stdio.h>
#include "f2c.h"
#ifdef KR_headers
extern VOID sig_die();
extern void sig_die (char *, int);
int G77_abort_0 ()
#else
extern void sig_die(char*,int);
int G77_abort_0 (void)
#endif
int
G77_abort_0 (void)
{
sig_die("Fortran abort routine called", 1);
return 0; /* not reached */
sig_die ("Fortran abort routine called", 1);
return 0; /* not reached */
}

View File

@ -1,14 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
extern double f__cabs();
extern double f__cabs (double, double);
double c_abs(z) complex *z;
#else
extern double f__cabs(double, double);
double c_abs(complex *z)
#endif
double
c_abs (complex * z)
{
return( f__cabs( z->r, z->i ) );
return (f__cabs (z->r, z->i));
}

View File

@ -1,17 +1,12 @@
#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
void
c_cos (complex * r, complex * z)
{
double zi = z->i, zr = z->r;
r->r = cos(zr) * cosh(zi);
r->i = - sin(zr) * sinh(zi);
}
double zi = z->i, zr = z->r;
r->r = cos (zr) * cosh (zi);
r->i = -sin (zr) * sinh (zi);
}

View File

@ -1,47 +1,43 @@
#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
extern void sig_die (char *, int);
void
c_div (complex * c, complex * a, complex * b)
{
double ratio, den;
double abr, abi, cr;
double ratio, den;
double abr, abi, cr;
if( (abr = b->r) < 0.)
abr = - abr;
if( (abi = b->i) < 0.)
abi = - abi;
if( abr <= abi )
{
if(abi == 0) {
if ((abr = b->r) < 0.)
abr = -abr;
if ((abi = b->i) < 0.)
abi = -abi;
if (abr <= abi)
{
if (abi == 0)
{
#ifdef IEEE_COMPLEX_DIVIDE
float af, bf;
af = bf = abr;
if (a->i != 0 || a->r != 0)
af = 1.;
c->i = c->r = af / bf;
return;
float af, bf;
af = bf = abr;
if (a->i != 0 || a->r != 0)
af = 1.;
c->i = c->r = af / bf;
return;
#else
sig_die("complex division by zero", 1);
sig_die ("complex division by zero", 1);
#endif
}
ratio = (double)b->r / b->i ;
den = b->i * (1 + ratio*ratio);
cr = (a->r*ratio + a->i) / den;
c->i = (a->i*ratio - a->r) / den;
}
else
{
ratio = (double)b->i / b->r ;
den = b->r * (1 + ratio*ratio);
cr = (a->r + a->i*ratio) / den;
c->i = (a->i - a->r*ratio) / den;
}
c->r = cr;
}
ratio = (double) b->r / b->i;
den = b->i * (1 + ratio * ratio);
cr = (a->r * ratio + a->i) / den;
c->i = (a->i * ratio - a->r) / den;
}
else
{
ratio = (double) b->i / b->r;
den = b->r * (1 + ratio * ratio);
cr = (a->r + a->i * ratio) / den;
c->i = (a->i - a->r * ratio) / den;
}
c->r = cr;
}

View File

@ -1,19 +1,14 @@
#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
void
c_exp (complex * r, complex * z)
{
double expx, zi = z->i;
double expx, zi = z->i;
expx = exp(z->r);
r->r = expx * cos(zi);
r->i = expx * sin(zi);
}
expx = exp (z->r);
r->r = expx * cos (zi);
r->i = expx * sin (zi);
}

View File

@ -1,17 +1,13 @@
#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);
extern double f__cabs (double, double);
void c_log(complex *r, complex *z)
#endif
void
c_log (complex * r, complex * z)
{
double zi, zr;
r->i = atan2(zi = z->i, zr = z->r);
r->r = log( f__cabs(zr, zi) );
}
double zi, zr;
r->i = atan2 (zi = z->i, zr = z->r);
r->r = log (f__cabs (zr, zi));
}

View File

@ -1,17 +1,12 @@
#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
void
c_sin (complex * r, complex * z)
{
double zi = z->i, zr = z->r;
r->r = sin(zr) * cosh(zi);
r->i = cos(zr) * sinh(zi);
}
double zi = z->i, zr = z->r;
r->r = sin (zr) * cosh (zi);
r->i = cos (zr) * sinh (zi);
}

View File

@ -1,35 +1,30 @@
#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);
extern double f__cabs (double, double);
void c_sqrt(complex *r, complex *z)
#endif
void
c_sqrt (complex * r, complex * z)
{
double mag, t;
double zi = z->i, zr = z->r;
double mag, t;
double zi = z->i, zr = z->r;
if( (mag = f__cabs(zr, zi)) == 0.)
r->r = r->i = 0.;
else if(zr > 0)
{
r->r = t = sqrt(0.5 * (mag + zr) );
t = zi / t;
r->i = 0.5 * t;
}
else
{
t = sqrt(0.5 * (mag - zr) );
if(zi < 0)
t = -t;
r->i = t;
t = zi / t;
r->r = 0.5 * t;
}
}
if ((mag = f__cabs (zr, zi)) == 0.)
r->r = r->i = 0.;
else if (zr > 0)
{
r->r = t = sqrt (0.5 * (mag + zr));
t = zi / t;
r->i = 0.5 * t;
}
else
{
t = sqrt (0.5 * (mag - zr));
if (zi < 0)
t = -t;
r->i = t;
t = zi / t;
r->r = 0.5 * t;
}
}

View File

@ -1,27 +1,24 @@
#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
f__cabs (double real, double imag)
{
double temp;
double temp;
if(real < 0)
real = -real;
if(imag < 0)
imag = -imag;
if(imag > real){
temp = real;
real = imag;
imag = temp;
}
if((real+imag) == real)
return(real);
if (real < 0)
real = -real;
if (imag < 0)
imag = -imag;
if (imag > real)
{
temp = real;
real = imag;
imag = temp;
}
if ((real + imag) == real)
return (real);
temp = imag/real;
temp = real*sqrt(1.0 + temp*temp); /*overflow!!*/
return(temp);
temp = imag / real;
temp = real * sqrt (1.0 + temp * temp); /*overflow!! */
return (temp);
}

View File

@ -28,7 +28,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
sitefile=
srcdir=
target=NONE
verbose=
@ -143,7 +142,6 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@ -314,11 +312,6 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
-site-file | --site-file | --site-fil | --site-fi | --site-f)
ac_prev=sitefile ;;
-site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
sitefile="$ac_optarg" ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@ -484,16 +477,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
if test -z "$sitefile"; then
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
else
CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@ -541,7 +530,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:545: checking for $ac_word" >&5
echo "configure:534: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -571,7 +560,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:575: checking for $ac_word" >&5
echo "configure:564: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -622,7 +611,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:626: checking for $ac_word" >&5
echo "configure:615: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -655,7 +644,7 @@ fi
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:659: checking whether we are using GNU C" >&5
echo "configure:648: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -664,7 +653,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -683,7 +672,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:687: checking whether ${CC-cc} accepts -g" >&5
echo "configure:676: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -726,7 +715,7 @@ else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:730: checking for $ac_word" >&5
echo "configure:719: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -755,7 +744,7 @@ fi
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:759: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:748: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -785,7 +774,7 @@ fi
# Sanity check for the cross-compilation case:
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:789: checking how to run the C preprocessor" >&5
echo "configure:778: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -800,13 +789,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 804 "configure"
#line 793 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -817,13 +806,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 821 "configure"
#line 810 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -834,13 +823,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 838 "configure"
#line 827 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -866,17 +855,17 @@ echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for stdio.h""... $ac_c" 1>&6
echo "configure:870: checking for stdio.h" >&5
echo "configure:859: checking for stdio.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 875 "configure"
#line 864 "configure"
#include "confdefs.h"
#include <stdio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -904,12 +893,12 @@ fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:908: checking for ANSI C header files" >&5
echo "configure:897: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 913 "configure"
#line 902 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -917,7 +906,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -934,7 +923,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 938 "configure"
#line 927 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -952,7 +941,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 956 "configure"
#line 945 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -973,7 +962,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 977 "configure"
#line 966 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -984,7 +973,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -1007,14 +996,13 @@ EOF
fi
echo $ac_n "checking for posix""... $ac_c" 1>&6
echo "configure:1013: checking for posix" >&5
echo "configure:1001: checking for posix" >&5
if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1018 "configure"
#line 1006 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
@ -1040,12 +1028,12 @@ echo "$ac_t""$g77_cv_header_posix" 1>&6
# We can rely on the GNU library being posix-ish. I guess checking the
# header isn't actually like checking the functions, though...
echo $ac_n "checking for GNU library""... $ac_c" 1>&6
echo "configure:1044: checking for GNU library" >&5
echo "configure:1032: checking for GNU library" >&5
if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1049 "configure"
#line 1037 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef __GNU_LIBRARY__
@ -1068,12 +1056,12 @@ fi
echo "$ac_t""$g77_cv_lib_gnu" 1>&6
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:1072: checking return type of signal handlers" >&5
echo "configure:1060: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1077 "configure"
#line 1065 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@ -1090,7 +1078,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@ -1111,12 +1099,12 @@ EOF
# we'll get atexit by default
if test $ac_cv_header_stdc != yes; then
echo $ac_n "checking for atexit""... $ac_c" 1>&6
echo "configure:1115: checking for atexit" >&5
echo "configure:1103: checking for atexit" >&5
if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1120 "configure"
#line 1108 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char atexit(); below. */
@ -1139,7 +1127,7 @@ atexit();
; return 0; }
EOF
if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_atexit=yes"
else
@ -1164,12 +1152,12 @@ else
EOF
echo $ac_n "checking for onexit""... $ac_c" 1>&6
echo "configure:1168: checking for onexit" >&5
echo "configure:1156: checking for onexit" >&5
if eval "test \"`echo '$''{'ac_cv_func_onexit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1173 "configure"
#line 1161 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char onexit(); below. */
@ -1192,7 +1180,7 @@ onexit();
; return 0; }
EOF
if { (eval echo configure:1196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_onexit=yes"
else
@ -1210,12 +1198,12 @@ if eval "test \"`echo '$ac_cv_func_'onexit`\" = yes"; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for on_exit""... $ac_c" 1>&6
echo "configure:1214: checking for on_exit" >&5
echo "configure:1202: checking for on_exit" >&5
if eval "test \"`echo '$''{'ac_cv_func_on_exit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1219 "configure"
#line 1207 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char on_exit(); below. */
@ -1238,7 +1226,7 @@ on_exit();
; return 0; }
EOF
if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_on_exit=yes"
else
@ -1268,7 +1256,7 @@ else true
fi
echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6
echo "configure:1272: checking for drem in -lm" >&5
echo "configure:1260: checking for drem in -lm" >&5
ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1276,7 +1264,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1280 "configure"
#line 1268 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1287,7 +1275,7 @@ int main() {
drem()
; return 0; }
EOF
if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else

View File

@ -56,17 +56,6 @@ the G77 runtime system. If necessary, install gcc now with \`LANGUAGES=c',
then the target library, then build with \`LANGUAGES=f77'.])])
AC_HEADER_STDC
dnl We could do this if we didn't know we were using gcc
dnl AC_MSG_CHECKING(for prototype-savvy compiler)
dnl AC_CACHE_VAL(g77_cv_sys_proto,
dnl [AC_TRY_LINK(,
dnl dnl looks screwy because TRY_LINK expects a function body
dnl [return 0;} int foo (int * bar) {],
dnl g77_cv_sys_proto=yes,
dnl [g77_cv_sys_proto=no
dnl AC_DEFINE(KR_headers)])])
dnl AC_MSG_RESULT($g77_cv_sys_proto)
AC_MSG_CHECKING(for posix)
AC_CACHE_VAL(g77_cv_header_posix,
AC_EGREP_CPP(yes,

View File

@ -1,12 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
double d_abs(x) doublereal *x;
#else
double d_abs(doublereal *x)
#endif
double
d_abs (doublereal * x)
{
if(*x >= 0)
return(*x);
return(- *x);
if (*x >= 0)
return (*x);
return (-*x);
}

View File

@ -1,13 +1,9 @@
#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
double
d_acos (doublereal * x)
{
return( acos(*x) );
return (acos (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_asin (doublereal * x)
{
return( asin(*x) );
return (asin (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_atan (doublereal * x)
{
return( atan(*x) );
return (atan (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_atn2 (doublereal * x, doublereal * y)
{
return( atan2(*x,*y) );
return (atan2 (*x, *y));
}

View File

@ -1,13 +1,9 @@
#include "f2c.h"
VOID
#ifdef KR_headers
d_cnjg(r, z) doublecomplex *r, *z;
#else
d_cnjg(doublecomplex *r, doublecomplex *z)
#endif
void
d_cnjg (doublecomplex * r, doublecomplex * z)
{
doublereal zi = z->i;
r->r = z->r;
r->i = -zi;
}
doublereal zi = z->i;
r->r = z->r;
r->i = -zi;
}

View File

@ -1,13 +1,9 @@
#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
double
d_cos (doublereal * x)
{
return( cos(*x) );
return (cos (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_cosh (doublereal * x)
{
return( cosh(*x) );
return (cosh (*x));
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
double d_dim(a,b) doublereal *a, *b;
#else
double d_dim(doublereal *a, doublereal *b)
#endif
double
d_dim (doublereal * a, doublereal * b)
{
return( *a > *b ? *a - *b : 0);
return (*a > *b ? *a - *b : 0);
}

View File

@ -1,13 +1,9 @@
#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
double
d_exp (doublereal * x)
{
return( exp(*x) );
return (exp (*x));
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
double d_imag(z) doublecomplex *z;
#else
double d_imag(doublecomplex *z)
#endif
double
d_imag (doublecomplex * z)
{
return(z->i);
return (z->i);
}

View File

@ -1,13 +1,9 @@
#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
double
d_int (doublereal * x)
{
return( (*x>0) ? floor(*x) : -floor(- *x) );
return ((*x > 0) ? floor (*x) : -floor (-*x));
}

View File

@ -2,14 +2,10 @@
#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
double
d_lg10 (doublereal * x)
{
return( log10e * log(*x) );
return (log10e * log (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_log (doublereal * x)
{
return( log(*x) );
return (log (*x));
}

View File

@ -1,40 +1,33 @@
#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);
double drem (double, double);
#else
#undef abs
#include <math.h>
#endif
double d_mod(doublereal *x, doublereal *y)
#endif
double
d_mod (doublereal * x, doublereal * y)
{
#ifdef IEEE_drem
double xa, ya, z;
if ((ya = *y) < 0.)
ya = -ya;
z = drem(xa = *x, ya);
if (xa > 0) {
if (z < 0)
z += ya;
}
else if (z > 0)
z -= ya;
return z;
double xa, ya, z;
if ((ya = *y) < 0.)
ya = -ya;
z = drem (xa = *x, ya);
if (xa > 0)
{
if (z < 0)
z += ya;
}
else if (z > 0)
z -= ya;
return z;
#else
double quotient;
if( (quotient = *x / *y) >= 0)
quotient = floor(quotient);
else
quotient = -floor(-quotient);
return(*x - (*y) * quotient );
double quotient;
if ((quotient = *x / *y) >= 0)
quotient = floor (quotient);
else
quotient = -floor (-quotient);
return (*x - (*y) * quotient);
#endif
}

View File

@ -1,14 +1,9 @@
#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
double
d_nint (doublereal * x)
{
return( (*x)>=0 ?
floor(*x + .5) : -floor(.5 - *x) );
return ((*x) >= 0 ? floor (*x + .5) : -floor (.5 - *x));
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
double d_prod(x,y) real *x, *y;
#else
double d_prod(real *x, real *y)
#endif
double
d_prod (real * x, real * y)
{
return( (*x) * (*y) );
return ((*x) * (*y));
}

View File

@ -1,12 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
double d_sign(a,b) doublereal *a, *b;
#else
double d_sign(doublereal *a, doublereal *b)
#endif
double
d_sign (doublereal * a, doublereal * b)
{
double x;
x = (*a >= 0 ? *a : - *a);
return( *b >= 0 ? x : -x);
double x;
x = (*a >= 0 ? *a : -*a);
return (*b >= 0 ? x : -x);
}

View File

@ -1,13 +1,9 @@
#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
double
d_sin (doublereal * x)
{
return( sin(*x) );
return (sin (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_sinh (doublereal * x)
{
return( sinh(*x) );
return (sinh (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_sqrt (doublereal * x)
{
return( sqrt(*x) );
return (sqrt (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_tan (doublereal * x)
{
return( tan(*x) );
return (tan (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
d_tanh (doublereal * x)
{
return( tanh(*x) );
return (tanh (*x));
}

View File

@ -1,12 +1,8 @@
#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
extern double erf (double);
double
G77_derf_0 (doublereal * x)
{
return( erf(*x) );
return (erf (*x));
}

View File

@ -1,14 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
extern double erfc();
extern double erfc (double);
double G77_derfc_0 (x) doublereal *x;
#else
extern double erfc(double);
double G77_derfc_0 (doublereal *x)
#endif
double
G77_derfc_0 (doublereal * x)
{
return( erfc(*x) );
return (erfc (*x));
}

View File

@ -23,31 +23,27 @@
#endif
#endif
double
#ifdef KR_headers
dtime_(tarray) float *tarray;
#else
dtime_(float *tarray)
#endif
double
dtime_ (float *tarray)
{
#ifdef USE_CLOCK
#ifndef CLOCKS_PER_SECOND
#define CLOCKS_PER_SECOND Hz
#endif
static double t0;
double t = clock();
tarray[1] = 0;
tarray[0] = (t - t0) / CLOCKS_PER_SECOND;
t0 = t;
return tarray[0];
static double t0;
double t = clock ();
tarray[1] = 0;
tarray[0] = (t - t0) / CLOCKS_PER_SECOND;
t0 = t;
return tarray[0];
#else
struct tms t;
static struct tms t0;
struct tms t;
static struct tms t0;
times(&t);
tarray[0] = (double)(t.tms_utime - t0.tms_utime) / Hz;
tarray[1] = (double)(t.tms_stime - t0.tms_stime) / Hz;
t0 = t;
return tarray[0] + tarray[1];
times (&t);
tarray[0] = (double) (t.tms_utime - t0.tms_utime) / Hz;
tarray[1] = (double) (t.tms_stime - t0.tms_stime) / Hz;
t0 = t;
return tarray[0] + tarray[1];
#endif
}
}

View File

@ -6,14 +6,10 @@
#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
extern void s_copy (char *, char *, ftnlen, ftnlen);
int
G77_ef1asc_0 (ftnint * a, ftnlen * la, ftnint * b, ftnlen * lb)
{
s_copy( (char *)a, (char *)b, EVEN(*la), *lb );
return 0; /* ignored return value */
s_copy ((char *) a, (char *) b, EVEN (*la), *lb);
return 0; /* ignored return value */
}

View File

@ -2,13 +2,9 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
integer
G77_ef1cmc_0 (ftnint * a, ftnlen * la, ftnint * b, ftnlen * lb)
{
return( s_cmp( (char *)a, (char *)b, *la, *lb) );
return (s_cmp ((char *) a, (char *) b, *la, *lb));
}

View File

@ -1,12 +1,8 @@
#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
extern double erf (double);
double
G77_erf_0 (real * x)
{
return( erf(*x) );
return (erf (*x));
}

View File

@ -1,12 +1,8 @@
#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
extern double erfc (double);
double
G77_erfc_0 (real * x)
{
return( erfc(*x) );
return (erfc (*x));
}

View File

@ -23,25 +23,21 @@
#endif
#endif
double
#ifdef KR_headers
etime_(tarray) float *tarray;
#else
etime_(float *tarray)
#endif
double
etime_ (float *tarray)
{
#ifdef USE_CLOCK
#ifndef CLOCKS_PER_SECOND
#define CLOCKS_PER_SECOND Hz
#endif
double t = clock();
tarray[1] = 0;
return tarray[0] = t / CLOCKS_PER_SECOND;
double t = clock ();
tarray[1] = 0;
return tarray[0] = t / CLOCKS_PER_SECOND;
#else
struct tms t;
struct tms t;
times(&t);
return (tarray[0] = (double)t.tms_utime/Hz)
+ (tarray[1] = (double)t.tms_stime/Hz);
times (&t);
return (tarray[0] = (double) t.tms_utime / Hz)
+ (tarray[1] = (double) t.tms_stime / Hz);
#endif
}
}

View File

@ -12,26 +12,14 @@
#undef abs
#undef min
#undef max
#ifndef KR_headers
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
extern void f_exit(void);
#endif
extern void f_exit (void);
void
#ifdef KR_headers
G77_exit_0 (rc) integer *rc;
#else
G77_exit_0 (integer *rc)
#endif
void
G77_exit_0 (integer * rc)
{
#ifdef NO_ONEXIT
f_exit();
f_exit ();
#endif
exit(*rc);
}
#ifdef __cplusplus
exit (*rc);
}
#endif

View File

@ -2,161 +2,162 @@
for compiling libF77 and libI77. */
#ifdef __cplusplus
extern "C" {
extern int abort_(void);
extern double c_abs(complex *);
extern void c_cos(complex *, complex *);
extern void c_div(complex *, complex *, complex *);
extern void c_exp(complex *, complex *);
extern void c_log(complex *, complex *);
extern void c_sin(complex *, complex *);
extern void c_sqrt(complex *, complex *);
extern double d_abs(double *);
extern double d_acos(double *);
extern double d_asin(double *);
extern double d_atan(double *);
extern double d_atn2(double *, double *);
extern void d_cnjg(doublecomplex *, doublecomplex *);
extern double d_cos(double *);
extern double d_cosh(double *);
extern double d_dim(double *, double *);
extern double d_exp(double *);
extern double d_imag(doublecomplex *);
extern double d_int(double *);
extern double d_lg10(double *);
extern double d_log(double *);
extern double d_mod(double *, double *);
extern double d_nint(double *);
extern double d_prod(float *, float *);
extern double d_sign(double *, double *);
extern double d_sin(double *);
extern double d_sinh(double *);
extern double d_sqrt(double *);
extern double d_tan(double *);
extern double d_tanh(double *);
extern double derf_(double *);
extern double derfc_(double *);
extern integer do_fio(ftnint *, char *, ftnlen);
extern integer do_lio(ftnint *, ftnint *, char *, ftnlen);
extern integer do_uio(ftnint *, char *, ftnlen);
extern integer e_rdfe(void);
extern integer e_rdue(void);
extern integer e_rsfe(void);
extern integer e_rsfi(void);
extern integer e_rsle(void);
extern integer e_rsli(void);
extern integer e_rsue(void);
extern integer e_wdfe(void);
extern integer e_wdue(void);
extern integer e_wsfe(void);
extern integer e_wsfi(void);
extern integer e_wsle(void);
extern integer e_wsli(void);
extern integer e_wsue(void);
extern int ef1asc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
extern integer ef1cmc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
extern double erf(double);
extern double erf_(float *);
extern double erfc(double);
extern double erfc_(float *);
extern integer f_back(alist *);
extern integer f_clos(cllist *);
extern integer f_end(alist *);
extern void f_exit(void);
extern integer f_inqu(inlist *);
extern integer f_open(olist *);
extern integer f_rew(alist *);
extern int flush_(void);
extern void getarg_(integer *, char *, ftnlen);
extern void getenv_(char *, char *, ftnlen, ftnlen);
extern short h_abs(short *);
extern short h_dim(short *, short *);
extern short h_dnnt(double *);
extern short h_indx(char *, char *, ftnlen, ftnlen);
extern short h_len(char *, ftnlen);
extern short h_mod(short *, short *);
extern short h_nint(float *);
extern short h_sign(short *, short *);
extern short hl_ge(char *, char *, ftnlen, ftnlen);
extern short hl_gt(char *, char *, ftnlen, ftnlen);
extern short hl_le(char *, char *, ftnlen, ftnlen);
extern short hl_lt(char *, char *, ftnlen, ftnlen);
extern integer i_abs(integer *);
extern integer i_dim(integer *, integer *);
extern integer i_dnnt(double *);
extern integer i_indx(char *, char *, ftnlen, ftnlen);
extern integer i_len(char *, ftnlen);
extern integer i_mod(integer *, integer *);
extern integer i_nint(float *);
extern integer i_sign(integer *, integer *);
extern integer iargc_(void);
extern ftnlen l_ge(char *, char *, ftnlen, ftnlen);
extern ftnlen l_gt(char *, char *, ftnlen, ftnlen);
extern ftnlen l_le(char *, char *, ftnlen, ftnlen);
extern ftnlen l_lt(char *, char *, ftnlen, ftnlen);
extern void pow_ci(complex *, complex *, integer *);
extern double pow_dd(double *, double *);
extern double pow_di(double *, integer *);
extern short pow_hh(short *, shortint *);
extern integer pow_ii(integer *, integer *);
extern double pow_ri(float *, integer *);
extern void pow_zi(doublecomplex *, doublecomplex *, integer *);
extern void pow_zz(doublecomplex *, doublecomplex *, doublecomplex *);
extern double r_abs(float *);
extern double r_acos(float *);
extern double r_asin(float *);
extern double r_atan(float *);
extern double r_atn2(float *, float *);
extern void r_cnjg(complex *, complex *);
extern double r_cos(float *);
extern double r_cosh(float *);
extern double r_dim(float *, float *);
extern double r_exp(float *);
extern double r_imag(complex *);
extern double r_int(float *);
extern double r_lg10(float *);
extern double r_log(float *);
extern double r_mod(float *, float *);
extern double r_nint(float *);
extern double r_sign(float *, float *);
extern double r_sin(float *);
extern double r_sinh(float *);
extern double r_sqrt(float *);
extern double r_tan(float *);
extern double r_tanh(float *);
extern void s_cat(char *, char **, integer *, integer *, ftnlen);
extern integer s_cmp(char *, char *, ftnlen, ftnlen);
extern void s_copy(char *, char *, ftnlen, ftnlen);
extern int s_paus(char *, ftnlen);
extern integer s_rdfe(cilist *);
extern integer s_rdue(cilist *);
extern integer s_rnge(char *, integer, char *, integer);
extern integer s_rsfe(cilist *);
extern integer s_rsfi(icilist *);
extern integer s_rsle(cilist *);
extern integer s_rsli(icilist *);
extern integer s_rsne(cilist *);
extern integer s_rsni(icilist *);
extern integer s_rsue(cilist *);
extern int s_stop(char *, ftnlen);
extern integer s_wdfe(cilist *);
extern integer s_wdue(cilist *);
extern integer s_wsfe(cilist *);
extern integer s_wsfi(icilist *);
extern integer s_wsle(cilist *);
extern integer s_wsli(icilist *);
extern integer s_wsne(cilist *);
extern integer s_wsni(icilist *);
extern integer s_wsue(cilist *);
extern void sig_die(char *, int);
extern integer signal_(integer *, void (*)(int));
extern integer system_(char *, ftnlen);
extern double z_abs(doublecomplex *);
extern void z_cos(doublecomplex *, doublecomplex *);
extern void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
extern void z_exp(doublecomplex *, doublecomplex *);
extern void z_log(doublecomplex *, doublecomplex *);
extern void z_sin(doublecomplex *, doublecomplex *);
extern void z_sqrt(doublecomplex *, doublecomplex *);
}
extern "C"
{
extern int abort_ (void);
extern double c_abs (complex *);
extern void c_cos (complex *, complex *);
extern void c_div (complex *, complex *, complex *);
extern void c_exp (complex *, complex *);
extern void c_log (complex *, complex *);
extern void c_sin (complex *, complex *);
extern void c_sqrt (complex *, complex *);
extern double d_abs (double *);
extern double d_acos (double *);
extern double d_asin (double *);
extern double d_atan (double *);
extern double d_atn2 (double *, double *);
extern void d_cnjg (doublecomplex *, doublecomplex *);
extern double d_cos (double *);
extern double d_cosh (double *);
extern double d_dim (double *, double *);
extern double d_exp (double *);
extern double d_imag (doublecomplex *);
extern double d_int (double *);
extern double d_lg10 (double *);
extern double d_log (double *);
extern double d_mod (double *, double *);
extern double d_nint (double *);
extern double d_prod (float *, float *);
extern double d_sign (double *, double *);
extern double d_sin (double *);
extern double d_sinh (double *);
extern double d_sqrt (double *);
extern double d_tan (double *);
extern double d_tanh (double *);
extern double derf_ (double *);
extern double derfc_ (double *);
extern integer do_fio (ftnint *, char *, ftnlen);
extern integer do_lio (ftnint *, ftnint *, char *, ftnlen);
extern integer do_uio (ftnint *, char *, ftnlen);
extern integer e_rdfe (void);
extern integer e_rdue (void);
extern integer e_rsfe (void);
extern integer e_rsfi (void);
extern integer e_rsle (void);
extern integer e_rsli (void);
extern integer e_rsue (void);
extern integer e_wdfe (void);
extern integer e_wdue (void);
extern integer e_wsfe (void);
extern integer e_wsfi (void);
extern integer e_wsle (void);
extern integer e_wsli (void);
extern integer e_wsue (void);
extern int ef1asc_ (ftnint *, ftnlen *, ftnint *, ftnlen *);
extern integer ef1cmc_ (ftnint *, ftnlen *, ftnint *, ftnlen *);
extern double erf (double);
extern double erf_ (float *);
extern double erfc (double);
extern double erfc_ (float *);
extern integer f_back (alist *);
extern integer f_clos (cllist *);
extern integer f_end (alist *);
extern void f_exit (void);
extern integer f_inqu (inlist *);
extern integer f_open (olist *);
extern integer f_rew (alist *);
extern int flush_ (void);
extern void getarg_ (integer *, char *, ftnlen);
extern void getenv_ (char *, char *, ftnlen, ftnlen);
extern short h_abs (short *);
extern short h_dim (short *, short *);
extern short h_dnnt (double *);
extern short h_indx (char *, char *, ftnlen, ftnlen);
extern short h_len (char *, ftnlen);
extern short h_mod (short *, short *);
extern short h_nint (float *);
extern short h_sign (short *, short *);
extern short hl_ge (char *, char *, ftnlen, ftnlen);
extern short hl_gt (char *, char *, ftnlen, ftnlen);
extern short hl_le (char *, char *, ftnlen, ftnlen);
extern short hl_lt (char *, char *, ftnlen, ftnlen);
extern integer i_abs (integer *);
extern integer i_dim (integer *, integer *);
extern integer i_dnnt (double *);
extern integer i_indx (char *, char *, ftnlen, ftnlen);
extern integer i_len (char *, ftnlen);
extern integer i_mod (integer *, integer *);
extern integer i_nint (float *);
extern integer i_sign (integer *, integer *);
extern integer iargc_ (void);
extern ftnlen l_ge (char *, char *, ftnlen, ftnlen);
extern ftnlen l_gt (char *, char *, ftnlen, ftnlen);
extern ftnlen l_le (char *, char *, ftnlen, ftnlen);
extern ftnlen l_lt (char *, char *, ftnlen, ftnlen);
extern void pow_ci (complex *, complex *, integer *);
extern double pow_dd (double *, double *);
extern double pow_di (double *, integer *);
extern short pow_hh (short *, shortint *);
extern integer pow_ii (integer *, integer *);
extern double pow_ri (float *, integer *);
extern void pow_zi (doublecomplex *, doublecomplex *, integer *);
extern void pow_zz (doublecomplex *, doublecomplex *, doublecomplex *);
extern double r_abs (float *);
extern double r_acos (float *);
extern double r_asin (float *);
extern double r_atan (float *);
extern double r_atn2 (float *, float *);
extern void r_cnjg (complex *, complex *);
extern double r_cos (float *);
extern double r_cosh (float *);
extern double r_dim (float *, float *);
extern double r_exp (float *);
extern double r_imag (complex *);
extern double r_int (float *);
extern double r_lg10 (float *);
extern double r_log (float *);
extern double r_mod (float *, float *);
extern double r_nint (float *);
extern double r_sign (float *, float *);
extern double r_sin (float *);
extern double r_sinh (float *);
extern double r_sqrt (float *);
extern double r_tan (float *);
extern double r_tanh (float *);
extern void s_cat (char *, char **, integer *, integer *, ftnlen);
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
extern void s_copy (char *, char *, ftnlen, ftnlen);
extern int s_paus (char *, ftnlen);
extern integer s_rdfe (cilist *);
extern integer s_rdue (cilist *);
extern integer s_rnge (char *, integer, char *, integer);
extern integer s_rsfe (cilist *);
extern integer s_rsfi (icilist *);
extern integer s_rsle (cilist *);
extern integer s_rsli (icilist *);
extern integer s_rsne (cilist *);
extern integer s_rsni (icilist *);
extern integer s_rsue (cilist *);
extern int s_stop (char *, ftnlen);
extern integer s_wdfe (cilist *);
extern integer s_wdue (cilist *);
extern integer s_wsfe (cilist *);
extern integer s_wsfi (icilist *);
extern integer s_wsle (cilist *);
extern integer s_wsli (icilist *);
extern integer s_wsne (cilist *);
extern integer s_wsni (icilist *);
extern integer s_wsue (cilist *);
extern void sig_die (char *, int);
extern integer signal_ (integer *, void (*)(int));
extern integer system_ (char *, ftnlen);
extern double z_abs (doublecomplex *);
extern void z_cos (doublecomplex *, doublecomplex *);
extern void z_div (doublecomplex *, doublecomplex *, doublecomplex *);
extern void z_exp (doublecomplex *, doublecomplex *);
extern void z_log (doublecomplex *, doublecomplex *);
extern void z_sin (doublecomplex *, doublecomplex *);
extern void z_sqrt (doublecomplex *, doublecomplex *);
}
#endif

View File

@ -6,23 +6,20 @@
* 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
void
G77_getarg_0 (ftnint * n, register char *s, ftnlen ls)
{
extern int f__xargc;
extern char **f__xargv;
register char *t;
register int i;
extern int f__xargc;
extern char **f__xargv;
register char *t;
register int i;
if(*n>=0 && *n<f__xargc)
t = f__xargv[*n];
else
t = "";
for(i = 0; i<ls && *t!='\0' ; ++i)
*s++ = *t++;
for( ; i<ls ; ++i)
*s++ = ' ';
if (*n >= 0 && *n < f__xargc)
t = f__xargv[*n];
else
t = "";
for (i = 0; i < ls && *t != '\0'; ++i)
*s++ = *t++;
for (; i < ls; ++i)
*s++ = ' ';
}

View File

@ -1,12 +1,8 @@
#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
extern char *F77_aloc (ftnlen, char *);
/*
* getenv - f77 subroutine to return environment variables
@ -20,37 +16,34 @@ extern char *F77_aloc(ftnlen, char*);
* if ENV_NAME is not defined
*/
#ifdef KR_headers
VOID
G77_getenv_0 (fname, value, flen, vlen) char *value, *fname; ftnlen vlen, flen;
#else
void
void
G77_getenv_0 (char *fname, char *value, ftnlen flen, ftnlen vlen)
#endif
{
char buf[256], *ep, *fp;
integer i;
char buf[256], *ep, *fp;
integer i;
if (flen <= 0)
goto add_blanks;
for(i = 0; i < sizeof(buf); i++) {
if (i == flen || (buf[i] = fname[i]) == ' ') {
buf[i] = 0;
ep = getenv(buf);
goto have_ep;
}
}
while(i < flen && fname[i] != ' ')
i++;
strncpy(fp = F77_aloc(i+1, "getenv_"), fname, (int)i);
fp[i] = 0;
ep = getenv(fp);
free(fp);
have_ep:
if (ep)
while(*ep && vlen-- > 0)
*value++ = *ep++;
add_blanks:
while(vlen-- > 0)
*value++ = ' ';
if (flen <= 0)
goto add_blanks;
for (i = 0; i < (integer) sizeof (buf); i++)
{
if (i == flen || (buf[i] = fname[i]) == ' ')
{
buf[i] = 0;
ep = getenv (buf);
goto have_ep;
}
}
while (i < flen && fname[i] != ' ')
i++;
strncpy (fp = F77_aloc (i + 1, "getenv_"), fname, (int) i);
fp[i] = 0;
ep = getenv (fp);
free (fp);
have_ep:
if (ep)
while (*ep && vlen-- > 0)
*value++ = *ep++;
add_blanks:
while (vlen-- > 0)
*value++ = ' ';
}

View File

@ -1,12 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
shortint h_abs(x) shortint *x;
#else
shortint h_abs(shortint *x)
#endif
shortint
h_abs (shortint * x)
{
if(*x >= 0)
return(*x);
return(- *x);
if (*x >= 0)
return (*x);
return (-*x);
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
shortint h_dim(a,b) shortint *a, *b;
#else
shortint h_dim(shortint *a, shortint *b)
#endif
shortint
h_dim (shortint * a, shortint * b)
{
return( *a > *b ? *a - *b : 0);
return (*a > *b ? *a - *b : 0);
}

View File

@ -1,13 +1,9 @@
#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
shortint
h_dnnt (doublereal * x)
{
return (shortint)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));
return (shortint) (*x >= 0. ? floor (*x + .5) : -floor (.5 - *x));
}

View File

@ -1,26 +1,23 @@
#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
shortint
h_indx (char *a, char *b, ftnlen la, ftnlen lb)
{
ftnlen i, n;
char *s, *t, *bend;
ftnlen i, n;
char *s, *t, *bend;
n = la - lb + 1;
bend = b + lb;
n = la - lb + 1;
bend = b + lb;
for(i = 0 ; i < n ; ++i)
{
s = a + i;
t = b;
while(t < bend)
if(*s++ != *t++)
goto no;
return((shortint)i+1);
no: ;
}
return(0);
for (i = 0; i < n; ++i)
{
s = a + i;
t = b;
while (t < bend)
if (*s++ != *t++)
goto no;
return ((shortint) i + 1);
no:;
}
return (0);
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
shortint h_len(s, n) char *s; ftnlen n;
#else
shortint h_len(char *s, ftnlen n)
#endif
shortint
h_len (char *s __attribute__ ((__unused__)), ftnlen n)
{
return(n);
return (n);
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
shortint h_mod(a,b) short *a, *b;
#else
shortint h_mod(short *a, short *b)
#endif
shortint
h_mod (short *a, short *b)
{
return( *a % *b);
return (*a % *b);
}

View File

@ -1,13 +1,9 @@
#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
shortint
h_nint (real * x)
{
return (shortint)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
return (shortint) (*x >= 0 ? floor (*x + .5) : -floor (.5 - *x));
}

View File

@ -1,12 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
shortint h_sign(a,b) shortint *a, *b;
#else
shortint h_sign(shortint *a, shortint *b)
#endif
shortint
h_sign (shortint * a, shortint * b)
{
shortint x;
x = (*a >= 0 ? *a : - *a);
return( *b >= 0 ? x : -x);
shortint x;
x = (*a >= 0 ? *a : -*a);
return (*b >= 0 ? x : -x);
}

View File

@ -1,12 +1,8 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
shortlogical
hl_ge (char *a, char *b, ftnlen la, ftnlen lb)
{
return(s_cmp(a,b,la,lb) >= 0);
return (s_cmp (a, b, la, lb) >= 0);
}

View File

@ -1,12 +1,8 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
shortlogical
hl_gt (char *a, char *b, ftnlen la, ftnlen lb)
{
return(s_cmp(a,b,la,lb) > 0);
return (s_cmp (a, b, la, lb) > 0);
}

View File

@ -1,12 +1,8 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
shortlogical
hl_le (char *a, char *b, ftnlen la, ftnlen lb)
{
return(s_cmp(a,b,la,lb) <= 0);
return (s_cmp (a, b, la, lb) <= 0);
}

View File

@ -1,12 +1,8 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
shortlogical
hl_lt (char *a, char *b, ftnlen la, ftnlen lb)
{
return(s_cmp(a,b,la,lb) < 0);
return (s_cmp (a, b, la, lb) < 0);
}

View File

@ -1,12 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
integer i_abs(x) integer *x;
#else
integer i_abs(integer *x)
#endif
integer
i_abs (integer * x)
{
if(*x >= 0)
return(*x);
return(- *x);
if (*x >= 0)
return (*x);
return (-*x);
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
integer i_dim(a,b) integer *a, *b;
#else
integer i_dim(integer *a, integer *b)
#endif
integer
i_dim (integer * a, integer * b)
{
return( *a > *b ? *a - *b : 0);
return (*a > *b ? *a - *b : 0);
}

View File

@ -1,13 +1,9 @@
#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
integer
i_dnnt (doublereal * x)
{
return (integer)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));
return (integer) (*x >= 0. ? floor (*x + .5) : -floor (.5 - *x));
}

View File

@ -1,26 +1,23 @@
#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
integer
i_indx (char *a, char *b, ftnlen la, ftnlen lb)
{
ftnlen i, n;
char *s, *t, *bend;
ftnlen i, n;
char *s, *t, *bend;
n = la - lb + 1;
bend = b + lb;
n = la - lb + 1;
bend = b + lb;
for(i = 0 ; i < n ; ++i)
{
s = a + i;
t = b;
while(t < bend)
if(*s++ != *t++)
goto no;
return(i+1);
no: ;
}
return(0);
for (i = 0; i < n; ++i)
{
s = a + i;
t = b;
while (t < bend)
if (*s++ != *t++)
goto no;
return (i + 1);
no:;
}
return (0);
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
integer i_len(s, n) char *s; ftnlen n;
#else
integer i_len(char *s, ftnlen n)
#endif
integer
i_len (char *s __attribute__ ((__unused__)), ftnlen n)
{
return(n);
return (n);
}

View File

@ -1,10 +1,7 @@
#include "f2c.h"
#ifdef KR_headers
integer i_mod(a,b) integer *a, *b;
#else
integer i_mod(integer *a, integer *b)
#endif
integer
i_mod (integer * a, integer * b)
{
return( *a % *b);
return (*a % *b);
}

View File

@ -1,13 +1,9 @@
#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
integer
i_nint (real * x)
{
return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
return (integer) (*x >= 0 ? floor (*x + .5) : -floor (.5 - *x));
}

View File

@ -1,12 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
integer i_sign(a,b) integer *a, *b;
#else
integer i_sign(integer *a, integer *b)
#endif
integer
i_sign (integer * a, integer * b)
{
integer x;
x = (*a >= 0 ? *a : - *a);
return( *b >= 0 ? x : -x);
integer x;
x = (*a >= 0 ? *a : -*a);
return (*b >= 0 ? x : -x);
}

View File

@ -1,11 +1,8 @@
#include "f2c.h"
#ifdef KR_headers
ftnint G77_iargc_0 ()
#else
ftnint G77_iargc_0 (void)
#endif
ftnint
G77_iargc_0 (void)
{
extern int f__xargc;
return ( f__xargc - 1 );
extern int f__xargc;
return (f__xargc - 1);
}

View File

@ -1,12 +1,8 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
logical
l_ge (char *a, char *b, ftnlen la, ftnlen lb)
{
return(s_cmp(a,b,la,lb) >= 0);
return (s_cmp (a, b, la, lb) >= 0);
}

View File

@ -1,12 +1,8 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
logical
l_gt (char *a, char *b, ftnlen la, ftnlen lb)
{
return(s_cmp(a,b,la,lb) > 0);
return (s_cmp (a, b, la, lb) > 0);
}

View File

@ -1,12 +1,8 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
logical
l_le (char *a, char *b, ftnlen la, ftnlen lb)
{
return(s_cmp(a,b,la,lb) <= 0);
return (s_cmp (a, b, la, lb) <= 0);
}

View File

@ -1,12 +1,8 @@
#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
extern integer s_cmp (char *, char *, ftnlen, ftnlen);
logical
l_lt (char *a, char *b, ftnlen la, ftnlen lb)
{
return(s_cmp(a,b,la,lb) < 0);
return (s_cmp (a, b, la, lb) < 0);
}

View File

@ -4,59 +4,55 @@
#define LONGBITS 32
#endif
integer
#ifdef KR_headers
lbit_bits(a, b, len) integer a, b, len;
#else
lbit_bits(integer a, integer b, integer len)
#endif
integer
lbit_bits (integer a, integer b, integer len)
{
/* Assume 2's complement arithmetic */
/* Assume 2's complement arithmetic */
unsigned long x, y;
unsigned long x, y;
x = (unsigned long) a;
y = (unsigned long)-1L;
x >>= b;
y <<= len;
return (integer)(x & ~y);
}
x = (unsigned long) a;
y = (unsigned long) -1L;
x >>= b;
y <<= len;
return (integer) (x & ~y);
}
integer
#ifdef KR_headers
lbit_cshift(a, b, len) integer a, b, len;
#else
lbit_cshift(integer a, integer b, integer len)
#endif
integer
lbit_cshift (integer a, integer b, integer len)
{
unsigned long x, y, z;
unsigned long x, y, z;
x = (unsigned long)a;
if (len <= 0) {
if (len == 0)
return 0;
goto full_len;
}
if (len >= LONGBITS) {
full_len:
if (b >= 0) {
b %= LONGBITS;
return (integer)(x << b | x >> LONGBITS -b );
}
b = -b;
b %= LONGBITS;
return (integer)(x << LONGBITS - b | x >> b);
}
y = z = (unsigned long)-1;
y <<= len;
z &= ~y;
y &= x;
x &= z;
if (b >= 0) {
b %= len;
return (integer)(y | z & (x << b | x >> len - b));
}
b = -b;
b %= len;
return (integer)(y | z & (x >> b | x << len - b));
x = (unsigned long) a;
if (len <= 0)
{
if (len == 0)
return 0;
goto full_len;
}
if (len >= LONGBITS)
{
full_len:
if (b >= 0)
{
b %= LONGBITS;
return (integer) (x << b | x >> (LONGBITS - b));
}
b = -b;
b %= LONGBITS;
return (integer) (x << (LONGBITS - b) | x >> b);
}
y = z = (unsigned long) -1;
y <<= len;
z &= ~y;
y &= x;
x &= z;
if (b >= 0)
{
b %= len;
return (integer) (y | (z & (x << b | x >> (len - b))));
}
b = -b;
b %= len;
return (integer) (y | (z & (x >> b | x << (len - b))));
}

View File

@ -1,11 +1,7 @@
#include "f2c.h"
integer
#ifdef KR_headers
lbit_shift(a, b) integer a; integer b;
#else
lbit_shift(integer a, integer b)
#endif
integer
lbit_shift (integer a, integer b)
{
return b >= 0 ? a << b : (integer)((uinteger)a >> -b);
}
return b >= 0 ? a << b : (integer) ((uinteger) a >> -b);
}

View File

@ -3,66 +3,33 @@
#include <stdio.h>
#include "signal1.h"
#ifndef KR_headers
#undef VOID
#include <stdlib.h>
#endif
#ifndef VOID
#define VOID void
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef NO__STDC
#define ONEXIT onexit
extern VOID f_exit();
#else
#ifndef KR_headers
extern void f_exit(void);
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
extern int atexit (void (*)(void));
#endif
#ifdef KR_headers
extern VOID f_init();
extern int MAIN__();
#else
extern void f_init(void);
extern int MAIN__(void);
#endif
extern void f_init (void);
extern int MAIN__ (void);
extern void f_setarg (int, char **);
extern void f_setsig (void);
#ifdef __cplusplus
}
#endif
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
main(int argc, char **argv)
#endif
int
main (int argc, char **argv)
{
f_setarg(argc, argv);
f_setsig();
f_init();
f_setarg (argc, argv);
f_setsig ();
f_init ();
#ifndef NO_ONEXIT
ONEXIT(f_exit);
ONEXIT (f_exit);
#endif
MAIN__();
MAIN__ ();
#ifdef NO_ONEXIT
f_exit();
f_exit ();
#endif
exit(0); /* exit(0) rather than return(0) to bypass Cray bug */
return 0; /* For compilers that complain of missing return values; */
/* others will complain that this is unreachable code. */
exit (0); /* exit(0) rather than return(0) to bypass Cray bug */
return 0; /* For compilers that complain of missing return values; */
/* others will complain that this is unreachable code. */
}

View File

@ -1,20 +1,16 @@
#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
extern void pow_zi (doublecomplex *, doublecomplex *, integer *);
void
pow_ci (complex * p, complex * a, integer * b) /* p = a**b */
{
doublecomplex p1, a1;
doublecomplex p1, a1;
a1.r = a->r;
a1.i = a->i;
a1.r = a->r;
a1.i = a->i;
pow_zi(&p1, &a1, b);
pow_zi (&p1, &a1, b);
p->r = p1.r;
p->i = p1.i;
p->r = p1.r;
p->i = p1.i;
}

View File

@ -1,13 +1,9 @@
#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
double
pow_dd (doublereal * ap, doublereal * bp)
{
return(pow(*ap, *bp) );
return (pow (*ap, *bp));
}

View File

@ -1,35 +1,32 @@
#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_di (doublereal * ap, integer * bp)
{
double pow, x;
integer n;
unsigned long u;
double pow, x;
integer n;
unsigned long u;
pow = 1;
x = *ap;
n = *bp;
pow = 1;
x = *ap;
n = *bp;
if(n != 0)
if (n != 0)
{
if (n < 0)
{
if(n < 0)
{
n = -n;
x = 1/x;
}
for(u = n; ; )
{
if(u & 01)
pow *= x;
if(u >>= 1)
x *= x;
else
break;
}
n = -n;
x = 1 / x;
}
return(pow);
for (u = n;;)
{
if (u & 01)
pow *= x;
if (u >>= 1)
x *= x;
else
break;
}
}
return (pow);
}

View File

@ -1,33 +1,31 @@
#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_hh (shortint * ap, shortint * bp)
{
shortint pow, x, n;
unsigned u;
shortint pow, x, n;
unsigned u;
x = *ap;
n = *bp;
x = *ap;
n = *bp;
if (n <= 0) {
if (n == 0 || x == 1)
return 1;
if (x != -1)
return x == 0 ? 1/x : 0;
n = -n;
}
u = n;
for(pow = 1; ; )
{
if(u & 01)
pow *= x;
if(u >>= 1)
x *= x;
else
break;
}
return(pow);
}
if (n <= 0)
{
if (n == 0 || x == 1)
return 1;
if (x != -1)
return x == 0 ? 1 / x : 0;
n = -n;
}
u = n;
for (pow = 1;;)
{
if (u & 01)
pow *= x;
if (u >>= 1)
x *= x;
else
break;
}
return (pow);
}

View File

@ -1,33 +1,31 @@
#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_ii (integer * ap, integer * bp)
{
integer pow, x, n;
unsigned long u;
integer pow, x, n;
unsigned long u;
x = *ap;
n = *bp;
x = *ap;
n = *bp;
if (n <= 0) {
if (n == 0 || x == 1)
return 1;
if (x != -1)
return x == 0 ? 1/x : 0;
n = -n;
}
u = n;
for(pow = 1; ; )
{
if(u & 01)
pow *= x;
if(u >>= 1)
x *= x;
else
break;
}
return(pow);
}
if (n <= 0)
{
if (n == 0 || x == 1)
return 1;
if (x != -1)
return x == 0 ? 1 / x : 0;
n = -n;
}
u = n;
for (pow = 1;;)
{
if (u & 01)
pow *= x;
if (u >>= 1)
x *= x;
else
break;
}
return (pow);
}

View File

@ -1,33 +1,31 @@
#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_qq (longint * ap, longint * bp)
{
longint pow, x, n;
unsigned long long u; /* system-dependent */
longint pow, x, n;
unsigned long long u; /* system-dependent */
x = *ap;
n = *bp;
x = *ap;
n = *bp;
if (n <= 0) {
if (n == 0 || x == 1)
return 1;
if (x != -1)
return x == 0 ? 1/x : 0;
n = -n;
}
u = n;
for(pow = 1; ; )
{
if(u & 01)
pow *= x;
if(u >>= 1)
x *= x;
else
break;
}
return(pow);
}
if (n <= 0)
{
if (n == 0 || x == 1)
return 1;
if (x != -1)
return x == 0 ? 1 / x : 0;
n = -n;
}
u = n;
for (pow = 1;;)
{
if (u & 01)
pow *= x;
if (u >>= 1)
x *= x;
else
break;
}
return (pow);
}

View File

@ -1,35 +1,32 @@
#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_ri (real * ap, integer * bp)
{
double pow, x;
integer n;
unsigned long u;
double pow, x;
integer n;
unsigned long u;
pow = 1;
x = *ap;
n = *bp;
pow = 1;
x = *ap;
n = *bp;
if(n != 0)
if (n != 0)
{
if (n < 0)
{
if(n < 0)
{
n = -n;
x = 1/x;
}
for(u = n; ; )
{
if(u & 01)
pow *= x;
if(u >>= 1)
x *= x;
else
break;
}
n = -n;
x = 1 / x;
}
return(pow);
for (u = n;;)
{
if (u & 01)
pow *= x;
if (u >>= 1)
x *= x;
else
break;
}
}
return (pow);
}

View File

@ -1,54 +1,50 @@
#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
extern void z_div (doublecomplex *, doublecomplex *, doublecomplex *);
void
pow_zi (doublecomplex * p, doublecomplex * a, integer * b) /* p = a**b */
{
integer n;
unsigned long u;
double t;
doublecomplex q, x;
static doublecomplex one = {1.0, 0.0};
integer n;
unsigned long u;
double t;
doublecomplex q, x;
static doublecomplex one = { 1.0, 0.0 };
n = *b;
q.r = 1;
q.i = 0;
n = *b;
q.r = 1;
q.i = 0;
if(n == 0)
goto done;
if(n < 0)
{
n = -n;
z_div(&x, &one, a);
}
else
{
x.r = a->r;
x.i = a->i;
}
if (n == 0)
goto done;
if (n < 0)
{
n = -n;
z_div (&x, &one, a);
}
else
{
x.r = a->r;
x.i = a->i;
}
for(u = n; ; )
{
if(u & 01)
{
t = q.r * x.r - q.i * x.i;
q.i = q.r * x.i + q.i * x.r;
q.r = t;
}
if(u >>= 1)
{
t = x.r * x.r - x.i * x.i;
x.i = 2 * x.r * x.i;
x.r = t;
}
else
break;
}
done:
p->i = q.i;
p->r = q.r;
for (u = n;;)
{
if (u & 01)
{
t = q.r * x.r - q.i * x.i;
q.i = q.r * x.i + q.i * x.r;
q.r = t;
}
if (u >>= 1)
{
t = x.r * x.r - x.i * x.i;
x.i = 2 * x.r * x.i;
x.r = t;
}
else
break;
}
done:
p->i = q.i;
p->r = q.r;
}

View File

@ -1,23 +1,25 @@
#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
extern double f__cabs (double, double);
void
pow_zz (doublecomplex * r, doublecomplex * a, doublecomplex * b)
{
double logr, logi, x, y;
double logr, logi, x, y;
logr = log( f__cabs(a->r, a->i) );
logi = atan2(a->i, a->r);
if (a->r == 0.0 && a->i == 0.0)
{
/* Algorithm below doesn't cope. */
r->r = r->i = 0.0;
return;
}
logr = log (f__cabs (a->r, a->i));
logi = atan2 (a->i, a->r);
x = exp( logr * b->r - logi * b->i );
y = logr * b->i + logi * b->r;
x = exp (logr * b->r - logi * b->i);
y = logr * b->i + logi * b->r;
r->r = x * cos(y);
r->i = x * sin(y);
r->r = x * cos (y);
r->i = x * sin (y);
}

View File

@ -8,59 +8,55 @@
#define LONG8BITS (2*LONGBITS)
#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
integer
qbit_bits (longint a, integer b, integer len)
{
/* Assume 2's complement arithmetic */
/* Assume 2's complement arithmetic */
ulongint x, y;
ulongint x, y;
x = (ulongint) a;
y = (ulongint)-1L;
x >>= b;
y <<= len;
return (longint)(x & y);
}
x = (ulongint) a;
y = (ulongint) - 1L;
x >>= b;
y <<= len;
return (longint) (x & y);
}
longint
#ifdef KR_headers
qbit_cshift(a, b, len) longint a; integer b, len;
#else
qbit_cshift(longint a, integer b, integer len)
#endif
longint
qbit_cshift (longint a, integer b, integer len)
{
ulongint x, y, z;
ulongint x, y, z;
x = (ulongint)a;
if (len <= 0) {
if (len == 0)
return 0;
goto full_len;
}
if (len >= LONG8BITS) {
full_len:
if (b >= 0) {
b %= LONG8BITS;
return (longint)(x << b | x >> LONG8BITS - b );
}
b = -b;
b %= LONG8BITS;
return (longint)(x << LONG8BITS - b | x >> b);
}
y = z = (unsigned long)-1;
y <<= len;
z &= ~y;
y &= x;
x &= z;
if (b >= 0) {
b %= len;
return (longint)(y | z & (x << b | x >> len - b));
}
b = -b;
b %= len;
return (longint)(y | z & (x >> b | x << len - b));
x = (ulongint) a;
if (len <= 0)
{
if (len == 0)
return 0;
goto full_len;
}
if (len >= LONG8BITS)
{
full_len:
if (b >= 0)
{
b %= LONG8BITS;
return (longint) (x << b | x >> (LONG8BITS - b));
}
b = -b;
b %= LONG8BITS;
return (longint) (x << (LONG8BITS - b) | x >> b);
}
y = z = (unsigned long) -1;
y <<= len;
z &= ~y;
y &= x;
x &= z;
if (b >= 0)
{
b %= len;
return (longint) (y | (z & (x << b | x >> (len - b))));
}
b = -b;
b %= len;
return (longint) (y | (z & (x >> b | x << (len - b))));
}

View File

@ -1,11 +1,7 @@
#include "f2c.h"
longint
#ifdef KR_headers
qbit_shift(a, b) longint a; integer b;
#else
qbit_shift(longint a, integer b)
#endif
longint
qbit_shift (longint a, integer b)
{
return b >= 0 ? a << b : (longint)((ulongint)a >> -b);
}
return b >= 0 ? a << b : (longint) ((ulongint) a >> -b);
}

View File

@ -1,12 +1,9 @@
#include "f2c.h"
#ifdef KR_headers
double r_abs(x) real *x;
#else
double r_abs(real *x)
#endif
double
r_abs (real * x)
{
if(*x >= 0)
return(*x);
return(- *x);
if (*x >= 0)
return (*x);
return (-*x);
}

View File

@ -1,13 +1,9 @@
#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
double
r_acos (real * x)
{
return( acos(*x) );
return (acos (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
r_asin (real * x)
{
return( asin(*x) );
return (asin (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
r_atan (real * x)
{
return( atan(*x) );
return (atan (*x));
}

View File

@ -1,13 +1,9 @@
#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
double
r_atn2 (real * x, real * y)
{
return( atan2(*x,*y) );
return (atan2 (*x, *y));
}

Some files were not shown because too many files have changed in this diff Show More