summaryrefslogtreecommitdiffstats
path: root/contrib/libf2c/libF77
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-07-11 03:42:19 +0000
committerkan <kan@FreeBSD.org>2003-07-11 03:42:19 +0000
commit7b704871fdac058719f34a1e6b9de71ee76c5be4 (patch)
treeddafd6196c36e6100eb4f969af01a11ee9c83a81 /contrib/libf2c/libF77
parentbb754981e6f83bc1f224dc4b7f478d80024e6c9f (diff)
downloadFreeBSD-src-7b704871fdac058719f34a1e6b9de71ee76c5be4.zip
FreeBSD-src-7b704871fdac058719f34a1e6b9de71ee76c5be4.tar.gz
Gcc 3.3.1-pre 2003-07-11 libf2c bits.
Diffstat (limited to 'contrib/libf2c/libF77')
-rw-r--r--contrib/libf2c/libF77/F77_aloc.c38
-rw-r--r--contrib/libf2c/libF77/Makefile.in4
-rw-r--r--contrib/libf2c/libF77/Version.c18
-rw-r--r--contrib/libf2c/libF77/abort_.c15
-rw-r--r--contrib/libf2c/libF77/c_abs.c13
-rw-r--r--contrib/libf2c/libF77/c_cos.c17
-rw-r--r--contrib/libf2c/libF77/c_div.c74
-rw-r--r--contrib/libf2c/libF77/c_exp.c19
-rw-r--r--contrib/libf2c/libF77/c_log.c18
-rw-r--r--contrib/libf2c/libF77/c_sin.c17
-rw-r--r--contrib/libf2c/libF77/c_sqrt.c51
-rw-r--r--contrib/libf2c/libF77/cabs.c39
-rwxr-xr-xcontrib/libf2c/libF77/configure110
-rw-r--r--contrib/libf2c/libF77/configure.in11
-rw-r--r--contrib/libf2c/libF77/d_abs.c13
-rw-r--r--contrib/libf2c/libF77/d_acos.c10
-rw-r--r--contrib/libf2c/libF77/d_asin.c10
-rw-r--r--contrib/libf2c/libF77/d_atan.c10
-rw-r--r--contrib/libf2c/libF77/d_atn2.c10
-rw-r--r--contrib/libf2c/libF77/d_cnjg.c16
-rw-r--r--contrib/libf2c/libF77/d_cos.c10
-rw-r--r--contrib/libf2c/libF77/d_cosh.c10
-rw-r--r--contrib/libf2c/libF77/d_dim.c9
-rw-r--r--contrib/libf2c/libF77/d_exp.c10
-rw-r--r--contrib/libf2c/libF77/d_imag.c9
-rw-r--r--contrib/libf2c/libF77/d_int.c10
-rw-r--r--contrib/libf2c/libF77/d_lg10.c10
-rw-r--r--contrib/libf2c/libF77/d_log.c10
-rw-r--r--contrib/libf2c/libF77/d_mod.c49
-rw-r--r--contrib/libf2c/libF77/d_nint.c11
-rw-r--r--contrib/libf2c/libF77/d_prod.c9
-rw-r--r--contrib/libf2c/libF77/d_sign.c13
-rw-r--r--contrib/libf2c/libF77/d_sin.c10
-rw-r--r--contrib/libf2c/libF77/d_sinh.c10
-rw-r--r--contrib/libf2c/libF77/d_sqrt.c10
-rw-r--r--contrib/libf2c/libF77/d_tan.c10
-rw-r--r--contrib/libf2c/libF77/d_tanh.c10
-rw-r--r--contrib/libf2c/libF77/derf_.c12
-rw-r--r--contrib/libf2c/libF77/derfc_.c13
-rw-r--r--contrib/libf2c/libF77/dtime_.c36
-rw-r--r--contrib/libf2c/libF77/ef1asc_.c14
-rw-r--r--contrib/libf2c/libF77/ef1cmc_.c12
-rw-r--r--contrib/libf2c/libF77/erf_.c12
-rw-r--r--contrib/libf2c/libF77/erfc_.c12
-rw-r--r--contrib/libf2c/libF77/etime_.c24
-rw-r--r--contrib/libf2c/libF77/exit_.c22
-rw-r--r--contrib/libf2c/libF77/f2ch.add315
-rw-r--r--contrib/libf2c/libF77/getarg_.c31
-rw-r--r--contrib/libf2c/libF77/getenv_.c63
-rw-r--r--contrib/libf2c/libF77/h_abs.c13
-rw-r--r--contrib/libf2c/libF77/h_dim.c9
-rw-r--r--contrib/libf2c/libF77/h_dnnt.c10
-rw-r--r--contrib/libf2c/libF77/h_indx.c37
-rw-r--r--contrib/libf2c/libF77/h_len.c9
-rw-r--r--contrib/libf2c/libF77/h_mod.c9
-rw-r--r--contrib/libf2c/libF77/h_nint.c10
-rw-r--r--contrib/libf2c/libF77/h_sign.c13
-rw-r--r--contrib/libf2c/libF77/hl_ge.c12
-rw-r--r--contrib/libf2c/libF77/hl_gt.c12
-rw-r--r--contrib/libf2c/libF77/hl_le.c12
-rw-r--r--contrib/libf2c/libF77/hl_lt.c12
-rw-r--r--contrib/libf2c/libF77/i_abs.c13
-rw-r--r--contrib/libf2c/libF77/i_dim.c9
-rw-r--r--contrib/libf2c/libF77/i_dnnt.c10
-rw-r--r--contrib/libf2c/libF77/i_indx.c37
-rw-r--r--contrib/libf2c/libF77/i_len.c9
-rw-r--r--contrib/libf2c/libF77/i_mod.c9
-rw-r--r--contrib/libf2c/libF77/i_nint.c10
-rw-r--r--contrib/libf2c/libF77/i_sign.c13
-rw-r--r--contrib/libf2c/libF77/iargc_.c11
-rw-r--r--contrib/libf2c/libF77/l_ge.c12
-rw-r--r--contrib/libf2c/libF77/l_gt.c12
-rw-r--r--contrib/libf2c/libF77/l_le.c12
-rw-r--r--contrib/libf2c/libF77/l_lt.c12
-rw-r--r--contrib/libf2c/libF77/lbitbits.c94
-rw-r--r--contrib/libf2c/libF77/lbitshft.c12
-rw-r--r--contrib/libf2c/libF77/main.c67
-rw-r--r--contrib/libf2c/libF77/pow_ci.c22
-rw-r--r--contrib/libf2c/libF77/pow_dd.c10
-rw-r--r--contrib/libf2c/libF77/pow_di.c51
-rw-r--r--contrib/libf2c/libF77/pow_hh.c54
-rw-r--r--contrib/libf2c/libF77/pow_ii.c54
-rw-r--r--contrib/libf2c/libF77/pow_qq.c54
-rw-r--r--contrib/libf2c/libF77/pow_ri.c51
-rw-r--r--contrib/libf2c/libF77/pow_zi.c90
-rw-r--r--contrib/libf2c/libF77/pow_zz.c30
-rw-r--r--contrib/libf2c/libF77/qbitbits.c94
-rw-r--r--contrib/libf2c/libF77/qbitshft.c12
-rw-r--r--contrib/libf2c/libF77/r_abs.c13
-rw-r--r--contrib/libf2c/libF77/r_acos.c10
-rw-r--r--contrib/libf2c/libF77/r_asin.c10
-rw-r--r--contrib/libf2c/libF77/r_atan.c10
-rw-r--r--contrib/libf2c/libF77/r_atn2.c10
-rw-r--r--contrib/libf2c/libF77/r_cnjg.c15
-rw-r--r--contrib/libf2c/libF77/r_cos.c10
-rw-r--r--contrib/libf2c/libF77/r_cosh.c10
-rw-r--r--contrib/libf2c/libF77/r_dim.c9
-rw-r--r--contrib/libf2c/libF77/r_exp.c10
-rw-r--r--contrib/libf2c/libF77/r_imag.c9
-rw-r--r--contrib/libf2c/libF77/r_int.c10
-rw-r--r--contrib/libf2c/libF77/r_lg10.c10
-rw-r--r--contrib/libf2c/libF77/r_log.c10
-rw-r--r--contrib/libf2c/libF77/r_mod.c49
-rw-r--r--contrib/libf2c/libF77/r_nint.c11
-rw-r--r--contrib/libf2c/libF77/r_sign.c13
-rw-r--r--contrib/libf2c/libF77/r_sin.c10
-rw-r--r--contrib/libf2c/libF77/r_sinh.c10
-rw-r--r--contrib/libf2c/libF77/r_sqrt.c10
-rw-r--r--contrib/libf2c/libF77/r_tan.c10
-rw-r--r--contrib/libf2c/libF77/r_tanh.c10
-rw-r--r--contrib/libf2c/libF77/s_cat.c103
-rw-r--r--contrib/libf2c/libF77/s_cmp.c75
-rw-r--r--contrib/libf2c/libF77/s_copy.c57
-rw-r--r--contrib/libf2c/libF77/s_paus.c117
-rw-r--r--contrib/libf2c/libF77/s_rnge.c32
-rw-r--r--contrib/libf2c/libF77/s_stop.c38
-rw-r--r--contrib/libf2c/libF77/setarg.c23
-rw-r--r--contrib/libf2c/libF77/setsig.c87
-rw-r--r--contrib/libf2c/libF77/sig_die.c46
-rw-r--r--contrib/libf2c/libF77/signal1.h017
-rw-r--r--contrib/libf2c/libF77/signal_.c15
-rw-r--r--contrib/libf2c/libF77/system_.c38
-rw-r--r--contrib/libf2c/libF77/z_abs.c12
-rw-r--r--contrib/libf2c/libF77/z_cos.c16
-rw-r--r--contrib/libf2c/libF77/z_div.c69
-rw-r--r--contrib/libf2c/libF77/z_exp.c18
-rw-r--r--contrib/libf2c/libF77/z_log.c98
-rw-r--r--contrib/libf2c/libF77/z_sin.c16
-rw-r--r--contrib/libf2c/libF77/z_sqrt.c42
129 files changed, 1457 insertions, 2042 deletions
diff --git a/contrib/libf2c/libF77/F77_aloc.c b/contrib/libf2c/libF77/F77_aloc.c
index e329a1b..b286102 100644
--- a/contrib/libf2c/libF77/F77_aloc.c
+++ b/contrib/libf2c/libF77/F77_aloc.c
@@ -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;
+}
diff --git a/contrib/libf2c/libF77/Makefile.in b/contrib/libf2c/libF77/Makefile.in
index 4f6730d..07af6eb 100644
--- a/contrib/libf2c/libF77/Makefile.in
+++ b/contrib/libf2c/libF77/Makefile.in
@@ -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
diff --git a/contrib/libf2c/libF77/Version.c b/contrib/libf2c/libF77/Version.c
index a8c9e24..a27b0df 100644
--- a/contrib/libf2c/libF77/Version.c
+++ b/contrib/libf2c/libF77/Version.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/abort_.c b/contrib/libf2c/libF77/abort_.c
index f0c2f8d..761bc3b 100644
--- a/contrib/libf2c/libF77/abort_.c
+++ b/contrib/libf2c/libF77/abort_.c
@@ -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 */
}
diff --git a/contrib/libf2c/libF77/c_abs.c b/contrib/libf2c/libF77/c_abs.c
index 041fbd3..3fc4d7c 100644
--- a/contrib/libf2c/libF77/c_abs.c
+++ b/contrib/libf2c/libF77/c_abs.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/c_cos.c b/contrib/libf2c/libF77/c_cos.c
index 549953d..5965975 100644
--- a/contrib/libf2c/libF77/c_cos.c
+++ b/contrib/libf2c/libF77/c_cos.c
@@ -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);
+}
diff --git a/contrib/libf2c/libF77/c_div.c b/contrib/libf2c/libF77/c_div.c
index 4d153b4..b5ede0e 100644
--- a/contrib/libf2c/libF77/c_div.c
+++ b/contrib/libf2c/libF77/c_div.c
@@ -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;
+}
diff --git a/contrib/libf2c/libF77/c_exp.c b/contrib/libf2c/libF77/c_exp.c
index 52d0d2f..56a8695 100644
--- a/contrib/libf2c/libF77/c_exp.c
+++ b/contrib/libf2c/libF77/c_exp.c
@@ -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);
+}
diff --git a/contrib/libf2c/libF77/c_log.c b/contrib/libf2c/libF77/c_log.c
index 24d1a3c..7d5b951 100644
--- a/contrib/libf2c/libF77/c_log.c
+++ b/contrib/libf2c/libF77/c_log.c
@@ -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));
+}
diff --git a/contrib/libf2c/libF77/c_sin.c b/contrib/libf2c/libF77/c_sin.c
index 93a5766..44bce9f 100644
--- a/contrib/libf2c/libF77/c_sin.c
+++ b/contrib/libf2c/libF77/c_sin.c
@@ -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);
+}
diff --git a/contrib/libf2c/libF77/c_sqrt.c b/contrib/libf2c/libF77/c_sqrt.c
index 8481ee4..81b72fc 100644
--- a/contrib/libf2c/libF77/c_sqrt.c
+++ b/contrib/libf2c/libF77/c_sqrt.c
@@ -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;
+ }
+}
diff --git a/contrib/libf2c/libF77/cabs.c b/contrib/libf2c/libF77/cabs.c
index 2fad044..5d2142e 100644
--- a/contrib/libf2c/libF77/cabs.c
+++ b/contrib/libf2c/libF77/cabs.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/configure b/contrib/libf2c/libF77/configure
index 5b6a257..4e198c8 100755
--- a/contrib/libf2c/libF77/configure
+++ b/contrib/libf2c/libF77/configure
@@ -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
diff --git a/contrib/libf2c/libF77/configure.in b/contrib/libf2c/libF77/configure.in
index ae34d36..838ce96 100644
--- a/contrib/libf2c/libF77/configure.in
+++ b/contrib/libf2c/libF77/configure.in
@@ -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,
diff --git a/contrib/libf2c/libF77/d_abs.c b/contrib/libf2c/libF77/d_abs.c
index cb157e0..a43a5c7 100644
--- a/contrib/libf2c/libF77/d_abs.c
+++ b/contrib/libf2c/libF77/d_abs.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/d_acos.c b/contrib/libf2c/libF77/d_acos.c
index 33da536..41c4f17 100644
--- a/contrib/libf2c/libF77/d_acos.c
+++ b/contrib/libf2c/libF77/d_acos.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_asin.c b/contrib/libf2c/libF77/d_asin.c
index 79b33ca..6560389 100644
--- a/contrib/libf2c/libF77/d_asin.c
+++ b/contrib/libf2c/libF77/d_asin.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_atan.c b/contrib/libf2c/libF77/d_atan.c
index caea4a4..e25fa2e 100644
--- a/contrib/libf2c/libF77/d_atan.c
+++ b/contrib/libf2c/libF77/d_atan.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_atn2.c b/contrib/libf2c/libF77/d_atn2.c
index 6748a55..e0b2178 100644
--- a/contrib/libf2c/libF77/d_atn2.c
+++ b/contrib/libf2c/libF77/d_atn2.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_cnjg.c b/contrib/libf2c/libF77/d_cnjg.c
index c1970a5..bc46ae6 100644
--- a/contrib/libf2c/libF77/d_cnjg.c
+++ b/contrib/libf2c/libF77/d_cnjg.c
@@ -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;
+}
diff --git a/contrib/libf2c/libF77/d_cos.c b/contrib/libf2c/libF77/d_cos.c
index fa4d6ca..010db6b 100644
--- a/contrib/libf2c/libF77/d_cos.c
+++ b/contrib/libf2c/libF77/d_cos.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_cosh.c b/contrib/libf2c/libF77/d_cosh.c
index edc0ebc..00938bd 100644
--- a/contrib/libf2c/libF77/d_cosh.c
+++ b/contrib/libf2c/libF77/d_cosh.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_dim.c b/contrib/libf2c/libF77/d_dim.c
index 1d0ecb7..a4274ca 100644
--- a/contrib/libf2c/libF77/d_dim.c
+++ b/contrib/libf2c/libF77/d_dim.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/d_exp.c b/contrib/libf2c/libF77/d_exp.c
index be12fd7..7b4f3e5 100644
--- a/contrib/libf2c/libF77/d_exp.c
+++ b/contrib/libf2c/libF77/d_exp.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_imag.c b/contrib/libf2c/libF77/d_imag.c
index 793a3f9..cc93764 100644
--- a/contrib/libf2c/libF77/d_imag.c
+++ b/contrib/libf2c/libF77/d_imag.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/d_int.c b/contrib/libf2c/libF77/d_int.c
index beff1e7..f7ab8b0 100644
--- a/contrib/libf2c/libF77/d_int.c
+++ b/contrib/libf2c/libF77/d_int.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_lg10.c b/contrib/libf2c/libF77/d_lg10.c
index c0892bd..d0f86e5 100644
--- a/contrib/libf2c/libF77/d_lg10.c
+++ b/contrib/libf2c/libF77/d_lg10.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_log.c b/contrib/libf2c/libF77/d_log.c
index 592015b..95dc767 100644
--- a/contrib/libf2c/libF77/d_log.c
+++ b/contrib/libf2c/libF77/d_log.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_mod.c b/contrib/libf2c/libF77/d_mod.c
index 23f1929..15cedef 100644
--- a/contrib/libf2c/libF77/d_mod.c
+++ b/contrib/libf2c/libF77/d_mod.c
@@ -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
}
diff --git a/contrib/libf2c/libF77/d_nint.c b/contrib/libf2c/libF77/d_nint.c
index 064beff..8be4275 100644
--- a/contrib/libf2c/libF77/d_nint.c
+++ b/contrib/libf2c/libF77/d_nint.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_prod.c b/contrib/libf2c/libF77/d_prod.c
index 3d4cef7..11fe2c7 100644
--- a/contrib/libf2c/libF77/d_prod.c
+++ b/contrib/libf2c/libF77/d_prod.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_sign.c b/contrib/libf2c/libF77/d_sign.c
index 514ff0b..da8d24b 100644
--- a/contrib/libf2c/libF77/d_sign.c
+++ b/contrib/libf2c/libF77/d_sign.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/d_sin.c b/contrib/libf2c/libF77/d_sin.c
index fdd699e..24b37a4 100644
--- a/contrib/libf2c/libF77/d_sin.c
+++ b/contrib/libf2c/libF77/d_sin.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_sinh.c b/contrib/libf2c/libF77/d_sinh.c
index 77f3690..dc9dc43 100644
--- a/contrib/libf2c/libF77/d_sinh.c
+++ b/contrib/libf2c/libF77/d_sinh.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_sqrt.c b/contrib/libf2c/libF77/d_sqrt.c
index b5cf83b..0a45882 100644
--- a/contrib/libf2c/libF77/d_sqrt.c
+++ b/contrib/libf2c/libF77/d_sqrt.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_tan.c b/contrib/libf2c/libF77/d_tan.c
index af94a05..370c1b8 100644
--- a/contrib/libf2c/libF77/d_tan.c
+++ b/contrib/libf2c/libF77/d_tan.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/d_tanh.c b/contrib/libf2c/libF77/d_tanh.c
index 92a02d4..df81ea0 100644
--- a/contrib/libf2c/libF77/d_tanh.c
+++ b/contrib/libf2c/libF77/d_tanh.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/derf_.c b/contrib/libf2c/libF77/derf_.c
index fba6b6b..b78fde0 100644
--- a/contrib/libf2c/libF77/derf_.c
+++ b/contrib/libf2c/libF77/derf_.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/derfc_.c b/contrib/libf2c/libF77/derfc_.c
index ae1ac74..78e8e88 100644
--- a/contrib/libf2c/libF77/derfc_.c
+++ b/contrib/libf2c/libF77/derfc_.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/dtime_.c b/contrib/libf2c/libF77/dtime_.c
index e2c3a03..e2ea1c6 100644
--- a/contrib/libf2c/libF77/dtime_.c
+++ b/contrib/libf2c/libF77/dtime_.c
@@ -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
- }
+}
diff --git a/contrib/libf2c/libF77/ef1asc_.c b/contrib/libf2c/libF77/ef1asc_.c
index 8588584..d9bea34 100644
--- a/contrib/libf2c/libF77/ef1asc_.c
+++ b/contrib/libf2c/libF77/ef1asc_.c
@@ -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 */
}
diff --git a/contrib/libf2c/libF77/ef1cmc_.c b/contrib/libf2c/libF77/ef1cmc_.c
index f471172..2e102fb 100644
--- a/contrib/libf2c/libF77/ef1cmc_.c
+++ b/contrib/libf2c/libF77/ef1cmc_.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/erf_.c b/contrib/libf2c/libF77/erf_.c
index 1ba4350..fadbfaf 100644
--- a/contrib/libf2c/libF77/erf_.c
+++ b/contrib/libf2c/libF77/erf_.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/erfc_.c b/contrib/libf2c/libF77/erfc_.c
index f44b1d4..7f3ff8a 100644
--- a/contrib/libf2c/libF77/erfc_.c
+++ b/contrib/libf2c/libF77/erfc_.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/etime_.c b/contrib/libf2c/libF77/etime_.c
index 0c3209d..cc64612 100644
--- a/contrib/libf2c/libF77/etime_.c
+++ b/contrib/libf2c/libF77/etime_.c
@@ -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
- }
+}
diff --git a/contrib/libf2c/libF77/exit_.c b/contrib/libf2c/libF77/exit_.c
index 4c0582a..adf3d85 100644
--- a/contrib/libf2c/libF77/exit_.c
+++ b/contrib/libf2c/libF77/exit_.c
@@ -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
diff --git a/contrib/libf2c/libF77/f2ch.add b/contrib/libf2c/libF77/f2ch.add
index a2acc17..04b13e8 100644
--- a/contrib/libf2c/libF77/f2ch.add
+++ b/contrib/libf2c/libF77/f2ch.add
@@ -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
diff --git a/contrib/libf2c/libF77/getarg_.c b/contrib/libf2c/libF77/getarg_.c
index 5cf3ffb..b35043b 100644
--- a/contrib/libf2c/libF77/getarg_.c
+++ b/contrib/libf2c/libF77/getarg_.c
@@ -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++ = ' ';
}
diff --git a/contrib/libf2c/libF77/getenv_.c b/contrib/libf2c/libF77/getenv_.c
index 4d0b7cf..4067b8c 100644
--- a/contrib/libf2c/libF77/getenv_.c
+++ b/contrib/libf2c/libF77/getenv_.c
@@ -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++ = ' ';
+}
diff --git a/contrib/libf2c/libF77/h_abs.c b/contrib/libf2c/libF77/h_abs.c
index 73b8215..9db19ca 100644
--- a/contrib/libf2c/libF77/h_abs.c
+++ b/contrib/libf2c/libF77/h_abs.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/h_dim.c b/contrib/libf2c/libF77/h_dim.c
index ceff660..1519478 100644
--- a/contrib/libf2c/libF77/h_dim.c
+++ b/contrib/libf2c/libF77/h_dim.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/h_dnnt.c b/contrib/libf2c/libF77/h_dnnt.c
index 005ac6f..46c83bb 100644
--- a/contrib/libf2c/libF77/h_dnnt.c
+++ b/contrib/libf2c/libF77/h_dnnt.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/h_indx.c b/contrib/libf2c/libF77/h_indx.c
index a211cc7..2353b2b 100644
--- a/contrib/libf2c/libF77/h_indx.c
+++ b/contrib/libf2c/libF77/h_indx.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/h_len.c b/contrib/libf2c/libF77/h_len.c
index 00a2151..506016e 100644
--- a/contrib/libf2c/libF77/h_len.c
+++ b/contrib/libf2c/libF77/h_len.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/h_mod.c b/contrib/libf2c/libF77/h_mod.c
index 43431c1..c04e0df8 100644
--- a/contrib/libf2c/libF77/h_mod.c
+++ b/contrib/libf2c/libF77/h_mod.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/h_nint.c b/contrib/libf2c/libF77/h_nint.c
index 6b8dc29..a8c366a 100644
--- a/contrib/libf2c/libF77/h_nint.c
+++ b/contrib/libf2c/libF77/h_nint.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/h_sign.c b/contrib/libf2c/libF77/h_sign.c
index 7b06c15..7040232 100644
--- a/contrib/libf2c/libF77/h_sign.c
+++ b/contrib/libf2c/libF77/h_sign.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/hl_ge.c b/contrib/libf2c/libF77/hl_ge.c
index 4c29527..988686d 100644
--- a/contrib/libf2c/libF77/hl_ge.c
+++ b/contrib/libf2c/libF77/hl_ge.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/hl_gt.c b/contrib/libf2c/libF77/hl_gt.c
index c4f345a..0024ca7 100644
--- a/contrib/libf2c/libF77/hl_gt.c
+++ b/contrib/libf2c/libF77/hl_gt.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/hl_le.c b/contrib/libf2c/libF77/hl_le.c
index a9cce59..76aa3e1 100644
--- a/contrib/libf2c/libF77/hl_le.c
+++ b/contrib/libf2c/libF77/hl_le.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/hl_lt.c b/contrib/libf2c/libF77/hl_lt.c
index 162d919..68a47fa 100644
--- a/contrib/libf2c/libF77/hl_lt.c
+++ b/contrib/libf2c/libF77/hl_lt.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/i_abs.c b/contrib/libf2c/libF77/i_abs.c
index be21295..2ed183a 100644
--- a/contrib/libf2c/libF77/i_abs.c
+++ b/contrib/libf2c/libF77/i_abs.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/i_dim.c b/contrib/libf2c/libF77/i_dim.c
index 6e1b170..66ef7c9 100644
--- a/contrib/libf2c/libF77/i_dim.c
+++ b/contrib/libf2c/libF77/i_dim.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/i_dnnt.c b/contrib/libf2c/libF77/i_dnnt.c
index 4ede56a..7a3783d 100644
--- a/contrib/libf2c/libF77/i_dnnt.c
+++ b/contrib/libf2c/libF77/i_dnnt.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/i_indx.c b/contrib/libf2c/libF77/i_indx.c
index 96e7bc5..5b8e136 100644
--- a/contrib/libf2c/libF77/i_indx.c
+++ b/contrib/libf2c/libF77/i_indx.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/i_len.c b/contrib/libf2c/libF77/i_len.c
index 4020fee..2d5a3a4 100644
--- a/contrib/libf2c/libF77/i_len.c
+++ b/contrib/libf2c/libF77/i_len.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/i_mod.c b/contrib/libf2c/libF77/i_mod.c
index 6937c42..7ed7b39 100644
--- a/contrib/libf2c/libF77/i_mod.c
+++ b/contrib/libf2c/libF77/i_mod.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/i_nint.c b/contrib/libf2c/libF77/i_nint.c
index 411ce32..c4eaff4 100644
--- a/contrib/libf2c/libF77/i_nint.c
+++ b/contrib/libf2c/libF77/i_nint.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/i_sign.c b/contrib/libf2c/libF77/i_sign.c
index 94009b8..cf09008 100644
--- a/contrib/libf2c/libF77/i_sign.c
+++ b/contrib/libf2c/libF77/i_sign.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/iargc_.c b/contrib/libf2c/libF77/iargc_.c
index 1e04c77..c316570 100644
--- a/contrib/libf2c/libF77/iargc_.c
+++ b/contrib/libf2c/libF77/iargc_.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/l_ge.c b/contrib/libf2c/libF77/l_ge.c
index 86b4a1f..78af8d0 100644
--- a/contrib/libf2c/libF77/l_ge.c
+++ b/contrib/libf2c/libF77/l_ge.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/l_gt.c b/contrib/libf2c/libF77/l_gt.c
index c4b52f5..be7e489 100644
--- a/contrib/libf2c/libF77/l_gt.c
+++ b/contrib/libf2c/libF77/l_gt.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/l_le.c b/contrib/libf2c/libF77/l_le.c
index f2740a2..d2886fb 100644
--- a/contrib/libf2c/libF77/l_le.c
+++ b/contrib/libf2c/libF77/l_le.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/l_lt.c b/contrib/libf2c/libF77/l_lt.c
index c48dc94..ff151f8 100644
--- a/contrib/libf2c/libF77/l_lt.c
+++ b/contrib/libf2c/libF77/l_lt.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/lbitbits.c b/contrib/libf2c/libF77/lbitbits.c
index 75e9f9c..3b28ae9 100644
--- a/contrib/libf2c/libF77/lbitbits.c
+++ b/contrib/libf2c/libF77/lbitbits.c
@@ -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))));
+}
diff --git a/contrib/libf2c/libF77/lbitshft.c b/contrib/libf2c/libF77/lbitshft.c
index 81b0fdb..bfbb7c0 100644
--- a/contrib/libf2c/libF77/lbitshft.c
+++ b/contrib/libf2c/libF77/lbitshft.c
@@ -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);
+}
diff --git a/contrib/libf2c/libF77/main.c b/contrib/libf2c/libF77/main.c
index 17bf449..a3955cb 100644
--- a/contrib/libf2c/libF77/main.c
+++ b/contrib/libf2c/libF77/main.c
@@ -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
-#endif
-
-#ifdef KR_headers
-extern VOID f_init();
-extern int MAIN__();
-#else
-extern void f_init(void);
-extern int MAIN__(void);
+extern int atexit (void (*)(void));
#endif
-#ifdef __cplusplus
- }
-#endif
+extern void f_init (void);
+extern int MAIN__ (void);
+extern void f_setarg (int, char **);
+extern void f_setsig (void);
-#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. */
}
diff --git a/contrib/libf2c/libF77/pow_ci.c b/contrib/libf2c/libF77/pow_ci.c
index 37e2ce0..1df3eb3 100644
--- a/contrib/libf2c/libF77/pow_ci.c
+++ b/contrib/libf2c/libF77/pow_ci.c
@@ -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;
}
diff --git a/contrib/libf2c/libF77/pow_dd.c b/contrib/libf2c/libF77/pow_dd.c
index d0dd0ff..0ab208e 100644
--- a/contrib/libf2c/libF77/pow_dd.c
+++ b/contrib/libf2c/libF77/pow_dd.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/pow_di.c b/contrib/libf2c/libF77/pow_di.c
index affed62..d2298a0 100644
--- a/contrib/libf2c/libF77/pow_di.c
+++ b/contrib/libf2c/libF77/pow_di.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/pow_hh.c b/contrib/libf2c/libF77/pow_hh.c
index 24a0197..3379d8a 100644
--- a/contrib/libf2c/libF77/pow_hh.c
+++ b/contrib/libf2c/libF77/pow_hh.c
@@ -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);
+}
diff --git a/contrib/libf2c/libF77/pow_ii.c b/contrib/libf2c/libF77/pow_ii.c
index 84d1c7e..9234745 100644
--- a/contrib/libf2c/libF77/pow_ii.c
+++ b/contrib/libf2c/libF77/pow_ii.c
@@ -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);
+}
diff --git a/contrib/libf2c/libF77/pow_qq.c b/contrib/libf2c/libF77/pow_qq.c
index 3bc80e0..0cec5ca 100644
--- a/contrib/libf2c/libF77/pow_qq.c
+++ b/contrib/libf2c/libF77/pow_qq.c
@@ -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);
+}
diff --git a/contrib/libf2c/libF77/pow_ri.c b/contrib/libf2c/libF77/pow_ri.c
index 6e5816b..792db0c 100644
--- a/contrib/libf2c/libF77/pow_ri.c
+++ b/contrib/libf2c/libF77/pow_ri.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/pow_zi.c b/contrib/libf2c/libF77/pow_zi.c
index abb3cb2..214db3d 100644
--- a/contrib/libf2c/libF77/pow_zi.c
+++ b/contrib/libf2c/libF77/pow_zi.c
@@ -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;
+}
diff --git a/contrib/libf2c/libF77/pow_zz.c b/contrib/libf2c/libF77/pow_zz.c
index 20faf29..d5cfbf3 100644
--- a/contrib/libf2c/libF77/pow_zz.c
+++ b/contrib/libf2c/libF77/pow_zz.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/qbitbits.c b/contrib/libf2c/libF77/qbitbits.c
index ad4ac96..f72858e 100644
--- a/contrib/libf2c/libF77/qbitbits.c
+++ b/contrib/libf2c/libF77/qbitbits.c
@@ -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))));
+}
diff --git a/contrib/libf2c/libF77/qbitshft.c b/contrib/libf2c/libF77/qbitshft.c
index 87fffb9..ce740ed 100644
--- a/contrib/libf2c/libF77/qbitshft.c
+++ b/contrib/libf2c/libF77/qbitshft.c
@@ -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);
+}
diff --git a/contrib/libf2c/libF77/r_abs.c b/contrib/libf2c/libF77/r_abs.c
index 7b22296..6f62724 100644
--- a/contrib/libf2c/libF77/r_abs.c
+++ b/contrib/libf2c/libF77/r_abs.c
@@ -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);
}
diff --git a/contrib/libf2c/libF77/r_acos.c b/contrib/libf2c/libF77/r_acos.c
index 330f88a..d761cfd 100644
--- a/contrib/libf2c/libF77/r_acos.c
+++ b/contrib/libf2c/libF77/r_acos.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/r_asin.c b/contrib/libf2c/libF77/r_asin.c
index 45ece4b..b8c73c7 100644
--- a/contrib/libf2c/libF77/r_asin.c
+++ b/contrib/libf2c/libF77/r_asin.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/r_atan.c b/contrib/libf2c/libF77/r_atan.c
index 36479c9..33a6589 100644
--- a/contrib/libf2c/libF77/r_atan.c
+++ b/contrib/libf2c/libF77/r_atan.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/r_atn2.c b/contrib/libf2c/libF77/r_atn2.c
index 9347e1f..076d874 100644
--- a/contrib/libf2c/libF77/r_atn2.c
+++ b/contrib/libf2c/libF77/r_atn2.c
@@ -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));
}
diff --git a/contrib/libf2c/libF77/r_cnjg.c b/contrib/libf2c/libF77/r_cnjg.c
index 756c694..5f84929 100644
--- a/contrib/libf2c/libF77/r_cnjg.c
+++ b/contrib/libf2c/libF77/r_cnjg.c
@@ -1,12 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-VOID r_cnjg(r, z) complex *r, *z;
-#else
-VOID r_cnjg(complex *r, complex *z)
-#endif
+void
+r_cnjg (complex * r, complex * z)
{
- real zi = z->i;
- r->r = z->r;
- r->i = -zi;
- }
+ real zi = z->i;
+ r->r = z->r;
+ r->i = -zi;
+}
diff --git a/contrib/libf2c/libF77/r_cos.c b/contrib/libf2c/libF77/r_cos.c
index 5bda158..ed556e8 100644
--- a/contrib/libf2c/libF77/r_cos.c
+++ b/contrib/libf2c/libF77/r_cos.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double cos();
-double r_cos(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_cos(real *x)
-#endif
+double
+r_cos (real * x)
{
-return( cos(*x) );
+ return (cos (*x));
}
diff --git a/contrib/libf2c/libF77/r_cosh.c b/contrib/libf2c/libF77/r_cosh.c
index 7ae72cc..b22e0cf 100644
--- a/contrib/libf2c/libF77/r_cosh.c
+++ b/contrib/libf2c/libF77/r_cosh.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double cosh();
-double r_cosh(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_cosh(real *x)
-#endif
+double
+r_cosh (real * x)
{
-return( cosh(*x) );
+ return (cosh (*x));
}
diff --git a/contrib/libf2c/libF77/r_dim.c b/contrib/libf2c/libF77/r_dim.c
index baca95c..48d2fc7 100644
--- a/contrib/libf2c/libF77/r_dim.c
+++ b/contrib/libf2c/libF77/r_dim.c
@@ -1,10 +1,7 @@
#include "f2c.h"
-#ifdef KR_headers
-double r_dim(a,b) real *a, *b;
-#else
-double r_dim(real *a, real *b)
-#endif
+double
+r_dim (real * a, real * b)
{
-return( *a > *b ? *a - *b : 0);
+ return (*a > *b ? *a - *b : 0);
}
diff --git a/contrib/libf2c/libF77/r_exp.c b/contrib/libf2c/libF77/r_exp.c
index d1dea75..7c1ceea 100644
--- a/contrib/libf2c/libF77/r_exp.c
+++ b/contrib/libf2c/libF77/r_exp.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double exp();
-double r_exp(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_exp(real *x)
-#endif
+double
+r_exp (real * x)
{
-return( exp(*x) );
+ return (exp (*x));
}
diff --git a/contrib/libf2c/libF77/r_imag.c b/contrib/libf2c/libF77/r_imag.c
index d51252b..784abc8 100644
--- a/contrib/libf2c/libF77/r_imag.c
+++ b/contrib/libf2c/libF77/r_imag.c
@@ -1,10 +1,7 @@
#include "f2c.h"
-#ifdef KR_headers
-double r_imag(z) complex *z;
-#else
-double r_imag(complex *z)
-#endif
+double
+r_imag (complex * z)
{
-return(z->i);
+ return (z->i);
}
diff --git a/contrib/libf2c/libF77/r_int.c b/contrib/libf2c/libF77/r_int.c
index 8378e77..3c1b28e 100644
--- a/contrib/libf2c/libF77/r_int.c
+++ b/contrib/libf2c/libF77/r_int.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double floor();
-double r_int(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_int(real *x)
-#endif
+double
+r_int (real * x)
{
-return( (*x>0) ? floor(*x) : -floor(- *x) );
+ return ((*x > 0) ? floor (*x) : -floor (-*x));
}
diff --git a/contrib/libf2c/libF77/r_lg10.c b/contrib/libf2c/libF77/r_lg10.c
index 51f84201..563e73c 100644
--- a/contrib/libf2c/libF77/r_lg10.c
+++ b/contrib/libf2c/libF77/r_lg10.c
@@ -2,14 +2,10 @@
#define log10e 0.43429448190325182765
-#ifdef KR_headers
-double log();
-double r_lg10(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_lg10(real *x)
-#endif
+double
+r_lg10 (real * x)
{
-return( log10e * log(*x) );
+ return (log10e * log (*x));
}
diff --git a/contrib/libf2c/libF77/r_log.c b/contrib/libf2c/libF77/r_log.c
index 4873fb4..eaaecc8 100644
--- a/contrib/libf2c/libF77/r_log.c
+++ b/contrib/libf2c/libF77/r_log.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double log();
-double r_log(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_log(real *x)
-#endif
+double
+r_log (real * x)
{
-return( log(*x) );
+ return (log (*x));
}
diff --git a/contrib/libf2c/libF77/r_mod.c b/contrib/libf2c/libF77/r_mod.c
index faea344..9518d66 100644
--- a/contrib/libf2c/libF77/r_mod.c
+++ b/contrib/libf2c/libF77/r_mod.c
@@ -1,40 +1,33 @@
#include "f2c.h"
-#ifdef KR_headers
#ifdef IEEE_drem
-double drem();
-#else
-double floor();
-#endif
-double r_mod(x,y) real *x, *y;
-#else
-#ifdef IEEE_drem
-double drem(double, double);
+double drem (double, double);
#else
#undef abs
#include <math.h>
#endif
-double r_mod(real *x, real *y)
-#endif
+double
+r_mod (real * x, real * 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 = (double)*x / *y) >= 0)
- quotient = floor(quotient);
- else
- quotient = -floor(-quotient);
- return(*x - (*y) * quotient );
+ double quotient;
+ if ((quotient = (double) *x / *y) >= 0)
+ quotient = floor (quotient);
+ else
+ quotient = -floor (-quotient);
+ return (*x - (*y) * quotient);
#endif
}
diff --git a/contrib/libf2c/libF77/r_nint.c b/contrib/libf2c/libF77/r_nint.c
index f5382af..f2713d5 100644
--- a/contrib/libf2c/libF77/r_nint.c
+++ b/contrib/libf2c/libF77/r_nint.c
@@ -1,14 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double floor();
-double r_nint(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_nint(real *x)
-#endif
+double
+r_nint (real * x)
{
-return( (*x)>=0 ?
- floor(*x + .5) : -floor(.5 - *x) );
+ return ((*x) >= 0 ? floor (*x + .5) : -floor (.5 - *x));
}
diff --git a/contrib/libf2c/libF77/r_sign.c b/contrib/libf2c/libF77/r_sign.c
index df6d02a..f53c6bf 100644
--- a/contrib/libf2c/libF77/r_sign.c
+++ b/contrib/libf2c/libF77/r_sign.c
@@ -1,12 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double r_sign(a,b) real *a, *b;
-#else
-double r_sign(real *a, real *b)
-#endif
+double
+r_sign (real * a, real * 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);
}
diff --git a/contrib/libf2c/libF77/r_sin.c b/contrib/libf2c/libF77/r_sin.c
index 095b951..5a5ef13 100644
--- a/contrib/libf2c/libF77/r_sin.c
+++ b/contrib/libf2c/libF77/r_sin.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double sin();
-double r_sin(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_sin(real *x)
-#endif
+double
+r_sin (real * x)
{
-return( sin(*x) );
+ return (sin (*x));
}
diff --git a/contrib/libf2c/libF77/r_sinh.c b/contrib/libf2c/libF77/r_sinh.c
index 3bf4bb1..723c7ab 100644
--- a/contrib/libf2c/libF77/r_sinh.c
+++ b/contrib/libf2c/libF77/r_sinh.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double sinh();
-double r_sinh(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_sinh(real *x)
-#endif
+double
+r_sinh (real * x)
{
-return( sinh(*x) );
+ return (sinh (*x));
}
diff --git a/contrib/libf2c/libF77/r_sqrt.c b/contrib/libf2c/libF77/r_sqrt.c
index d0203d3..ed832ba 100644
--- a/contrib/libf2c/libF77/r_sqrt.c
+++ b/contrib/libf2c/libF77/r_sqrt.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double sqrt();
-double r_sqrt(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_sqrt(real *x)
-#endif
+double
+r_sqrt (real * x)
{
-return( sqrt(*x) );
+ return (sqrt (*x));
}
diff --git a/contrib/libf2c/libF77/r_tan.c b/contrib/libf2c/libF77/r_tan.c
index fc0009e..4ef913e 100644
--- a/contrib/libf2c/libF77/r_tan.c
+++ b/contrib/libf2c/libF77/r_tan.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double tan();
-double r_tan(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_tan(real *x)
-#endif
+double
+r_tan (real * x)
{
-return( tan(*x) );
+ return (tan (*x));
}
diff --git a/contrib/libf2c/libF77/r_tanh.c b/contrib/libf2c/libF77/r_tanh.c
index 818c6a8..6f2552a 100644
--- a/contrib/libf2c/libF77/r_tanh.c
+++ b/contrib/libf2c/libF77/r_tanh.c
@@ -1,13 +1,9 @@
#include "f2c.h"
-#ifdef KR_headers
-double tanh();
-double r_tanh(x) real *x;
-#else
#undef abs
#include <math.h>
-double r_tanh(real *x)
-#endif
+double
+r_tanh (real * x)
{
-return( tanh(*x) );
+ return (tanh (*x));
}
diff --git a/contrib/libf2c/libF77/s_cat.c b/contrib/libf2c/libF77/s_cat.c
index 77a94f6..4e8da1b 100644
--- a/contrib/libf2c/libF77/s_cat.c
+++ b/contrib/libf2c/libF77/s_cat.c
@@ -7,69 +7,64 @@
#ifndef NO_OVERWRITE
#include <stdio.h>
#undef abs
-#ifdef KR_headers
- extern char *F77_aloc();
- extern void free();
- extern void G77_exit_0 ();
-#else
#undef min
#undef max
#include <stdlib.h>
- extern char *F77_aloc(ftnlen, char*);
-#endif
+extern char *F77_aloc (ftnlen, char *);
#include <string.h>
#endif /* NO_OVERWRITE */
- VOID
-#ifdef KR_headers
-s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnint rnp[], *np; ftnlen ll;
-#else
-s_cat(char *lp, char *rpp[], ftnint rnp[], ftnint *np, ftnlen ll)
-#endif
+void
+s_cat (char *lp, char *rpp[], ftnint rnp[], ftnint * np, ftnlen ll)
{
- ftnlen i, nc;
- char *rp;
- ftnlen n = *np;
+ ftnlen i, nc;
+ char *rp;
+ ftnlen n = *np;
#ifndef NO_OVERWRITE
- ftnlen L, m;
- char *lp0, *lp1;
+ ftnlen L, m;
+ char *lp0, *lp1;
- lp0 = 0;
- lp1 = lp;
- L = ll;
- i = 0;
- while(i < n) {
- rp = rpp[i];
- m = rnp[i++];
- if (rp >= lp1 || rp + m <= lp) {
- if ((L -= m) <= 0) {
- n = i;
- break;
- }
- lp1 += m;
- continue;
- }
- lp0 = lp;
- lp = lp1 = F77_aloc(L = ll, "s_cat");
- break;
- }
- lp1 = lp;
+ lp0 = 0;
+ lp1 = lp;
+ L = ll;
+ i = 0;
+ while (i < n)
+ {
+ rp = rpp[i];
+ m = rnp[i++];
+ if (rp >= lp1 || rp + m <= lp)
+ {
+ if ((L -= m) <= 0)
+ {
+ n = i;
+ break;
+ }
+ lp1 += m;
+ continue;
+ }
+ lp0 = lp;
+ lp = lp1 = F77_aloc (L = ll, "s_cat");
+ break;
+ }
+ lp1 = lp;
#endif /* NO_OVERWRITE */
- for(i = 0 ; i < n ; ++i) {
- nc = ll;
- if(rnp[i] < nc)
- nc = rnp[i];
- ll -= nc;
- rp = rpp[i];
- while(--nc >= 0)
- *lp++ = *rp++;
- }
- while(--ll >= 0)
- *lp++ = ' ';
+ for (i = 0; i < n; ++i)
+ {
+ nc = ll;
+ if (rnp[i] < nc)
+ nc = rnp[i];
+ ll -= nc;
+ rp = rpp[i];
+ while (--nc >= 0)
+ *lp++ = *rp++;
+ }
+ while (--ll >= 0)
+ *lp++ = ' ';
#ifndef NO_OVERWRITE
- if (lp0) {
- memcpy(lp0, lp1, L);
- free(lp1);
- }
+ if (lp0)
+ {
+ memcpy (lp0, lp1, L);
+ free (lp1);
+ }
#endif
- }
+}
diff --git a/contrib/libf2c/libF77/s_cmp.c b/contrib/libf2c/libF77/s_cmp.c
index 1e052f2..5b43c9e 100644
--- a/contrib/libf2c/libF77/s_cmp.c
+++ b/contrib/libf2c/libF77/s_cmp.c
@@ -2,43 +2,48 @@
/* compare two strings */
-#ifdef KR_headers
-integer s_cmp(a0, b0, la, lb) char *a0, *b0; ftnlen la, lb;
-#else
-integer s_cmp(char *a0, char *b0, ftnlen la, ftnlen lb)
-#endif
+integer
+s_cmp (char *a0, char *b0, ftnlen la, ftnlen lb)
{
-register unsigned char *a, *aend, *b, *bend;
-a = (unsigned char *)a0;
-b = (unsigned char *)b0;
-aend = a + la;
-bend = b + lb;
+ register unsigned char *a, *aend, *b, *bend;
+ a = (unsigned char *) a0;
+ b = (unsigned char *) b0;
+ aend = a + la;
+ bend = b + lb;
-if(la <= lb)
- {
- while(a < aend)
- if(*a != *b)
- return( *a - *b );
- else
- { ++a; ++b; }
+ if (la <= lb)
+ {
+ while (a < aend)
+ if (*a != *b)
+ return (*a - *b);
+ else
+ {
+ ++a;
+ ++b;
+ }
- while(b < bend)
- if(*b != ' ')
- return( ' ' - *b );
- else ++b;
- }
+ while (b < bend)
+ if (*b != ' ')
+ return (' ' - *b);
+ else
+ ++b;
+ }
-else
- {
- while(b < bend)
- if(*a == *b)
- { ++a; ++b; }
- else
- return( *a - *b );
- while(a < aend)
- if(*a != ' ')
- return(*a - ' ');
- else ++a;
- }
-return(0);
+ else
+ {
+ while (b < bend)
+ if (*a == *b)
+ {
+ ++a;
+ ++b;
+ }
+ else
+ return (*a - *b);
+ while (a < aend)
+ if (*a != ' ')
+ return (*a - ' ');
+ else
+ ++a;
+ }
+ return (0);
}
diff --git a/contrib/libf2c/libF77/s_copy.c b/contrib/libf2c/libF77/s_copy.c
index d167351..a91071e 100644
--- a/contrib/libf2c/libF77/s_copy.c
+++ b/contrib/libf2c/libF77/s_copy.c
@@ -8,44 +8,43 @@
/* assign strings: a = b */
-#ifdef KR_headers
-VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
-#else
-void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb)
-#endif
+void
+s_copy (register char *a, register char *b, ftnlen la, ftnlen lb)
{
- register char *aend, *bend;
+ register char *aend, *bend;
- aend = a + la;
+ aend = a + la;
- if(la <= lb)
+ if (la <= lb)
#ifndef NO_OVERWRITE
- if (a <= b || a >= b + la)
+ if (a <= b || a >= b + la)
#endif
- while(a < aend)
- *a++ = *b++;
+ while (a < aend)
+ *a++ = *b++;
#ifndef NO_OVERWRITE
- else
- for(b += la; a < aend; )
- *--aend = *--b;
+ else
+ for (b += la; a < aend;)
+ *--aend = *--b;
#endif
- else {
- bend = b + lb;
+ else
+ {
+ bend = b + lb;
#ifndef NO_OVERWRITE
- if (a <= b || a >= bend)
+ if (a <= b || a >= bend)
#endif
- while(b < bend)
- *a++ = *b++;
+ while (b < bend)
+ *a++ = *b++;
#ifndef NO_OVERWRITE
- else {
- a += lb;
- while(b < bend)
- *--a = *--bend;
- a += lb;
- }
-#endif
- while(a < aend)
- *a++ = ' ';
- }
+ else
+ {
+ a += lb;
+ while (b < bend)
+ *--a = *--bend;
+ a += lb;
}
+#endif
+ while (a < aend)
+ *a++ = ' ';
+ }
+}
diff --git a/contrib/libf2c/libF77/s_paus.c b/contrib/libf2c/libF77/s_paus.c
index a7733a5..7969136 100644
--- a/contrib/libf2c/libF77/s_paus.c
+++ b/contrib/libf2c/libF77/s_paus.c
@@ -3,86 +3,69 @@
#define PAUSESIG 15
#include "signal1.h"
-#ifdef KR_headers
-#define Void /* void */
-#define Int /* int */
-#else
-#define Void void
-#define Int int
#undef abs
#undef min
#undef max
#include <stdlib.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int getpid(void), isatty(int), pause(void);
-#endif
+extern int getpid (void), isatty (int), pause (void);
-extern VOID f_exit(Void);
+extern void f_exit (void);
- static VOID
-waitpause(Sigarg)
-{ Use_Sigarg;
- return;
- }
+static void
+waitpause (Sigarg)
+{
+ Use_Sigarg;
+ return;
+}
- static VOID
-#ifdef KR_headers
-s_1paus(fin) FILE *fin;
-#else
-s_1paus(FILE *fin)
-#endif
+static void
+s_1paus (FILE * fin)
{
- fprintf(stderr,
- "To resume execution, type go. Other input will terminate the job.\n");
- fflush(stderr);
- if( getc(fin)!='g' || getc(fin)!='o' || getc(fin)!='\n' ) {
- fprintf(stderr, "STOP\n");
+ fprintf (stderr,
+ "To resume execution, type go. Other input will terminate the job.\n");
+ fflush (stderr);
+ if (getc (fin) != 'g' || getc (fin) != 'o' || getc (fin) != '\n')
+ {
+ fprintf (stderr, "STOP\n");
#ifdef NO_ONEXIT
- f_exit();
+ f_exit ();
#endif
- exit(0);
- }
- }
+ exit (0);
+ }
+}
- int
-#ifdef KR_headers
-s_paus(s, n) char *s; ftnlen n;
-#else
-s_paus(char *s, ftnlen n)
-#endif
+int
+s_paus (char *s, ftnlen n)
{
- fprintf(stderr, "PAUSE ");
- if(n > 0)
- fprintf(stderr, " %.*s", (int)n, s);
- fprintf(stderr, " statement executed\n");
- if( isatty(fileno(stdin)) )
- s_1paus(stdin);
- else {
+ fprintf (stderr, "PAUSE ");
+ if (n > 0)
+ fprintf (stderr, " %.*s", (int) n, s);
+ fprintf (stderr, " statement executed\n");
+ if (isatty (fileno (stdin)))
+ s_1paus (stdin);
+ else
+ {
#if (defined (MSDOS) && !defined (GO32)) || defined (_WIN32)
- FILE *fin;
- fin = fopen("con", "r");
- if (!fin) {
- fprintf(stderr, "s_paus: can't open con!\n");
- fflush(stderr);
- exit(1);
- }
- s_1paus(fin);
- fclose(fin);
-#else
- fprintf(stderr,
- "To resume execution, execute a kill -%d %d command\n",
- PAUSESIG, getpid() );
- signal1(PAUSESIG, waitpause);
- fflush(stderr);
- pause();
-#endif
- }
- fprintf(stderr, "Execution resumes after PAUSE.\n");
- fflush(stderr);
- return 0; /* NOT REACHED */
-#ifdef __cplusplus
+ FILE *fin;
+ fin = fopen ("con", "r");
+ if (!fin)
+ {
+ fprintf (stderr, "s_paus: can't open con!\n");
+ fflush (stderr);
+ exit (1);
}
+ s_1paus (fin);
+ fclose (fin);
+#else
+ fprintf (stderr,
+ "To resume execution, execute a kill -%d %d command\n",
+ PAUSESIG, getpid ());
+ signal1 (PAUSESIG, waitpause);
+ fflush (stderr);
+ pause ();
#endif
+ }
+ fprintf (stderr, "Execution resumes after PAUSE.\n");
+ fflush (stderr);
+ return 0; /* NOT REACHED */
}
diff --git a/contrib/libf2c/libF77/s_rnge.c b/contrib/libf2c/libF77/s_rnge.c
index 766889b..6c054c7 100644
--- a/contrib/libf2c/libF77/s_rnge.c
+++ b/contrib/libf2c/libF77/s_rnge.c
@@ -3,24 +3,20 @@
/* called when a subscript is out of range */
-#ifdef KR_headers
-extern VOID sig_die();
-integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line;
-#else
-extern VOID sig_die(char*,int);
-integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
-#endif
+extern void sig_die (char *, int);
+integer
+s_rnge (char *varn, ftnint offset, char *procn, ftnint line)
{
-register int i;
+ register int i;
-fprintf(stderr, "Subscript out of range on file line %ld, procedure ",
- (long)line);
-while((i = *procn) && i != '_' && i != ' ')
- putc(*procn++, stderr);
-fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ",
- (long)offset+1);
-while((i = *varn) && i != ' ')
- putc(*varn++, stderr);
-sig_die(".", 1);
-return 0; /* not reached */
+ fprintf (stderr, "Subscript out of range on file line %ld, procedure ",
+ (long) line);
+ while ((i = *procn) && i != '_' && i != ' ')
+ putc (*procn++, stderr);
+ fprintf (stderr, ".\nAttempt to access the %ld-th element of variable ",
+ (long) offset + 1);
+ while ((i = *varn) && i != ' ')
+ putc (*varn++, stderr);
+ sig_die (".", 1);
+ return 0; /* not reached */
}
diff --git a/contrib/libf2c/libF77/s_stop.c b/contrib/libf2c/libF77/s_stop.c
index 975edb7..571416b 100644
--- a/contrib/libf2c/libF77/s_stop.c
+++ b/contrib/libf2c/libF77/s_stop.c
@@ -1,42 +1,32 @@
#include <stdio.h>
#include "f2c.h"
-#ifdef KR_headers
-extern void f_exit();
-VOID s_stop(s, n) char *s; ftnlen n;
-#else
#undef abs
#undef min
#undef max
#include <stdlib.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-void f_exit(void);
+void f_exit (void);
-int s_stop(char *s, ftnlen n)
-#endif
+int
+s_stop (char *s, ftnlen n)
{
-int i;
+ int i;
-if(n > 0)
- {
- fprintf(stderr, "STOP ");
- for(i = 0; i<n ; ++i)
- putc(*s++, stderr);
- fprintf(stderr, " statement executed\n");
- }
+ if (n > 0)
+ {
+ fprintf (stderr, "STOP ");
+ for (i = 0; i < n; ++i)
+ putc (*s++, stderr);
+ fprintf (stderr, " statement executed\n");
+ }
#ifdef NO_ONEXIT
-f_exit();
+ f_exit ();
#endif
-exit(0);
+ exit (0);
/* We cannot avoid (useless) compiler diagnostics here: */
/* some compilers complain if there is no return statement, */
/* and others complain that this one cannot be reached. */
-return 0; /* NOT REACHED */
+ return 0; /* NOT REACHED */
}
-#ifdef __cplusplus
-}
-#endif
diff --git a/contrib/libf2c/libF77/setarg.c b/contrib/libf2c/libF77/setarg.c
index 929860a..4951574 100644
--- a/contrib/libf2c/libF77/setarg.c
+++ b/contrib/libf2c/libF77/setarg.c
@@ -1,29 +1,14 @@
/* Set up the global argc/argv info for use by getarg_, iargc_, and
g77's inlined intrinsic equivalents. */
-#ifndef KR_headers
-#undef VOID
#include <stdlib.h>
-#endif
-
-#ifndef VOID
-#define VOID void
-#endif
int f__xargc;
char **f__xargv;
-#ifdef __cplusplus
- }
-#endif
-
- void
-#ifdef KR_headers
-f_setarg(argc, argv) int argc; char **argv;
-#else
-f_setarg(int argc, char **argv)
-#endif
+void
+f_setarg (int argc, char **argv)
{
-f__xargc = argc;
-f__xargv = argv;
+ f__xargc = argc;
+ f__xargv = argv;
}
diff --git a/contrib/libf2c/libF77/setsig.c b/contrib/libf2c/libF77/setsig.c
index 8fde2fa..96826be 100644
--- a/contrib/libf2c/libF77/setsig.c
+++ b/contrib/libf2c/libF77/setsig.c
@@ -9,93 +9,78 @@
#endif
#endif
-#ifndef KR_headers
-#undef VOID
#include <stdlib.h>
-#endif
-
-#ifndef VOID
-#define VOID void
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef KR_headers
-extern VOID sig_die();
-#define Int /* int */
-#else
-extern void sig_die(char*, int);
-#define Int int
-#endif
+extern void sig_die (char *, int);
-static VOID sigfdie(Sigarg)
+static void
+sigfdie (Sigarg)
{
-Use_Sigarg;
-sig_die("Floating Exception", 1);
+ Use_Sigarg;
+ sig_die ("Floating Exception", 1);
}
-static VOID sigidie(Sigarg)
+static void
+sigidie (Sigarg)
{
-Use_Sigarg;
-sig_die("IOT Trap", 1);
+ Use_Sigarg;
+ sig_die ("IOT Trap", 1);
}
#ifdef SIGQUIT
-static VOID sigqdie(Sigarg)
+static void
+sigqdie (Sigarg)
{
-Use_Sigarg;
-sig_die("Quit signal", 1);
+ Use_Sigarg;
+ sig_die ("Quit signal", 1);
}
#endif
-static VOID sigindie(Sigarg)
+static void
+sigindie (Sigarg)
{
-Use_Sigarg;
-sig_die("Interrupt", 0);
+ Use_Sigarg;
+ sig_die ("Interrupt", 0);
}
-static VOID sigtdie(Sigarg)
+static void
+sigtdie (Sigarg)
{
-Use_Sigarg;
-sig_die("Killed", 0);
+ Use_Sigarg;
+ sig_die ("Killed", 0);
}
#ifdef SIGTRAP
-static VOID sigtrdie(Sigarg)
+static void
+sigtrdie (Sigarg)
{
-Use_Sigarg;
-sig_die("Trace trap", 1);
+ Use_Sigarg;
+ sig_die ("Trace trap", 1);
}
#endif
-#ifdef __cplusplus
- }
-#endif
-
- void
-f_setsig()
+void
+f_setsig ()
{
-signal1(SIGFPE, sigfdie); /* ignore underflow, enable overflow */
+ signal1 (SIGFPE, sigfdie); /* ignore underflow, enable overflow */
#ifdef SIGIOT
-signal1(SIGIOT, sigidie);
+ signal1 (SIGIOT, sigidie);
#endif
#ifdef SIGTRAP
-signal1(SIGTRAP, sigtrdie);
+ signal1 (SIGTRAP, sigtrdie);
#endif
#ifdef SIGQUIT
-if(signal1(SIGQUIT,sigqdie) == SIG_IGN)
- signal1(SIGQUIT, SIG_IGN);
+ if (signal1 (SIGQUIT, sigqdie) == SIG_IGN)
+ signal1 (SIGQUIT, SIG_IGN);
#endif
-if(signal1(SIGINT, sigindie) == SIG_IGN)
- signal1(SIGINT, SIG_IGN);
-signal1(SIGTERM,sigtdie);
+ if (signal1 (SIGINT, sigindie) == SIG_IGN)
+ signal1 (SIGINT, SIG_IGN);
+ signal1 (SIGTERM, sigtdie);
#ifdef pdp11
- ldfps(01200); /* detect overflow as an exception */
+ ldfps (01200); /* detect overflow as an exception */
#endif
}
diff --git a/contrib/libf2c/libF77/sig_die.c b/contrib/libf2c/libF77/sig_die.c
index bebb1e7..622462e 100644
--- a/contrib/libf2c/libF77/sig_die.c
+++ b/contrib/libf2c/libF77/sig_die.c
@@ -7,39 +7,31 @@
#endif
#endif
-#ifdef KR_headers
-void sig_die(s, kill) register char *s; int kill;
-#else
#include <stdlib.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
- extern void f_exit(void);
+extern void f_exit (void);
-void sig_die(register char *s, int kill)
-#endif
+void
+sig_die (register char *s, int kill)
{
- /* print error message, then clear buffers */
- fprintf(stderr, "%s\n", s);
+ /* print error message, then clear buffers */
+ fprintf (stderr, "%s\n", s);
- if(kill)
- {
- fflush(stderr);
- f_exit();
- fflush(stderr);
- /* now get a core */
+ if (kill)
+ {
+ fflush (stderr);
+ f_exit ();
+ fflush (stderr);
+ /* now get a core */
#ifdef SIGIOT
- signal(SIGIOT, SIG_DFL);
+ signal (SIGIOT, SIG_DFL);
#endif
- abort();
- }
- else {
+ abort ();
+ }
+ else
+ {
#ifdef NO_ONEXIT
- f_exit();
+ f_exit ();
#endif
- exit(1);
- }
- }
-#ifdef __cplusplus
+ exit (1);
+ }
}
-#endif
diff --git a/contrib/libf2c/libF77/signal1.h0 b/contrib/libf2c/libF77/signal1.h0
index a383774..0e2fcf2 100644
--- a/contrib/libf2c/libF77/signal1.h0
+++ b/contrib/libf2c/libF77/signal1.h0
@@ -11,25 +11,16 @@
#define Sigret_t void
#endif
#ifndef Sigarg_t
-#ifdef KR_headers
-#define Sigarg_t
-#else
#define Sigarg_t int
-#endif
-#endif /*Sigarg_t*/
+#endif /*Sigarg_t */
-#ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */
+#ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */
#define sig_pf SIG_PF
#else
-typedef Sigret_t (*sig_pf)(Sigarg_t);
+typedef Sigret_t (*sig_pf) (Sigarg_t);
#endif
#define signal1(a,b) signal(a,(sig_pf)b)
-#ifdef __cplusplus
-#define Sigarg ...
-#define Use_Sigarg
-#else
-#define Sigarg Int n
+#define Sigarg int n
#define Use_Sigarg n = n /* shut up compiler warning */
-#endif
diff --git a/contrib/libf2c/libF77/signal_.c b/contrib/libf2c/libF77/signal_.c
index b0d7ce6..f67831c 100644
--- a/contrib/libf2c/libF77/signal_.c
+++ b/contrib/libf2c/libF77/signal_.c
@@ -1,16 +1,11 @@
#include "f2c.h"
#include "signal1.h"
-#ifdef KR_headers
void *
-G77_signal_0 (sigp, proc) integer *sigp; sig_pf proc;
-#else
-void *
-G77_signal_0 (integer *sigp, sig_pf proc)
-#endif
+G77_signal_0 (integer * sigp, sig_pf proc)
{
- int sig;
- sig = (int)*sigp;
+ int sig;
+ sig = (int) *sigp;
- return (void *) signal(sig, proc);
- }
+ return (void *) signal (sig, proc);
+}
diff --git a/contrib/libf2c/libF77/system_.c b/contrib/libf2c/libF77/system_.c
index ed024a1..dbbd0be 100644
--- a/contrib/libf2c/libF77/system_.c
+++ b/contrib/libf2c/libF77/system_.c
@@ -2,35 +2,27 @@
#include "f2c.h"
-#ifdef KR_headers
-extern char *F77_aloc();
-
- integer
-G77_system_0 (s, n) register char *s; ftnlen n;
-#else
#undef abs
#undef min
#undef max
#include <stdlib.h>
-extern char *F77_aloc(ftnlen, char*);
+extern char *F77_aloc (ftnlen, char *);
- integer
+integer
G77_system_0 (register char *s, ftnlen n)
-#endif
{
- char buff0[256], *buff;
- register char *bp, *blast;
- integer rv;
+ char buff0[256], *buff;
+ register char *bp, *blast;
+ integer rv;
- buff = bp = n < sizeof(buff0)
- ? buff0 : F77_aloc(n+1, "system_");
- blast = bp + n;
+ buff = bp = n < (ftnlen) sizeof (buff0) ? buff0 : F77_aloc (n + 1, "system_");
+ blast = bp + n;
- while(bp < blast && *s)
- *bp++ = *s++;
- *bp = 0;
- rv = system(buff);
- if (buff != buff0)
- free(buff);
- return rv;
- }
+ while (bp < blast && *s)
+ *bp++ = *s++;
+ *bp = 0;
+ rv = system (buff);
+ if (buff != buff0)
+ free (buff);
+ return rv;
+}
diff --git a/contrib/libf2c/libF77/z_abs.c b/contrib/libf2c/libF77/z_abs.c
index 7e67ad2..2419c0e 100644
--- a/contrib/libf2c/libF77/z_abs.c
+++ b/contrib/libf2c/libF77/z_abs.c
@@ -1,12 +1,8 @@
#include "f2c.h"
-#ifdef KR_headers
-double f__cabs();
-double z_abs(z) doublecomplex *z;
-#else
-double f__cabs(double, double);
-double z_abs(doublecomplex *z)
-#endif
+double f__cabs (double, double);
+double
+z_abs (doublecomplex * z)
{
-return( f__cabs( z->r, z->i ) );
+ return (f__cabs (z->r, z->i));
}
diff --git a/contrib/libf2c/libF77/z_cos.c b/contrib/libf2c/libF77/z_cos.c
index 2d4a24d..0f4cd71 100644
--- a/contrib/libf2c/libF77/z_cos.c
+++ b/contrib/libf2c/libF77/z_cos.c
@@ -1,15 +1,11 @@
#include "f2c.h"
-#ifdef KR_headers
-double sin(), cos(), sinh(), cosh();
-VOID z_cos(r, z) doublecomplex *r, *z;
-#else
#undef abs
#include "math.h"
-void z_cos(doublecomplex *r, doublecomplex *z)
-#endif
+void
+z_cos (doublecomplex * r, doublecomplex * 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);
+}
diff --git a/contrib/libf2c/libF77/z_div.c b/contrib/libf2c/libF77/z_div.c
index e14df32..a5fc527 100644
--- a/contrib/libf2c/libF77/z_div.c
+++ b/contrib/libf2c/libF77/z_div.c
@@ -1,44 +1,41 @@
#include "f2c.h"
-#ifdef KR_headers
-extern VOID sig_die();
-VOID z_div(c, a, b) doublecomplex *a, *b, *c;
-#else
-extern void sig_die(char*, int);
-void z_div(doublecomplex *c, doublecomplex *a, doublecomplex *b)
-#endif
+extern void sig_die (char *, int);
+void
+z_div (doublecomplex * c, doublecomplex * a, doublecomplex * 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
- if (a->i != 0 || a->r != 0)
- abi = 1.;
- c->i = c->r = abi / abr;
- return;
+ if (a->i != 0 || a->r != 0)
+ abi = 1.;
+ c->i = c->r = abi / abr;
+ return;
#else
- sig_die("complex division by zero", 1);
+ sig_die ("complex division by zero", 1);
#endif
- }
- ratio = 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 = 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 = 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 = 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;
+}
diff --git a/contrib/libf2c/libF77/z_exp.c b/contrib/libf2c/libF77/z_exp.c
index ecf8429..16f51e7 100644
--- a/contrib/libf2c/libF77/z_exp.c
+++ b/contrib/libf2c/libF77/z_exp.c
@@ -1,17 +1,13 @@
#include "f2c.h"
-#ifdef KR_headers
-double exp(), cos(), sin();
-VOID z_exp(r, z) doublecomplex *r, *z;
-#else
#undef abs
#include "math.h"
-void z_exp(doublecomplex *r, doublecomplex *z)
-#endif
+void
+z_exp (doublecomplex * r, doublecomplex * 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);
+}
diff --git a/contrib/libf2c/libF77/z_log.c b/contrib/libf2c/libF77/z_log.c
index 9dcc7f7..f56b12e 100644
--- a/contrib/libf2c/libF77/z_log.c
+++ b/contrib/libf2c/libF77/z_log.c
@@ -1,63 +1,59 @@
#include "f2c.h"
-#ifdef KR_headers
-double log(), f__cabs(), atan2();
-VOID z_log(r, z) doublecomplex *r, *z;
-#else
#undef abs
#include "math.h"
-extern double f__cabs(double, double);
-void z_log(doublecomplex *r, doublecomplex *z)
-#endif
+extern double f__cabs (double, double);
+void
+z_log (doublecomplex * r, doublecomplex * z)
{
- double s, s0, t, t2, u, v;
- double zi = z->i, zr = z->r;
+ double s, s0, t, t2, u, v;
+ double zi = z->i, zr = z->r;
- r->i = atan2(zi, zr);
+ r->i = atan2 (zi, zr);
#ifdef Pre20000310
- r->r = log( f__cabs( zr, zi ) );
+ r->r = log (f__cabs (zr, zi));
#else
- if (zi < 0)
- zi = -zi;
- if (zr < 0)
- zr = -zr;
- if (zr < zi) {
- t = zi;
- zi = zr;
- zr = t;
- }
- t = zi/zr;
- s = zr * sqrt(1 + t*t);
- /* now s = f__cabs(zi,zr), and zr = |zr| >= |zi| = zi */
- if ((t = s - 1) < 0)
- t = -t;
- if (t > .01)
- r->r = log(s);
- else {
+ if (zi < 0)
+ zi = -zi;
+ if (zr < 0)
+ zr = -zr;
+ if (zr < zi)
+ {
+ t = zi;
+ zi = zr;
+ zr = t;
+ }
+ t = zi / zr;
+ s = zr * sqrt (1 + t * t);
+ /* now s = f__cabs(zi,zr), and zr = |zr| >= |zi| = zi */
+ if ((t = s - 1) < 0)
+ t = -t;
+ if (t > .01)
+ r->r = log (s);
+ else
+ {
#ifdef Comment
- log(1+x) = x - x^2/2 + x^3/3 - x^4/4 + - ...
-
- = x(1 - x/2 + x^2/3 -+...)
-
- [sqrt(y^2 + z^2) - 1] * [sqrt(y^2 + z^2) + 1] = y^2 + z^2 - 1, so
-
- sqrt(y^2 + z^2) - 1 = (y^2 + z^2 - 1) / [sqrt(y^2 + z^2) + 1]
-
-#endif /*Comment*/
-
- t = ((zr*zr - 1.) + zi*zi) / (s + 1);
- t2 = t*t;
- s = 1. - 0.5*t;
- u = v = 1;
- do {
- s0 = s;
- u *= t2;
- v += 2;
- s += u/v - t*u/(v+1);
- } while(s > s0);
- r->r = s*t;
- }
-#endif
+ log (1 + x) = x - x ^ 2 / 2 + x ^ 3 / 3 - x ^ 4 / 4 + -...
+ = x (1 - x / 2 + x ^ 2 / 3 - +...)
+ [sqrt (y ^ 2 + z ^ 2) - 1] *[sqrt (y ^ 2 + z ^ 2) + 1] =
+ y ^ 2 + z ^ 2 - 1, so sqrt (y ^ 2 + z ^ 2) - 1 =
+ (y ^ 2 + z ^ 2 - 1) /[sqrt (y ^ 2 + z ^ 2) + 1]
+#endif /*Comment */
+ t = ((zr * zr - 1.) + zi * zi) / (s + 1);
+ t2 = t * t;
+ s = 1. - 0.5 * t;
+ u = v = 1;
+ do
+ {
+ s0 = s;
+ u *= t2;
+ v += 2;
+ s += u / v - t * u / (v + 1);
}
+ while (s > s0);
+ r->r = s * t;
+ }
+#endif
+}
diff --git a/contrib/libf2c/libF77/z_sin.c b/contrib/libf2c/libF77/z_sin.c
index e24caff..8cb44cf 100644
--- a/contrib/libf2c/libF77/z_sin.c
+++ b/contrib/libf2c/libF77/z_sin.c
@@ -1,15 +1,11 @@
#include "f2c.h"
-#ifdef KR_headers
-double sin(), cos(), sinh(), cosh();
-VOID z_sin(r, z) doublecomplex *r, *z;
-#else
#undef abs
#include "math.h"
-void z_sin(doublecomplex *r, doublecomplex *z)
-#endif
+void
+z_sin (doublecomplex * r, doublecomplex * 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);
+}
diff --git a/contrib/libf2c/libF77/z_sqrt.c b/contrib/libf2c/libF77/z_sqrt.c
index c04e8f0..954c2fa 100644
--- a/contrib/libf2c/libF77/z_sqrt.c
+++ b/contrib/libf2c/libF77/z_sqrt.c
@@ -1,29 +1,25 @@
#include "f2c.h"
-#ifdef KR_headers
-double sqrt(), f__cabs();
-VOID z_sqrt(r, z) doublecomplex *r, *z;
-#else
#undef abs
#include "math.h"
-extern double f__cabs(double, double);
-void z_sqrt(doublecomplex *r, doublecomplex *z)
-#endif
+extern double f__cabs (double, double);
+void
+z_sqrt (doublecomplex * r, doublecomplex * z)
{
- double mag, zi = z->i, zr = z->r;
+ double mag, zi = z->i, zr = z->r;
- if( (mag = f__cabs(zr, zi)) == 0.)
- r->r = r->i = 0.;
- else if(zr > 0)
- {
- r->r = sqrt(0.5 * (mag + zr) );
- r->i = zi / r->r / 2;
- }
- else
- {
- r->i = sqrt(0.5 * (mag - zr) );
- if(zi < 0)
- r->i = - r->i;
- r->r = zi / r->i / 2;
- }
- }
+ if ((mag = f__cabs (zr, zi)) == 0.)
+ r->r = r->i = 0.;
+ else if (zr > 0)
+ {
+ r->r = sqrt (0.5 * (mag + zr));
+ r->i = zi / r->r / 2;
+ }
+ else
+ {
+ r->i = sqrt (0.5 * (mag - zr));
+ if (zi < 0)
+ r->i = -r->i;
+ r->r = zi / r->i / 2;
+ }
+}
OpenPOWER on IntegriCloud