Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (21 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
130 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28dir.info
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libf2c/libF77/F77_aloc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    77static integer memfailure = 3;
    88
    9 #ifdef KR_headers
    10 extern char *malloc();
    11 extern void G77_exit_0 ();
     9#include <stdlib.h>
     10extern void G77_exit_0 (integer *);
    1211
    13  char *
    14 F77_aloc(Len, whence) integer Len; char *whence;
    15 #else
    16 #include <stdlib.h>
    17 #ifdef __cplusplus
    18 extern "C" {
    19 #endif
    20 extern void G77_exit_0 (integer*);
    21 #ifdef __cplusplus
    22         }
    23 #endif
     12char *
     13F77_aloc (integer Len, char *whence)
     14{
     15  char *rv;
     16  unsigned int uLen = (unsigned int) Len;       /* for K&R C */
    2417
    25  char *
    26 F77_aloc(integer Len, char *whence)
    27 #endif
    28 {
    29         char *rv;
    30         unsigned int uLen = (unsigned int) Len; /* for K&R C */
    31 
    32         if (!(rv = (char*)malloc(uLen))) {
    33                 fprintf(stderr, "malloc(%u) failure in %s\n",
    34                         uLen, whence);
    35                 G77_exit_0 (&memfailure);
    36                 }
    37         return rv;
    38         }
     18  if (!(rv = (char *) malloc (uLen)))
     19    {
     20      fprintf (stderr, "malloc(%u) failure in %s\n", uLen, whence);
     21      G77_exit_0 (&memfailure);
     22    }
     23  return rv;
     24}
  • branches/GNU/src/gcc/libf2c/libF77/Makefile.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    4242@SET_MAKE@
    4343
    44 SHELL = /bin/sh
     44SHELL = @SHELL@
    4545
    4646#### End of system configuration section. ####
    4747
    48 ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR) -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(CFLAGS)
     48ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR) -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(WARN_CFLAGS) $(CFLAGS)
    4949
    5050.SUFFIXES:
  • branches/GNU/src/gcc/libf2c/libF77/Version.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1 static char junk[] = "\n@(#)LIBF77 VERSION 20000929\n";
    2 
    3 /*
    4 */
    5 
    6 char __G77_LIBF77_VERSION__[] = "3.2.2 20030205 (release)";
     1const char __LIBF77_VERSION__[] = "@(#) LIBF77 VERSION 20000929\n";
     2extern const char __LIBI77_VERSION__[];
     3extern const char __LIBU77_VERSION__[];
    74
    85/*
     
    8885g77__fvers__ ()
    8986{
    90   fprintf (stderr, "__G77_LIBF77_VERSION__: %s", __G77_LIBF77_VERSION__);
    91   fputs (junk, stderr);
     87  fputs ("GNU Fortran library.\n", stderr);
     88#if defined __GNUC__ && defined __VERSION__
     89  fprintf (stderr, "Compiled by GCC %s\n", __VERSION__);
     90#endif
     91  fputs (__LIBF77_VERSION__, stderr);
     92  fputs (__LIBI77_VERSION__, stderr);
     93  fputs (__LIBU77_VERSION__, stderr);
    9294}
  • branches/GNU/src/gcc/libf2c/libF77/abort_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    22#include "f2c.h"
    33
    4 #ifdef KR_headers
    5 extern VOID sig_die();
     4extern void sig_die (char *, int);
    65
    7 int G77_abort_0 ()
    8 #else
    9 extern void sig_die(char*,int);
    10 
    11 int G77_abort_0 (void)
    12 #endif
     6int
     7G77_abort_0 (void)
    138{
    14 sig_die("Fortran abort routine called", 1);
    15 return 0;       /* not reached */
     9  sig_die ("Fortran abort routine called", 1);
     10  return 0;                     /* not reached */
    1611}
  • branches/GNU/src/gcc/libf2c/libF77/c_abs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern double f__cabs();
     3extern double f__cabs (double, double);
    54
    6 double c_abs(z) complex *z;
    7 #else
    8 extern double f__cabs(double, double);
    9 
    10 double c_abs(complex *z)
    11 #endif
     5double
     6c_abs (complex * z)
    127{
    13 return( f__cabs( z->r, z->i ) );
     8  return (f__cabs (z->r, z->i));
    149}
  • branches/GNU/src/gcc/libf2c/libF77/c_cos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern double sin(), cos(), sinh(), cosh();
    5 
    6 VOID c_cos(r, z) complex *r, *z;
    7 #else
    83#undef abs
    94#include "math.h"
    105
    11 void c_cos(complex *r, complex *z)
    12 #endif
     6void
     7c_cos (complex * r, complex * z)
    138{
    14         double zi = z->i, zr = z->r;
    15         r->r =   cos(zr) * cosh(zi);
    16         r->i = - sin(zr) * sinh(zi);
    17         }
     9  double zi = z->i, zr = z->r;
     10  r->r = cos (zr) * cosh (zi);
     11  r->i = -sin (zr) * sinh (zi);
     12}
  • branches/GNU/src/gcc/libf2c/libF77/c_div.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern VOID sig_die();
    5 VOID c_div(c, a, b)
    6 complex *a, *b, *c;
     3extern void sig_die (char *, int);
     4void
     5c_div (complex * c, complex * a, complex * b)
     6{
     7  double ratio, den;
     8  double abr, abi, cr;
     9
     10  if ((abr = b->r) < 0.)
     11    abr = -abr;
     12  if ((abi = b->i) < 0.)
     13    abi = -abi;
     14  if (abr <= abi)
     15    {
     16      if (abi == 0)
     17        {
     18#ifdef IEEE_COMPLEX_DIVIDE
     19          float af, bf;
     20          af = bf = abr;
     21          if (a->i != 0 || a->r != 0)
     22            af = 1.;
     23          c->i = c->r = af / bf;
     24          return;
    725#else
    8 extern void sig_die(char*,int);
    9 void c_div(complex *c, complex *a, complex *b)
     26          sig_die ("complex division by zero", 1);
    1027#endif
    11 {
    12         double ratio, den;
    13         double abr, abi, cr;
     28        }
     29      ratio = (double) b->r / b->i;
     30      den = b->i * (1 + ratio * ratio);
     31      cr = (a->r * ratio + a->i) / den;
     32      c->i = (a->i * ratio - a->r) / den;
     33    }
    1434
    15         if( (abr = b->r) < 0.)
    16                 abr = - abr;
    17         if( (abi = b->i) < 0.)
    18                 abi = - abi;
    19         if( abr <= abi )
    20                 {
    21                 if(abi == 0) {
    22 #ifdef IEEE_COMPLEX_DIVIDE
    23                         float af, bf;
    24                         af = bf = abr;
    25                         if (a->i != 0 || a->r != 0)
    26                                 af = 1.;
    27                         c->i = c->r = af / bf;
    28                         return;
    29 #else
    30                         sig_die("complex division by zero", 1);
    31 #endif
    32                         }
    33                 ratio = (double)b->r / b->i ;
    34                 den = b->i * (1 + ratio*ratio);
    35                 cr = (a->r*ratio + a->i) / den;
    36                 c->i = (a->i*ratio - a->r) / den;
    37                 }
    38 
    39         else
    40                 {
    41                 ratio = (double)b->i / b->r ;
    42                 den = b->r * (1 + ratio*ratio);
    43                 cr = (a->r + a->i*ratio) / den;
    44                 c->i = (a->i - a->r*ratio) / den;
    45                 }
    46         c->r = cr;
    47         }
     35  else
     36    {
     37      ratio = (double) b->i / b->r;
     38      den = b->r * (1 + ratio * ratio);
     39      cr = (a->r + a->i * ratio) / den;
     40      c->i = (a->i - a->r * ratio) / den;
     41    }
     42  c->r = cr;
     43}
  • branches/GNU/src/gcc/libf2c/libF77/c_exp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern double exp(), cos(), sin();
    5 
    6  VOID c_exp(r, z) complex *r, *z;
    7 #else
    83#undef abs
    94#include "math.h"
    105
    11 void c_exp(complex *r, complex *z)
    12 #endif
     6void
     7c_exp (complex * r, complex * z)
    138{
    14         double expx, zi = z->i;
     9  double expx, zi = z->i;
    1510
    16         expx = exp(z->r);
    17         r->r = expx * cos(zi);
    18         r->i = expx * sin(zi);
    19         }
     11  expx = exp (z->r);
     12  r->r = expx * cos (zi);
     13  r->i = expx * sin (zi);
     14}
  • branches/GNU/src/gcc/libf2c/libF77/c_log.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern double log(), f__cabs(), atan2();
    5 VOID c_log(r, z) complex *r, *z;
    6 #else
    73#undef abs
    84#include "math.h"
    9 extern double f__cabs(double, double);
     5extern double f__cabs (double, double);
    106
    11 void c_log(complex *r, complex *z)
    12 #endif
     7void
     8c_log (complex * r, complex * z)
    139{
    14         double zi, zr;
    15         r->i = atan2(zi = z->i, zr = z->r);
    16         r->r = log( f__cabs(zr, zi) );
    17         }
     10  double zi, zr;
     11  r->i = atan2 (zi = z->i, zr = z->r);
     12  r->r = log (f__cabs (zr, zi));
     13}
  • branches/GNU/src/gcc/libf2c/libF77/c_sin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern double sin(), cos(), sinh(), cosh();
    5 
    6 VOID c_sin(r, z) complex *r, *z;
    7 #else
    83#undef abs
    94#include "math.h"
    105
    11 void c_sin(complex *r, complex *z)
    12 #endif
     6void
     7c_sin (complex * r, complex * z)
    138{
    14         double zi = z->i, zr = z->r;
    15         r->r = sin(zr) * cosh(zi);
    16         r->i = cos(zr) * sinh(zi);
    17         }
     9  double zi = z->i, zr = z->r;
     10  r->r = sin (zr) * cosh (zi);
     11  r->i = cos (zr) * sinh (zi);
     12}
  • branches/GNU/src/gcc/libf2c/libF77/c_sqrt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern double sqrt(), f__cabs();
    5 
    6 VOID c_sqrt(r, z) complex *r, *z;
    7 #else
    83#undef abs
    94#include "math.h"
    10 extern double f__cabs(double, double);
     5extern double f__cabs (double, double);
    116
    12 void c_sqrt(complex *r, complex *z)
    13 #endif
     7void
     8c_sqrt (complex * r, complex * z)
    149{
    15         double mag, t;
    16         double zi = z->i, zr = z->r;
     10  double mag, t;
     11  double zi = z->i, zr = z->r;
    1712
    18         if( (mag = f__cabs(zr, zi)) == 0.)
    19                 r->r = r->i = 0.;
    20         else if(zr > 0)
    21                 {
    22                 r->r = t = sqrt(0.5 * (mag + zr) );
    23                 t = zi / t;
    24                 r->i = 0.5 * t;
    25                 }
    26         else
    27                 {
    28                 t = sqrt(0.5 * (mag - zr) );
    29                 if(zi < 0)
    30                         t = -t;
    31                 r->i = t;
    32                 t = zi / t;
    33                 r->r = 0.5 * t;
    34                 }
    35         }
     13  if ((mag = f__cabs (zr, zi)) == 0.)
     14    r->r = r->i = 0.;
     15  else if (zr > 0)
     16    {
     17      r->r = t = sqrt (0.5 * (mag + zr));
     18      t = zi / t;
     19      r->i = 0.5 * t;
     20    }
     21  else
     22    {
     23      t = sqrt (0.5 * (mag - zr));
     24      if (zi < 0)
     25        t = -t;
     26      r->i = t;
     27      t = zi / t;
     28      r->r = 0.5 * t;
     29    }
     30}
  • branches/GNU/src/gcc/libf2c/libF77/cabs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1 #ifdef KR_headers
    2 extern double sqrt();
    3 double f__cabs(real, imag) double real, imag;
    4 #else
    51#undef abs
    62#include <math.h>
    7 double f__cabs(double real, double imag)
    8 #endif
     3double
     4f__cabs (double real, double imag)
    95{
    10 double temp;
     6  double temp;
    117
    12 if(real < 0)
    13         real = -real;
    14 if(imag < 0)
    15         imag = -imag;
    16 if(imag > real){
    17         temp = real;
    18         real = imag;
    19         imag = temp;
     8  if (real < 0)
     9    real = -real;
     10  if (imag < 0)
     11    imag = -imag;
     12  if (imag > real)
     13    {
     14      temp = real;
     15      real = imag;
     16      imag = temp;
     17    }
     18  if ((real + imag) == real)
     19    return (real);
     20
     21  temp = imag / real;
     22  temp = real * sqrt (1.0 + temp * temp);       /*overflow!! */
     23  return (temp);
    2024}
    21 if((real+imag) == real)
    22         return(real);
    23 
    24 temp = imag/real;
    25 temp = real*sqrt(1.0 + temp*temp);  /*overflow!!*/
    26 return(temp);
    27 }
  • branches/GNU/src/gcc/libf2c/libF77/configure

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2929silent=
    3030site=
    31 sitefile=
    3231srcdir=
    3332target=NONE
     
    144143  --no-create             do not create output files
    145144  --quiet, --silent       do not print \`checking...' messages
    146   --site-file=FILE        use FILE as the site file
    147145  --version               print the version of autoconf that created configure
    148146Directory and file names:
     
    315313    site="$ac_optarg" ;;
    316314
    317   -site-file | --site-file | --site-fil | --site-fi | --site-f)
    318     ac_prev=sitefile ;;
    319   -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
    320     sitefile="$ac_optarg" ;;
    321 
    322315  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    323316    ac_prev=srcdir ;;
     
    485478
    486479# Prefer explicitly selected file to automatically selected ones.
    487 if test -z "$sitefile"; then
    488   if test -z "$CONFIG_SITE"; then
    489     if test "x$prefix" != xNONE; then
    490       CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
    491     else
    492       CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
    493     fi
     480if test -z "$CONFIG_SITE"; then
     481  if test "x$prefix" != xNONE; then
     482    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
     483  else
     484    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
    494485  fi
    495 else
    496   CONFIG_SITE="$sitefile"
    497486fi
    498487for ac_site_file in $CONFIG_SITE; do
     
    542531set dummy gcc; ac_word=$2
    543532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    544 echo "configure:545: checking for $ac_word" >&5
     533echo "configure:534: checking for $ac_word" >&5
    545534if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    546535  echo $ac_n "(cached) $ac_c" 1>&6
     
    572561set dummy cc; ac_word=$2
    573562echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    574 echo "configure:575: checking for $ac_word" >&5
     563echo "configure:564: checking for $ac_word" >&5
    575564if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    576565  echo $ac_n "(cached) $ac_c" 1>&6
     
    623612set dummy cl; ac_word=$2
    624613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    625 echo "configure:626: checking for $ac_word" >&5
     614echo "configure:615: checking for $ac_word" >&5
    626615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
    627616  echo $ac_n "(cached) $ac_c" 1>&6
     
    656645
    657646echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
    658 echo "configure:659: checking whether we are using GNU C" >&5
     647echo "configure:648: checking whether we are using GNU C" >&5
    659648if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
    660649  echo $ac_n "(cached) $ac_c" 1>&6
     
    665654#endif
    666655EOF
    667 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
     656if { 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
    668657  ac_cv_prog_gcc=yes
    669658else
     
    684673CFLAGS=
    685674echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
    686 echo "configure:687: checking whether ${CC-cc} accepts -g" >&5
     675echo "configure:676: checking whether ${CC-cc} accepts -g" >&5
    687676if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
    688677  echo $ac_n "(cached) $ac_c" 1>&6
     
    727716set dummy ranlib; ac_word=$2
    728717echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    729 echo "configure:730: checking for $ac_word" >&5
     718echo "configure:719: checking for $ac_word" >&5
    730719if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
    731720  echo $ac_n "(cached) $ac_c" 1>&6
     
    756745fi
    757746echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
    758 echo "configure:759: checking whether ${MAKE-make} sets \${MAKE}" >&5
     747echo "configure:748: checking whether ${MAKE-make} sets \${MAKE}" >&5
    759748set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
    760749if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
     
    786775# Sanity check for the cross-compilation case:
    787776echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
    788 echo "configure:789: checking how to run the C preprocessor" >&5
     777echo "configure:778: checking how to run the C preprocessor" >&5
    789778# On Suns, sometimes $CPP names a directory.
    790779if test -n "$CPP" && test -d "$CPP"; then
     
    801790  # not just through cpp.
    802791  cat > conftest.$ac_ext <<EOF
    803 #line 804 "configure"
     792#line 793 "configure"
    804793#include "confdefs.h"
    805794#include <assert.h>
     
    807796EOF
    808797ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    809 { (eval echo configure:810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     798{ (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    810799ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    811800if test -z "$ac_err"; then
     
    818807  CPP="${CC-cc} -E -traditional-cpp"
    819808  cat > conftest.$ac_ext <<EOF
    820 #line 821 "configure"
     809#line 810 "configure"
    821810#include "confdefs.h"
    822811#include <assert.h>
     
    824813EOF
    825814ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    826 { (eval echo configure:827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     815{ (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    827816ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    828817if test -z "$ac_err"; then
     
    835824  CPP="${CC-cc} -nologo -E"
    836825  cat > conftest.$ac_ext <<EOF
    837 #line 838 "configure"
     826#line 827 "configure"
    838827#include "confdefs.h"
    839828#include <assert.h>
     
    841830EOF
    842831ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    843 { (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     832{ (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    844833ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    845834if test -z "$ac_err"; then
     
    867856ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'`
    868857echo $ac_n "checking for stdio.h""... $ac_c" 1>&6
    869 echo "configure:870: checking for stdio.h" >&5
     858echo "configure:859: checking for stdio.h" >&5
    870859if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    871860  echo $ac_n "(cached) $ac_c" 1>&6
    872861else
    873862  cat > conftest.$ac_ext <<EOF
    874 #line 875 "configure"
     863#line 864 "configure"
    875864#include "confdefs.h"
    876865#include <stdio.h>
    877866EOF
    878867ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    879 { (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     868{ (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    880869ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    881870if test -z "$ac_err"; then
     
    905894
    906895echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
    907 echo "configure:908: checking for ANSI C header files" >&5
     896echo "configure:897: checking for ANSI C header files" >&5
    908897if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
    909898  echo $ac_n "(cached) $ac_c" 1>&6
    910899else
    911900  cat > conftest.$ac_ext <<EOF
    912 #line 913 "configure"
     901#line 902 "configure"
    913902#include "confdefs.h"
    914903#include <stdlib.h>
     
    918907EOF
    919908ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    920 { (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
     909{ (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    921910ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    922911if test -z "$ac_err"; then
     
    935924  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
    936925cat > conftest.$ac_ext <<EOF
    937 #line 938 "configure"
     926#line 927 "configure"
    938927#include "confdefs.h"
    939928#include <string.h>
     
    953942  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
    954943cat > conftest.$ac_ext <<EOF
    955 #line 956 "configure"
     944#line 945 "configure"
    956945#include "confdefs.h"
    957946#include <stdlib.h>
     
    974963else
    975964  cat > conftest.$ac_ext <<EOF
    976 #line 977 "configure"
     965#line 966 "configure"
    977966#include "confdefs.h"
    978967#include <ctype.h>
     
    985974
    986975EOF
    987 if { (eval echo configure:988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
     976if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
    988977then
    989978  :
     
    1008997fi
    1009998
    1010 
    1011999echo $ac_n "checking for posix""... $ac_c" 1>&6
    1012 echo "configure:1013: checking for posix" >&5
     1000echo "configure:1001: checking for posix" >&5
    10131001if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then
    10141002  echo $ac_n "(cached) $ac_c" 1>&6
    10151003else
    10161004  cat > conftest.$ac_ext <<EOF
    1017 #line 1018 "configure"
     1005#line 1006 "configure"
    10181006#include "confdefs.h"
    10191007#include <sys/types.h>
     
    10411029# header isn't actually like checking the functions, though...
    10421030echo $ac_n "checking for GNU library""... $ac_c" 1>&6
    1043 echo "configure:1044: checking for GNU library" >&5
     1031echo "configure:1032: checking for GNU library" >&5
    10441032if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then
    10451033  echo $ac_n "(cached) $ac_c" 1>&6
    10461034else
    10471035  cat > conftest.$ac_ext <<EOF
    1048 #line 1049 "configure"
     1036#line 1037 "configure"
    10491037#include "confdefs.h"
    10501038#include <stdio.h>
     
    10691057
    10701058echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
    1071 echo "configure:1072: checking return type of signal handlers" >&5
     1059echo "configure:1060: checking return type of signal handlers" >&5
    10721060if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
    10731061  echo $ac_n "(cached) $ac_c" 1>&6
    10741062else
    10751063  cat > conftest.$ac_ext <<EOF
    1076 #line 1077 "configure"
     1064#line 1065 "configure"
    10771065#include "confdefs.h"
    10781066#include <sys/types.h>
     
    10911079; return 0; }
    10921080EOF
    1093 if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     1081if { (eval echo configure:1082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    10941082  rm -rf conftest*
    10951083  ac_cv_type_signal=void
     
    11121100if test $ac_cv_header_stdc != yes; then
    11131101echo $ac_n "checking for atexit""... $ac_c" 1>&6
    1114 echo "configure:1115: checking for atexit" >&5
     1102echo "configure:1103: checking for atexit" >&5
    11151103if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then
    11161104  echo $ac_n "(cached) $ac_c" 1>&6
    11171105else
    11181106  cat > conftest.$ac_ext <<EOF
    1119 #line 1120 "configure"
     1107#line 1108 "configure"
    11201108#include "confdefs.h"
    11211109/* System header to define __stub macros and hopefully few prototypes,
     
    11401128; return 0; }
    11411129EOF
    1142 if { (eval echo configure:1143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1130if { (eval echo configure:1131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    11431131  rm -rf conftest*
    11441132  eval "ac_cv_func_atexit=yes"
     
    11651153
    11661154  echo $ac_n "checking for onexit""... $ac_c" 1>&6
    1167 echo "configure:1168: checking for onexit" >&5
     1155echo "configure:1156: checking for onexit" >&5
    11681156if eval "test \"`echo '$''{'ac_cv_func_onexit'+set}'`\" = set"; then
    11691157  echo $ac_n "(cached) $ac_c" 1>&6
    11701158else
    11711159  cat > conftest.$ac_ext <<EOF
    1172 #line 1173 "configure"
     1160#line 1161 "configure"
    11731161#include "confdefs.h"
    11741162/* System header to define __stub macros and hopefully few prototypes,
     
    11931181; return 0; }
    11941182EOF
    1195 if { (eval echo configure:1196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1183if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    11961184  rm -rf conftest*
    11971185  eval "ac_cv_func_onexit=yes"
     
    12111199  echo "$ac_t""no" 1>&6
    12121200echo $ac_n "checking for on_exit""... $ac_c" 1>&6
    1213 echo "configure:1214: checking for on_exit" >&5
     1201echo "configure:1202: checking for on_exit" >&5
    12141202if eval "test \"`echo '$''{'ac_cv_func_on_exit'+set}'`\" = set"; then
    12151203  echo $ac_n "(cached) $ac_c" 1>&6
    12161204else
    12171205  cat > conftest.$ac_ext <<EOF
    1218 #line 1219 "configure"
     1206#line 1207 "configure"
    12191207#include "confdefs.h"
    12201208/* System header to define __stub macros and hopefully few prototypes,
     
    12391227; return 0; }
    12401228EOF
    1241 if { (eval echo configure:1242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1229if { (eval echo configure:1230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    12421230  rm -rf conftest*
    12431231  eval "ac_cv_func_on_exit=yes"
     
    12691257
    12701258echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6
    1271 echo "configure:1272: checking for drem in -lm" >&5
     1259echo "configure:1260: checking for drem in -lm" >&5
    12721260ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'`
    12731261if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
     
    12771265LIBS="-lm  $LIBS"
    12781266cat > conftest.$ac_ext <<EOF
    1279 #line 1280 "configure"
     1267#line 1268 "configure"
    12801268#include "confdefs.h"
    12811269/* Override any gcc2 internal prototype to avoid an error.  */
     
    12881276; return 0; }
    12891277EOF
    1290 if { (eval echo configure:1291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
     1278if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    12911279  rm -rf conftest*
    12921280  eval "ac_cv_lib_$ac_lib_var=yes"
  • branches/GNU/src/gcc/libf2c/libF77/configure.in

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    5757
    5858AC_HEADER_STDC
    59 dnl We could do this if we didn't know we were using gcc
    60 dnl AC_MSG_CHECKING(for prototype-savvy compiler)
    61 dnl AC_CACHE_VAL(g77_cv_sys_proto,               
    62 dnl   [AC_TRY_LINK(,                             
    63 dnl dnl looks screwy because TRY_LINK expects a function body
    64 dnl    [return 0;} int foo (int * bar) {],       
    65 dnl    g77_cv_sys_proto=yes,                     
    66 dnl    [g77_cv_sys_proto=no                       
    67 dnl     AC_DEFINE(KR_headers)])])               
    68 dnl AC_MSG_RESULT($g77_cv_sys_proto)             
    69 
    7059AC_MSG_CHECKING(for posix)
    7160AC_CACHE_VAL(g77_cv_header_posix,
  • branches/GNU/src/gcc/libf2c/libF77/d_abs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double d_abs(x) doublereal *x;
    5 #else
    6 double d_abs(doublereal *x)
    7 #endif
     3double
     4d_abs (doublereal * x)
    85{
    9 if(*x >= 0)
    10         return(*x);
    11 return(- *x);
     6  if (*x >= 0)
     7    return (*x);
     8  return (-*x);
    129}
  • branches/GNU/src/gcc/libf2c/libF77/d_acos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double acos();
    5 double d_acos(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_acos(doublereal *x)
    10 #endif
     5double
     6d_acos (doublereal * x)
    117{
    12 return( acos(*x) );
     8  return (acos (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_asin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double asin();
    5 double d_asin(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_asin(doublereal *x)
    10 #endif
     5double
     6d_asin (doublereal * x)
    117{
    12 return( asin(*x) );
     8  return (asin (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_atan.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double atan();
    5 double d_atan(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_atan(doublereal *x)
    10 #endif
     5double
     6d_atan (doublereal * x)
    117{
    12 return( atan(*x) );
     8  return (atan (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_atn2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double atan2();
    5 double d_atn2(x,y) doublereal *x, *y;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_atn2(doublereal *x, doublereal *y)
    10 #endif
     5double
     6d_atn2 (doublereal * x, doublereal * y)
    117{
    12 return( atan2(*x,*y) );
     8  return (atan2 (*x, *y));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_cnjg.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3  VOID
    4 #ifdef KR_headers
    5 d_cnjg(r, z) doublecomplex *r, *z;
    6 #else
    7 d_cnjg(doublecomplex *r, doublecomplex *z)
    8 #endif
     3void
     4d_cnjg (doublecomplex * r, doublecomplex * z)
    95{
    10         doublereal zi = z->i;
    11         r->r = z->r;
    12         r->i = -zi;
    13         }
     6  doublereal zi = z->i;
     7  r->r = z->r;
     8  r->i = -zi;
     9}
  • branches/GNU/src/gcc/libf2c/libF77/d_cos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double cos();
    5 double d_cos(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_cos(doublereal *x)
    10 #endif
     5double
     6d_cos (doublereal * x)
    117{
    12 return( cos(*x) );
     8  return (cos (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_cosh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double cosh();
    5 double d_cosh(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_cosh(doublereal *x)
    10 #endif
     5double
     6d_cosh (doublereal * x)
    117{
    12 return( cosh(*x) );
     8  return (cosh (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_dim.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double d_dim(a,b) doublereal *a, *b;
    5 #else
    6 double d_dim(doublereal *a, doublereal *b)
    7 #endif
     3double
     4d_dim (doublereal * a, doublereal * b)
    85{
    9 return( *a > *b ? *a - *b : 0);
     6  return (*a > *b ? *a - *b : 0);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/d_exp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double exp();
    5 double d_exp(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_exp(doublereal *x)
    10 #endif
     5double
     6d_exp (doublereal * x)
    117{
    12 return( exp(*x) );
     8  return (exp (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_imag.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double d_imag(z) doublecomplex *z;
    5 #else
    6 double d_imag(doublecomplex *z)
    7 #endif
     3double
     4d_imag (doublecomplex * z)
    85{
    9 return(z->i);
     6  return (z->i);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/d_int.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double floor();
    5 double d_int(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_int(doublereal *x)
    10 #endif
     5double
     6d_int (doublereal * x)
    117{
    12 return( (*x>0) ? floor(*x) : -floor(- *x) );
     8  return ((*x > 0) ? floor (*x) : -floor (-*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_lg10.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    33#define log10e 0.43429448190325182765
    44
    5 #ifdef KR_headers
    6 double log();
    7 double d_lg10(x) doublereal *x;
    8 #else
    95#undef abs
    106#include <math.h>
    11 double d_lg10(doublereal *x)
    12 #endif
     7double
     8d_lg10 (doublereal * x)
    139{
    14 return( log10e * log(*x) );
     10  return (log10e * log (*x));
    1511}
  • branches/GNU/src/gcc/libf2c/libF77/d_log.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double log();
    5 double d_log(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_log(doublereal *x)
    10 #endif
     5double
     6d_log (doublereal * x)
    117{
    12 return( log(*x) );
     8  return (log (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_mod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    43#ifdef IEEE_drem
    5 double drem();
    6 #else
    7 double floor();
    8 #endif
    9 double d_mod(x,y) doublereal *x, *y;
    10 #else
    11 #ifdef IEEE_drem
    12 double drem(double, double);
     4double drem (double, double);
    135#else
    146#undef abs
    157#include <math.h>
    168#endif
    17 double d_mod(doublereal *x, doublereal *y)
    18 #endif
     9double
     10d_mod (doublereal * x, doublereal * y)
    1911{
    2012#ifdef IEEE_drem
    21         double xa, ya, z;
    22         if ((ya = *y) < 0.)
    23                 ya = -ya;
    24         z = drem(xa = *x, ya);
    25         if (xa > 0) {
    26                 if (z < 0)
    27                         z += ya;
    28                 }
    29         else if (z > 0)
    30                 z -= ya;
    31         return z;
     13  double xa, ya, z;
     14  if ((ya = *y) < 0.)
     15    ya = -ya;
     16  z = drem (xa = *x, ya);
     17  if (xa > 0)
     18    {
     19      if (z < 0)
     20        z += ya;
     21    }
     22  else if (z > 0)
     23    z -= ya;
     24  return z;
    3225#else
    33         double quotient;
    34         if( (quotient = *x / *y) >= 0)
    35                 quotient = floor(quotient);
    36         else
    37                 quotient = -floor(-quotient);
    38         return(*x - (*y) * quotient );
     26  double quotient;
     27  if ((quotient = *x / *y) >= 0)
     28    quotient = floor (quotient);
     29  else
     30    quotient = -floor (-quotient);
     31  return (*x - (*y) * quotient);
    3932#endif
    4033}
  • branches/GNU/src/gcc/libf2c/libF77/d_nint.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double floor();
    5 double d_nint(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_nint(doublereal *x)
    10 #endif
     5double
     6d_nint (doublereal * x)
    117{
    12 return( (*x)>=0 ?
    13         floor(*x + .5) : -floor(.5 - *x) );
     8  return ((*x) >= 0 ? floor (*x + .5) : -floor (.5 - *x));
    149}
  • branches/GNU/src/gcc/libf2c/libF77/d_prod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double d_prod(x,y) real *x, *y;
    5 #else
    6 double d_prod(real *x, real *y)
    7 #endif
     3double
     4d_prod (real * x, real * y)
    85{
    9 return( (*x) * (*y) );
     6  return ((*x) * (*y));
    107}
  • branches/GNU/src/gcc/libf2c/libF77/d_sign.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double d_sign(a,b) doublereal *a, *b;
    5 #else
    6 double d_sign(doublereal *a, doublereal *b)
    7 #endif
     3double
     4d_sign (doublereal * a, doublereal * b)
    85{
    9 double x;
    10 x = (*a >= 0 ? *a : - *a);
    11 return( *b >= 0 ? x : -x);
     6  double x;
     7  x = (*a >= 0 ? *a : -*a);
     8  return (*b >= 0 ? x : -x);
    129}
  • branches/GNU/src/gcc/libf2c/libF77/d_sin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sin();
    5 double d_sin(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_sin(doublereal *x)
    10 #endif
     5double
     6d_sin (doublereal * x)
    117{
    12 return( sin(*x) );
     8  return (sin (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_sinh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sinh();
    5 double d_sinh(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_sinh(doublereal *x)
    10 #endif
     5double
     6d_sinh (doublereal * x)
    117{
    12 return( sinh(*x) );
     8  return (sinh (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_sqrt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sqrt();
    5 double d_sqrt(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_sqrt(doublereal *x)
    10 #endif
     5double
     6d_sqrt (doublereal * x)
    117{
    12 return( sqrt(*x) );
     8  return (sqrt (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_tan.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double tan();
    5 double d_tan(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_tan(doublereal *x)
    10 #endif
     5double
     6d_tan (doublereal * x)
    117{
    12 return( tan(*x) );
     8  return (tan (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/d_tanh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double tanh();
    5 double d_tanh(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double d_tanh(doublereal *x)
    10 #endif
     5double
     6d_tanh (doublereal * x)
    117{
    12 return( tanh(*x) );
     8  return (tanh (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/derf_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double erf();
    5 double G77_derf_0 (x) doublereal *x;
    6 #else
    7 extern double erf(double);
    8 double G77_derf_0 (doublereal *x)
    9 #endif
     3extern double erf (double);
     4double
     5G77_derf_0 (doublereal * x)
    106{
    11 return( erf(*x) );
     7  return (erf (*x));
    128}
  • branches/GNU/src/gcc/libf2c/libF77/derfc_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern double erfc();
     3extern double erfc (double);
    54
    6 double G77_derfc_0 (x) doublereal *x;
    7 #else
    8 extern double erfc(double);
    9 
    10 double G77_derfc_0 (doublereal *x)
    11 #endif
     5double
     6G77_derfc_0 (doublereal * x)
    127{
    13 return( erfc(*x) );
     8  return (erfc (*x));
    149}
  • branches/GNU/src/gcc/libf2c/libF77/dtime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2424#endif
    2525
    26  double
    27 #ifdef KR_headers
    28 dtime_(tarray) float *tarray;
    29 #else
    30 dtime_(float *tarray)
    31 #endif
     26double
     27dtime_ (float *tarray)
    3228{
    3329#ifdef USE_CLOCK
     
    3531#define CLOCKS_PER_SECOND Hz
    3632#endif
    37         static double t0;
    38         double t = clock();
    39         tarray[1] = 0;
    40         tarray[0] = (t - t0) / CLOCKS_PER_SECOND;
    41         t0 = t;
    42         return tarray[0];
     33  static double t0;
     34  double t = clock ();
     35  tarray[1] = 0;
     36  tarray[0] = (t - t0) / CLOCKS_PER_SECOND;
     37  t0 = t;
     38  return tarray[0];
    4339#else
    44         struct tms t;
    45         static struct tms t0;
     40  struct tms t;
     41  static struct tms t0;
    4642
    47         times(&t);
    48         tarray[0] = (double)(t.tms_utime - t0.tms_utime) / Hz;
    49         tarray[1] = (double)(t.tms_stime - t0.tms_stime) / Hz;
    50         t0 = t;
    51         return tarray[0] + tarray[1];
     43  times (&t);
     44  tarray[0] = (double) (t.tms_utime - t0.tms_utime) / Hz;
     45  tarray[1] = (double) (t.tms_stime - t0.tms_stime) / Hz;
     46  t0 = t;
     47  return tarray[0] + tarray[1];
    5248#endif
    53         }
     49}
  • branches/GNU/src/gcc/libf2c/libF77/ef1asc_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    77#define EVEN(x) ( ( (x)+ M) & (~M) )
    88
    9 #ifdef KR_headers
    10 extern VOID s_copy();
    11 G77_ef1asc_0 (a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb;
    12 #else
    13 extern void s_copy(char*,char*,ftnlen,ftnlen);
    14 int G77_ef1asc_0 (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb)
    15 #endif
     9extern void s_copy (char *, char *, ftnlen, ftnlen);
     10int
     11G77_ef1asc_0 (ftnint * a, ftnlen * la, ftnint * b, ftnlen * lb)
    1612{
    17 s_copy( (char *)a, (char *)b, EVEN(*la), *lb );
    18 return 0;       /* ignored return value */
     13  s_copy ((char *) a, (char *) b, EVEN (*la), *lb);
     14  return 0;                     /* ignored return value */
    1915}
  • branches/GNU/src/gcc/libf2c/libF77/ef1cmc_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    33#include "f2c.h"
    44
    5 #ifdef KR_headers
    6 extern integer s_cmp();
    7 integer G77_ef1cmc_0 (a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb;
    8 #else
    9 extern integer s_cmp(char*,char*,ftnlen,ftnlen);
    10 integer G77_ef1cmc_0 (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb)
    11 #endif
     5extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     6integer
     7G77_ef1cmc_0 (ftnint * a, ftnlen * la, ftnint * b, ftnlen * lb)
    128{
    13 return( s_cmp( (char *)a, (char *)b, *la, *lb) );
     9  return (s_cmp ((char *) a, (char *) b, *la, *lb));
    1410}
  • branches/GNU/src/gcc/libf2c/libF77/erf_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double erf();
    5 double G77_erf_0 (x) real *x;
    6 #else
    7 extern double erf(double);
    8 double G77_erf_0 (real *x)
    9 #endif
     3extern double erf (double);
     4double
     5G77_erf_0 (real * x)
    106{
    11 return( erf(*x) );
     7  return (erf (*x));
    128}
  • branches/GNU/src/gcc/libf2c/libF77/erfc_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double erfc();
    5 double G77_erfc_0 (x) real *x;
    6 #else
    7 extern double erfc(double);
    8 double G77_erfc_0 (real *x)
    9 #endif
     3extern double erfc (double);
     4double
     5G77_erfc_0 (real * x)
    106{
    11 return( erfc(*x) );
     7  return (erfc (*x));
    128}
  • branches/GNU/src/gcc/libf2c/libF77/etime_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    2424#endif
    2525
    26  double
    27 #ifdef KR_headers
    28 etime_(tarray) float *tarray;
    29 #else
    30 etime_(float *tarray)
    31 #endif
     26double
     27etime_ (float *tarray)
    3228{
    3329#ifdef USE_CLOCK
     
    3531#define CLOCKS_PER_SECOND Hz
    3632#endif
    37         double t = clock();
    38         tarray[1] = 0;
    39         return tarray[0] = t / CLOCKS_PER_SECOND;
     33  double t = clock ();
     34  tarray[1] = 0;
     35  return tarray[0] = t / CLOCKS_PER_SECOND;
    4036#else
    41         struct tms t;
     37  struct tms t;
    4238
    43         times(&t);
    44         return    (tarray[0] = (double)t.tms_utime/Hz)
    45                 + (tarray[1] = (double)t.tms_stime/Hz);
     39  times (&t);
     40  return (tarray[0] = (double) t.tms_utime / Hz)
     41    + (tarray[1] = (double) t.tms_stime / Hz);
    4642#endif
    47         }
     43}
  • branches/GNU/src/gcc/libf2c/libF77/exit_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1313#undef min
    1414#undef max
    15 #ifndef KR_headers
    1615#include <stdlib.h>
    17 #ifdef __cplusplus
    18 extern "C" {
    19 #endif
    20 extern void f_exit(void);
    21 #endif
     16extern void f_exit (void);
    2217
    23  void
    24 #ifdef KR_headers
    25 G77_exit_0 (rc) integer *rc;
    26 #else
    27 G77_exit_0 (integer *rc)
    28 #endif
     18void
     19G77_exit_0 (integer * rc)
    2920{
    3021#ifdef NO_ONEXIT
    31         f_exit();
     22  f_exit ();
    3223#endif
    33         exit(*rc);
    34         }
    35 #ifdef __cplusplus
     24  exit (*rc);
    3625}
    37 #endif
  • branches/GNU/src/gcc/libf2c/libF77/f2ch.add

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    33
    44#ifdef __cplusplus
    5 extern "C" {
    6 extern int abort_(void);
    7 extern double c_abs(complex *);
    8 extern void c_cos(complex *, complex *);
    9 extern void c_div(complex *, complex *, complex *);
    10 extern void c_exp(complex *, complex *);
    11 extern void c_log(complex *, complex *);
    12 extern void c_sin(complex *, complex *);
    13 extern void c_sqrt(complex *, complex *);
    14 extern double d_abs(double *);
    15 extern double d_acos(double *);
    16 extern double d_asin(double *);
    17 extern double d_atan(double *);
    18 extern double d_atn2(double *, double *);
    19 extern void d_cnjg(doublecomplex *, doublecomplex *);
    20 extern double d_cos(double *);
    21 extern double d_cosh(double *);
    22 extern double d_dim(double *, double *);
    23 extern double d_exp(double *);
    24 extern double d_imag(doublecomplex *);
    25 extern double d_int(double *);
    26 extern double d_lg10(double *);
    27 extern double d_log(double *);
    28 extern double d_mod(double *, double *);
    29 extern double d_nint(double *);
    30 extern double d_prod(float *, float *);
    31 extern double d_sign(double *, double *);
    32 extern double d_sin(double *);
    33 extern double d_sinh(double *);
    34 extern double d_sqrt(double *);
    35 extern double d_tan(double *);
    36 extern double d_tanh(double *);
    37 extern double derf_(double *);
    38 extern double derfc_(double *);
    39 extern integer do_fio(ftnint *, char *, ftnlen);
    40 extern integer do_lio(ftnint *, ftnint *, char *, ftnlen);
    41 extern integer do_uio(ftnint *, char *, ftnlen);
    42 extern integer e_rdfe(void);
    43 extern integer e_rdue(void);
    44 extern integer e_rsfe(void);
    45 extern integer e_rsfi(void);
    46 extern integer e_rsle(void);
    47 extern integer e_rsli(void);
    48 extern integer e_rsue(void);
    49 extern integer e_wdfe(void);
    50 extern integer e_wdue(void);
    51 extern integer e_wsfe(void);
    52 extern integer e_wsfi(void);
    53 extern integer e_wsle(void);
    54 extern integer e_wsli(void);
    55 extern integer e_wsue(void);
    56 extern int ef1asc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
    57 extern integer ef1cmc_(ftnint *, ftnlen *, ftnint *, ftnlen *);
    58 extern double erf(double);
    59 extern double erf_(float *);
    60 extern double erfc(double);
    61 extern double erfc_(float *);
    62 extern integer f_back(alist *);
    63 extern integer f_clos(cllist *);
    64 extern integer f_end(alist *);
    65 extern void f_exit(void);
    66 extern integer f_inqu(inlist *);
    67 extern integer f_open(olist *);
    68 extern integer f_rew(alist *);
    69 extern int flush_(void);
    70 extern void getarg_(integer *, char *, ftnlen);
    71 extern void getenv_(char *, char *, ftnlen, ftnlen);
    72 extern short h_abs(short *);
    73 extern short h_dim(short *, short *);
    74 extern short h_dnnt(double *);
    75 extern short h_indx(char *, char *, ftnlen, ftnlen);
    76 extern short h_len(char *, ftnlen);
    77 extern short h_mod(short *, short *);
    78 extern short h_nint(float *);
    79 extern short h_sign(short *, short *);
    80 extern short hl_ge(char *, char *, ftnlen, ftnlen);
    81 extern short hl_gt(char *, char *, ftnlen, ftnlen);
    82 extern short hl_le(char *, char *, ftnlen, ftnlen);
    83 extern short hl_lt(char *, char *, ftnlen, ftnlen);
    84 extern integer i_abs(integer *);
    85 extern integer i_dim(integer *, integer *);
    86 extern integer i_dnnt(double *);
    87 extern integer i_indx(char *, char *, ftnlen, ftnlen);
    88 extern integer i_len(char *, ftnlen);
    89 extern integer i_mod(integer *, integer *);
    90 extern integer i_nint(float *);
    91 extern integer i_sign(integer *, integer *);
    92 extern integer iargc_(void);
    93 extern ftnlen l_ge(char *, char *, ftnlen, ftnlen);
    94 extern ftnlen l_gt(char *, char *, ftnlen, ftnlen);
    95 extern ftnlen l_le(char *, char *, ftnlen, ftnlen);
    96 extern ftnlen l_lt(char *, char *, ftnlen, ftnlen);
    97 extern void pow_ci(complex *, complex *, integer *);
    98 extern double pow_dd(double *, double *);
    99 extern double pow_di(double *, integer *);
    100 extern short pow_hh(short *, shortint *);
    101 extern integer pow_ii(integer *, integer *);
    102 extern double pow_ri(float *, integer *);
    103 extern void pow_zi(doublecomplex *, doublecomplex *, integer *);
    104 extern void pow_zz(doublecomplex *, doublecomplex *, doublecomplex *);
    105 extern double r_abs(float *);
    106 extern double r_acos(float *);
    107 extern double r_asin(float *);
    108 extern double r_atan(float *);
    109 extern double r_atn2(float *, float *);
    110 extern void r_cnjg(complex *, complex *);
    111 extern double r_cos(float *);
    112 extern double r_cosh(float *);
    113 extern double r_dim(float *, float *);
    114 extern double r_exp(float *);
    115 extern double r_imag(complex *);
    116 extern double r_int(float *);
    117 extern double r_lg10(float *);
    118 extern double r_log(float *);
    119 extern double r_mod(float *, float *);
    120 extern double r_nint(float *);
    121 extern double r_sign(float *, float *);
    122 extern double r_sin(float *);
    123 extern double r_sinh(float *);
    124 extern double r_sqrt(float *);
    125 extern double r_tan(float *);
    126 extern double r_tanh(float *);
    127 extern void s_cat(char *, char **, integer *, integer *, ftnlen);
    128 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    129 extern void s_copy(char *, char *, ftnlen, ftnlen);
    130 extern int s_paus(char *, ftnlen);
    131 extern integer s_rdfe(cilist *);
    132 extern integer s_rdue(cilist *);
    133 extern integer s_rnge(char *, integer, char *, integer);
    134 extern integer s_rsfe(cilist *);
    135 extern integer s_rsfi(icilist *);
    136 extern integer s_rsle(cilist *);
    137 extern integer s_rsli(icilist *);
    138 extern integer s_rsne(cilist *);
    139 extern integer s_rsni(icilist *);
    140 extern integer s_rsue(cilist *);
    141 extern int s_stop(char *, ftnlen);
    142 extern integer s_wdfe(cilist *);
    143 extern integer s_wdue(cilist *);
    144 extern integer s_wsfe(cilist *);
    145 extern integer s_wsfi(icilist *);
    146 extern integer s_wsle(cilist *);
    147 extern integer s_wsli(icilist *);
    148 extern integer s_wsne(cilist *);
    149 extern integer s_wsni(icilist *);
    150 extern integer s_wsue(cilist *);
    151 extern void sig_die(char *, int);
    152 extern integer signal_(integer *, void (*)(int));
    153 extern integer system_(char *, ftnlen);
    154 extern double z_abs(doublecomplex *);
    155 extern void z_cos(doublecomplex *, doublecomplex *);
    156 extern void z_div(doublecomplex *, doublecomplex *, doublecomplex *);
    157 extern void z_exp(doublecomplex *, doublecomplex *);
    158 extern void z_log(doublecomplex *, doublecomplex *);
    159 extern void z_sin(doublecomplex *, doublecomplex *);
    160 extern void z_sqrt(doublecomplex *, doublecomplex *);
    161         }
     5extern "C"
     6{
     7  extern int abort_ (void);
     8  extern double c_abs (complex *);
     9  extern void c_cos (complex *, complex *);
     10  extern void c_div (complex *, complex *, complex *);
     11  extern void c_exp (complex *, complex *);
     12  extern void c_log (complex *, complex *);
     13  extern void c_sin (complex *, complex *);
     14  extern void c_sqrt (complex *, complex *);
     15  extern double d_abs (double *);
     16  extern double d_acos (double *);
     17  extern double d_asin (double *);
     18  extern double d_atan (double *);
     19  extern double d_atn2 (double *, double *);
     20  extern void d_cnjg (doublecomplex *, doublecomplex *);
     21  extern double d_cos (double *);
     22  extern double d_cosh (double *);
     23  extern double d_dim (double *, double *);
     24  extern double d_exp (double *);
     25  extern double d_imag (doublecomplex *);
     26  extern double d_int (double *);
     27  extern double d_lg10 (double *);
     28  extern double d_log (double *);
     29  extern double d_mod (double *, double *);
     30  extern double d_nint (double *);
     31  extern double d_prod (float *, float *);
     32  extern double d_sign (double *, double *);
     33  extern double d_sin (double *);
     34  extern double d_sinh (double *);
     35  extern double d_sqrt (double *);
     36  extern double d_tan (double *);
     37  extern double d_tanh (double *);
     38  extern double derf_ (double *);
     39  extern double derfc_ (double *);
     40  extern integer do_fio (ftnint *, char *, ftnlen);
     41  extern integer do_lio (ftnint *, ftnint *, char *, ftnlen);
     42  extern integer do_uio (ftnint *, char *, ftnlen);
     43  extern integer e_rdfe (void);
     44  extern integer e_rdue (void);
     45  extern integer e_rsfe (void);
     46  extern integer e_rsfi (void);
     47  extern integer e_rsle (void);
     48  extern integer e_rsli (void);
     49  extern integer e_rsue (void);
     50  extern integer e_wdfe (void);
     51  extern integer e_wdue (void);
     52  extern integer e_wsfe (void);
     53  extern integer e_wsfi (void);
     54  extern integer e_wsle (void);
     55  extern integer e_wsli (void);
     56  extern integer e_wsue (void);
     57  extern int ef1asc_ (ftnint *, ftnlen *, ftnint *, ftnlen *);
     58  extern integer ef1cmc_ (ftnint *, ftnlen *, ftnint *, ftnlen *);
     59  extern double erf (double);
     60  extern double erf_ (float *);
     61  extern double erfc (double);
     62  extern double erfc_ (float *);
     63  extern integer f_back (alist *);
     64  extern integer f_clos (cllist *);
     65  extern integer f_end (alist *);
     66  extern void f_exit (void);
     67  extern integer f_inqu (inlist *);
     68  extern integer f_open (olist *);
     69  extern integer f_rew (alist *);
     70  extern int flush_ (void);
     71  extern void getarg_ (integer *, char *, ftnlen);
     72  extern void getenv_ (char *, char *, ftnlen, ftnlen);
     73  extern short h_abs (short *);
     74  extern short h_dim (short *, short *);
     75  extern short h_dnnt (double *);
     76  extern short h_indx (char *, char *, ftnlen, ftnlen);
     77  extern short h_len (char *, ftnlen);
     78  extern short h_mod (short *, short *);
     79  extern short h_nint (float *);
     80  extern short h_sign (short *, short *);
     81  extern short hl_ge (char *, char *, ftnlen, ftnlen);
     82  extern short hl_gt (char *, char *, ftnlen, ftnlen);
     83  extern short hl_le (char *, char *, ftnlen, ftnlen);
     84  extern short hl_lt (char *, char *, ftnlen, ftnlen);
     85  extern integer i_abs (integer *);
     86  extern integer i_dim (integer *, integer *);
     87  extern integer i_dnnt (double *);
     88  extern integer i_indx (char *, char *, ftnlen, ftnlen);
     89  extern integer i_len (char *, ftnlen);
     90  extern integer i_mod (integer *, integer *);
     91  extern integer i_nint (float *);
     92  extern integer i_sign (integer *, integer *);
     93  extern integer iargc_ (void);
     94  extern ftnlen l_ge (char *, char *, ftnlen, ftnlen);
     95  extern ftnlen l_gt (char *, char *, ftnlen, ftnlen);
     96  extern ftnlen l_le (char *, char *, ftnlen, ftnlen);
     97  extern ftnlen l_lt (char *, char *, ftnlen, ftnlen);
     98  extern void pow_ci (complex *, complex *, integer *);
     99  extern double pow_dd (double *, double *);
     100  extern double pow_di (double *, integer *);
     101  extern short pow_hh (short *, shortint *);
     102  extern integer pow_ii (integer *, integer *);
     103  extern double pow_ri (float *, integer *);
     104  extern void pow_zi (doublecomplex *, doublecomplex *, integer *);
     105  extern void pow_zz (doublecomplex *, doublecomplex *, doublecomplex *);
     106  extern double r_abs (float *);
     107  extern double r_acos (float *);
     108  extern double r_asin (float *);
     109  extern double r_atan (float *);
     110  extern double r_atn2 (float *, float *);
     111  extern void r_cnjg (complex *, complex *);
     112  extern double r_cos (float *);
     113  extern double r_cosh (float *);
     114  extern double r_dim (float *, float *);
     115  extern double r_exp (float *);
     116  extern double r_imag (complex *);
     117  extern double r_int (float *);
     118  extern double r_lg10 (float *);
     119  extern double r_log (float *);
     120  extern double r_mod (float *, float *);
     121  extern double r_nint (float *);
     122  extern double r_sign (float *, float *);
     123  extern double r_sin (float *);
     124  extern double r_sinh (float *);
     125  extern double r_sqrt (float *);
     126  extern double r_tan (float *);
     127  extern double r_tanh (float *);
     128  extern void s_cat (char *, char **, integer *, integer *, ftnlen);
     129  extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     130  extern void s_copy (char *, char *, ftnlen, ftnlen);
     131  extern int s_paus (char *, ftnlen);
     132  extern integer s_rdfe (cilist *);
     133  extern integer s_rdue (cilist *);
     134  extern integer s_rnge (char *, integer, char *, integer);
     135  extern integer s_rsfe (cilist *);
     136  extern integer s_rsfi (icilist *);
     137  extern integer s_rsle (cilist *);
     138  extern integer s_rsli (icilist *);
     139  extern integer s_rsne (cilist *);
     140  extern integer s_rsni (icilist *);
     141  extern integer s_rsue (cilist *);
     142  extern int s_stop (char *, ftnlen);
     143  extern integer s_wdfe (cilist *);
     144  extern integer s_wdue (cilist *);
     145  extern integer s_wsfe (cilist *);
     146  extern integer s_wsfi (icilist *);
     147  extern integer s_wsle (cilist *);
     148  extern integer s_wsli (icilist *);
     149  extern integer s_wsne (cilist *);
     150  extern integer s_wsni (icilist *);
     151  extern integer s_wsue (cilist *);
     152  extern void sig_die (char *, int);
     153  extern integer signal_ (integer *, void (*)(int));
     154  extern integer system_ (char *, ftnlen);
     155  extern double z_abs (doublecomplex *);
     156  extern void z_cos (doublecomplex *, doublecomplex *);
     157  extern void z_div (doublecomplex *, doublecomplex *, doublecomplex *);
     158  extern void z_exp (doublecomplex *, doublecomplex *);
     159  extern void z_log (doublecomplex *, doublecomplex *);
     160  extern void z_sin (doublecomplex *, doublecomplex *);
     161  extern void z_sqrt (doublecomplex *, doublecomplex *);
     162}
    162163#endif
  • branches/GNU/src/gcc/libf2c/libF77/getarg_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    77*/
    88
    9 #ifdef KR_headers
    10 VOID G77_getarg_0 (n, s, ls) ftnint *n; register char *s; ftnlen ls;
    11 #else
    12 void G77_getarg_0 (ftnint *n, register char *s, ftnlen ls)
    13 #endif
     9void
     10G77_getarg_0 (ftnint * n, register char *s, ftnlen ls)
    1411{
    15 extern int f__xargc;
    16 extern char **f__xargv;
    17 register char *t;
    18 register int i;
     12  extern int f__xargc;
     13  extern char **f__xargv;
     14  register char *t;
     15  register int i;
    1916
    20 if(*n>=0 && *n<f__xargc)
    21         t = f__xargv[*n];
    22 else
    23         t = "";
    24 for(i = 0; i<ls && *t!='\0' ; ++i)
    25         *s++ = *t++;
    26 for( ; i<ls ; ++i)
    27         *s++ = ' ';
     17  if (*n >= 0 && *n < f__xargc)
     18    t = f__xargv[*n];
     19  else
     20    t = "";
     21  for (i = 0; i < ls && *t != '\0'; ++i)
     22    *s++ = *t++;
     23  for (; i < ls; ++i)
     24    *s++ = ' ';
    2825}
  • branches/GNU/src/gcc/libf2c/libF77/getenv_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22#undef abs
    3 #ifdef KR_headers
    4 extern char *F77_aloc(), *getenv();
    5 #else
    63#include <stdlib.h>
    74#include <string.h>
    8 extern char *F77_aloc(ftnlen, char*);
    9 #endif
     5extern char *F77_aloc (ftnlen, char *);
    106
    117/*
     
    2117 */
    2218
    23 #ifdef KR_headers
    24  VOID
    25 G77_getenv_0 (fname, value, flen, vlen) char *value, *fname; ftnlen vlen, flen;
    26 #else
    27  void
     19void
    2820G77_getenv_0 (char *fname, char *value, ftnlen flen, ftnlen vlen)
    29 #endif
    3021{
    31         char buf[256], *ep, *fp;
    32         integer i;
     22  char buf[256], *ep, *fp;
     23  integer i;
    3324
    34         if (flen <= 0)
    35                 goto add_blanks;
    36         for(i = 0; i < sizeof(buf); i++) {
    37                 if (i == flen || (buf[i] = fname[i]) == ' ') {
    38                         buf[i] = 0;
    39                         ep = getenv(buf);
    40                         goto have_ep;
    41                         }
    42                 }
    43         while(i < flen && fname[i] != ' ')
    44                 i++;
    45         strncpy(fp = F77_aloc(i+1, "getenv_"), fname, (int)i);
    46         fp[i] = 0;
    47         ep = getenv(fp);
    48         free(fp);
    49  have_ep:
    50         if (ep)
    51                 while(*ep && vlen-- > 0)
    52                         *value++ = *ep++;
    53  add_blanks:
    54         while(vlen-- > 0)
    55                 *value++ = ' ';
     25  if (flen <= 0)
     26    goto add_blanks;
     27  for (i = 0; i < (integer) sizeof (buf); i++)
     28    {
     29      if (i == flen || (buf[i] = fname[i]) == ' ')
     30        {
     31          buf[i] = 0;
     32          ep = getenv (buf);
     33          goto have_ep;
    5634        }
     35    }
     36  while (i < flen && fname[i] != ' ')
     37    i++;
     38  strncpy (fp = F77_aloc (i + 1, "getenv_"), fname, (int) i);
     39  fp[i] = 0;
     40  ep = getenv (fp);
     41  free (fp);
     42have_ep:
     43  if (ep)
     44    while (*ep && vlen-- > 0)
     45      *value++ = *ep++;
     46add_blanks:
     47  while (vlen-- > 0)
     48    *value++ = ' ';
     49}
  • branches/GNU/src/gcc/libf2c/libF77/h_abs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 shortint h_abs(x) shortint *x;
    5 #else
    6 shortint h_abs(shortint *x)
    7 #endif
     3shortint
     4h_abs (shortint * x)
    85{
    9 if(*x >= 0)
    10         return(*x);
    11 return(- *x);
     6  if (*x >= 0)
     7    return (*x);
     8  return (-*x);
    129}
  • branches/GNU/src/gcc/libf2c/libF77/h_dim.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 shortint h_dim(a,b) shortint *a, *b;
    5 #else
    6 shortint h_dim(shortint *a, shortint *b)
    7 #endif
     3shortint
     4h_dim (shortint * a, shortint * b)
    85{
    9 return( *a > *b ? *a - *b : 0);
     6  return (*a > *b ? *a - *b : 0);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/h_dnnt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double floor();
    5 shortint h_dnnt(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 shortint h_dnnt(doublereal *x)
    10 #endif
     5shortint
     6h_dnnt (doublereal * x)
    117{
    12 return (shortint)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));
     8  return (shortint) (*x >= 0. ? floor (*x + .5) : -floor (.5 - *x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/h_indx.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 shortint h_indx(a, b, la, lb) char *a, *b; ftnlen la, lb;
    5 #else
    6 shortint h_indx(char *a, char *b, ftnlen la, ftnlen lb)
    7 #endif
     3shortint
     4h_indx (char *a, char *b, ftnlen la, ftnlen lb)
    85{
    9 ftnlen i, n;
    10 char *s, *t, *bend;
     6  ftnlen i, n;
     7  char *s, *t, *bend;
    118
    12 n = la - lb + 1;
    13 bend = b + lb;
     9  n = la - lb + 1;
     10  bend = b + lb;
    1411
    15 for(i = 0 ; i < n ; ++i)
    16         {
    17         s = a + i;
    18         t = b;
    19         while(t < bend)
    20                 if(*s++ != *t++)
    21                         goto no;
    22         return((shortint)i+1);
    23         no: ;
    24         }
    25 return(0);
     12  for (i = 0; i < n; ++i)
     13    {
     14      s = a + i;
     15      t = b;
     16      while (t < bend)
     17        if (*s++ != *t++)
     18          goto no;
     19      return ((shortint) i + 1);
     20    no:;
     21    }
     22  return (0);
    2623}
  • branches/GNU/src/gcc/libf2c/libF77/h_len.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 shortint h_len(s, n) char *s; ftnlen n;
    5 #else
    6 shortint h_len(char *s, ftnlen n)
    7 #endif
     3shortint
     4h_len (char *s __attribute__ ((__unused__)), ftnlen n)
    85{
    9 return(n);
     6  return (n);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/h_mod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 shortint h_mod(a,b) short *a, *b;
    5 #else
    6 shortint h_mod(short *a, short *b)
    7 #endif
     3shortint
     4h_mod (short *a, short *b)
    85{
    9 return( *a % *b);
     6  return (*a % *b);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/h_nint.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double floor();
    5 shortint h_nint(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 shortint h_nint(real *x)
    10 #endif
     5shortint
     6h_nint (real * x)
    117{
    12 return (shortint)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
     8  return (shortint) (*x >= 0 ? floor (*x + .5) : -floor (.5 - *x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/h_sign.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 shortint h_sign(a,b) shortint *a, *b;
    5 #else
    6 shortint h_sign(shortint *a, shortint *b)
    7 #endif
     3shortint
     4h_sign (shortint * a, shortint * b)
    85{
    9 shortint x;
    10 x = (*a >= 0 ? *a : - *a);
    11 return( *b >= 0 ? x : -x);
     6  shortint x;
     7  x = (*a >= 0 ? *a : -*a);
     8  return (*b >= 0 ? x : -x);
    129}
  • branches/GNU/src/gcc/libf2c/libF77/hl_ge.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern integer s_cmp();
    5 shortlogical hl_ge(a,b,la,lb) char *a, *b; ftnlen la, lb;
    6 #else
    7 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    8 shortlogical hl_ge(char *a, char *b, ftnlen la, ftnlen lb)
    9 #endif
     3extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     4shortlogical
     5hl_ge (char *a, char *b, ftnlen la, ftnlen lb)
    106{
    11 return(s_cmp(a,b,la,lb) >= 0);
     7  return (s_cmp (a, b, la, lb) >= 0);
    128}
  • branches/GNU/src/gcc/libf2c/libF77/hl_gt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern integer s_cmp();
    5 shortlogical hl_gt(a,b,la,lb) char *a, *b; ftnlen la, lb;
    6 #else
    7 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    8 shortlogical hl_gt(char *a, char *b, ftnlen la, ftnlen lb)
    9 #endif
     3extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     4shortlogical
     5hl_gt (char *a, char *b, ftnlen la, ftnlen lb)
    106{
    11 return(s_cmp(a,b,la,lb) > 0);
     7  return (s_cmp (a, b, la, lb) > 0);
    128}
  • branches/GNU/src/gcc/libf2c/libF77/hl_le.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern integer s_cmp();
    5 shortlogical hl_le(a,b,la,lb) char *a, *b; ftnlen la, lb;
    6 #else
    7 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    8 shortlogical hl_le(char *a, char *b, ftnlen la, ftnlen lb)
    9 #endif
     3extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     4shortlogical
     5hl_le (char *a, char *b, ftnlen la, ftnlen lb)
    106{
    11 return(s_cmp(a,b,la,lb) <= 0);
     7  return (s_cmp (a, b, la, lb) <= 0);
    128}
  • branches/GNU/src/gcc/libf2c/libF77/hl_lt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern integer s_cmp();
    5 shortlogical hl_lt(a,b,la,lb) char *a, *b; ftnlen la, lb;
    6 #else
    7 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    8 shortlogical hl_lt(char *a, char *b, ftnlen la, ftnlen lb)
    9 #endif
     3extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     4shortlogical
     5hl_lt (char *a, char *b, ftnlen la, ftnlen lb)
    106{
    11 return(s_cmp(a,b,la,lb) < 0);
     7  return (s_cmp (a, b, la, lb) < 0);
    128}
  • branches/GNU/src/gcc/libf2c/libF77/i_abs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 integer i_abs(x) integer *x;
    5 #else
    6 integer i_abs(integer *x)
    7 #endif
     3integer
     4i_abs (integer * x)
    85{
    9 if(*x >= 0)
    10         return(*x);
    11 return(- *x);
     6  if (*x >= 0)
     7    return (*x);
     8  return (-*x);
    129}
  • branches/GNU/src/gcc/libf2c/libF77/i_dim.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 integer i_dim(a,b) integer *a, *b;
    5 #else
    6 integer i_dim(integer *a, integer *b)
    7 #endif
     3integer
     4i_dim (integer * a, integer * b)
    85{
    9 return( *a > *b ? *a - *b : 0);
     6  return (*a > *b ? *a - *b : 0);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/i_dnnt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double floor();
    5 integer i_dnnt(x) doublereal *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 integer i_dnnt(doublereal *x)
    10 #endif
     5integer
     6i_dnnt (doublereal * x)
    117{
    12 return (integer)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));
     8  return (integer) (*x >= 0. ? floor (*x + .5) : -floor (.5 - *x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/i_indx.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 integer i_indx(a, b, la, lb) char *a, *b; ftnlen la, lb;
    5 #else
    6 integer i_indx(char *a, char *b, ftnlen la, ftnlen lb)
    7 #endif
     3integer
     4i_indx (char *a, char *b, ftnlen la, ftnlen lb)
    85{
    9 ftnlen i, n;
    10 char *s, *t, *bend;
     6  ftnlen i, n;
     7  char *s, *t, *bend;
    118
    12 n = la - lb + 1;
    13 bend = b + lb;
     9  n = la - lb + 1;
     10  bend = b + lb;
    1411
    15 for(i = 0 ; i < n ; ++i)
    16         {
    17         s = a + i;
    18         t = b;
    19         while(t < bend)
    20                 if(*s++ != *t++)
    21                         goto no;
    22         return(i+1);
    23         no: ;
    24         }
    25 return(0);
     12  for (i = 0; i < n; ++i)
     13    {
     14      s = a + i;
     15      t = b;
     16      while (t < bend)
     17        if (*s++ != *t++)
     18          goto no;
     19      return (i + 1);
     20    no:;
     21    }
     22  return (0);
    2623}
  • branches/GNU/src/gcc/libf2c/libF77/i_len.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 integer i_len(s, n) char *s; ftnlen n;
    5 #else
    6 integer i_len(char *s, ftnlen n)
    7 #endif
     3integer
     4i_len (char *s __attribute__ ((__unused__)), ftnlen n)
    85{
    9 return(n);
     6  return (n);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/i_mod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 integer i_mod(a,b) integer *a, *b;
    5 #else
    6 integer i_mod(integer *a, integer *b)
    7 #endif
     3integer
     4i_mod (integer * a, integer * b)
    85{
    9 return( *a % *b);
     6  return (*a % *b);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/i_nint.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double floor();
    5 integer i_nint(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 integer i_nint(real *x)
    10 #endif
     5integer
     6i_nint (real * x)
    117{
    12 return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));
     8  return (integer) (*x >= 0 ? floor (*x + .5) : -floor (.5 - *x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/i_sign.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 integer i_sign(a,b) integer *a, *b;
    5 #else
    6 integer i_sign(integer *a, integer *b)
    7 #endif
     3integer
     4i_sign (integer * a, integer * b)
    85{
    9 integer x;
    10 x = (*a >= 0 ? *a : - *a);
    11 return( *b >= 0 ? x : -x);
     6  integer x;
     7  x = (*a >= 0 ? *a : -*a);
     8  return (*b >= 0 ? x : -x);
    129}
  • branches/GNU/src/gcc/libf2c/libF77/iargc_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 ftnint G77_iargc_0 ()
    5 #else
    6 ftnint G77_iargc_0 (void)
    7 #endif
     3ftnint
     4G77_iargc_0 (void)
    85{
    9 extern int f__xargc;
    10 return ( f__xargc - 1 );
     6  extern int f__xargc;
     7  return (f__xargc - 1);
    118}
  • branches/GNU/src/gcc/libf2c/libF77/l_ge.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern integer s_cmp();
    5 logical l_ge(a,b,la,lb) char *a, *b; ftnlen la, lb;
    6 #else
    7 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    8 logical l_ge(char *a, char *b, ftnlen la, ftnlen lb)
    9 #endif
     3extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     4logical
     5l_ge (char *a, char *b, ftnlen la, ftnlen lb)
    106{
    11 return(s_cmp(a,b,la,lb) >= 0);
     7  return (s_cmp (a, b, la, lb) >= 0);
    128}
  • branches/GNU/src/gcc/libf2c/libF77/l_gt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern integer s_cmp();
    5 logical l_gt(a,b,la,lb) char *a, *b; ftnlen la, lb;
    6 #else
    7 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    8 logical l_gt(char *a, char *b, ftnlen la, ftnlen lb)
    9 #endif
     3extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     4logical
     5l_gt (char *a, char *b, ftnlen la, ftnlen lb)
    106{
    11 return(s_cmp(a,b,la,lb) > 0);
     7  return (s_cmp (a, b, la, lb) > 0);
    128}
  • branches/GNU/src/gcc/libf2c/libF77/l_le.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern integer s_cmp();
    5 logical l_le(a,b,la,lb) char *a, *b; ftnlen la, lb;
    6 #else
    7 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    8 logical l_le(char *a, char *b, ftnlen la, ftnlen lb)
    9 #endif
     3extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     4logical
     5l_le (char *a, char *b, ftnlen la, ftnlen lb)
    106{
    11 return(s_cmp(a,b,la,lb) <= 0);
     7  return (s_cmp (a, b, la, lb) <= 0);
    128}
  • branches/GNU/src/gcc/libf2c/libF77/l_lt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern integer s_cmp();
    5 logical l_lt(a,b,la,lb) char *a, *b; ftnlen la, lb;
    6 #else
    7 extern integer s_cmp(char *, char *, ftnlen, ftnlen);
    8 logical l_lt(char *a, char *b, ftnlen la, ftnlen lb)
    9 #endif
     3extern integer s_cmp (char *, char *, ftnlen, ftnlen);
     4logical
     5l_lt (char *a, char *b, ftnlen la, ftnlen lb)
    106{
    11 return(s_cmp(a,b,la,lb) < 0);
     7  return (s_cmp (a, b, la, lb) < 0);
    128}
  • branches/GNU/src/gcc/libf2c/libF77/lbitbits.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    55#endif
    66
    7  integer
    8 #ifdef KR_headers
    9 lbit_bits(a, b, len) integer a, b, len;
    10 #else
    11 lbit_bits(integer a, integer b, integer len)
    12 #endif
     7integer
     8lbit_bits (integer a, integer b, integer len)
    139{
    14         /* Assume 2's complement arithmetic */
     10  /* Assume 2's complement arithmetic */
    1511
    16         unsigned long x, y;
     12  unsigned long x, y;
    1713
    18         x = (unsigned long) a;
    19         y = (unsigned long)-1L;
    20         x >>= b;
    21         y <<= len;
    22         return (integer)(x & ~y);
     14  x = (unsigned long) a;
     15  y = (unsigned long) -1L;
     16  x >>= b;
     17  y <<= len;
     18  return (integer) (x & ~y);
     19}
     20
     21integer
     22lbit_cshift (integer a, integer b, integer len)
     23{
     24  unsigned long x, y, z;
     25
     26  x = (unsigned long) a;
     27  if (len <= 0)
     28    {
     29      if (len == 0)
     30        return 0;
     31      goto full_len;
     32    }
     33  if (len >= LONGBITS)
     34    {
     35    full_len:
     36      if (b >= 0)
     37        {
     38          b %= LONGBITS;
     39          return (integer) (x << b | x >> (LONGBITS - b));
    2340        }
    24 
    25  integer
    26 #ifdef KR_headers
    27 lbit_cshift(a, b, len) integer a, b, len;
    28 #else
    29 lbit_cshift(integer a, integer b, integer len)
    30 #endif
    31 {
    32         unsigned long x, y, z;
    33 
    34         x = (unsigned long)a;
    35         if (len <= 0) {
    36                 if (len == 0)
    37                         return 0;
    38                 goto full_len;
    39                 }
    40         if (len >= LONGBITS) {
    41  full_len:
    42                 if (b >= 0) {
    43                         b %= LONGBITS;
    44                         return (integer)(x << b | x >> LONGBITS -b );
    45                         }
    46                 b = -b;
    47                 b %= LONGBITS;
    48                 return (integer)(x << LONGBITS - b | x >> b);
    49                 }
    50         y = z = (unsigned long)-1;
    51         y <<= len;
    52         z &= ~y;
    53         y &= x;
    54         x &= z;
    55         if (b >= 0) {
    56                 b %= len;
    57                 return (integer)(y | z & (x << b | x >> len - b));
    58                 }
    59         b = -b;
    60         b %= len;
    61         return (integer)(y | z & (x >> b | x << len - b));
    62         }
     41      b = -b;
     42      b %= LONGBITS;
     43      return (integer) (x << (LONGBITS - b) | x >> b);
     44    }
     45  y = z = (unsigned long) -1;
     46  y <<= len;
     47  z &= ~y;
     48  y &= x;
     49  x &= z;
     50  if (b >= 0)
     51    {
     52      b %= len;
     53      return (integer) (y | (z & (x << b | x >> (len - b))));
     54    }
     55  b = -b;
     56  b %= len;
     57  return (integer) (y | (z & (x >> b | x << (len - b))));
     58}
  • branches/GNU/src/gcc/libf2c/libF77/lbitshft.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3  integer
    4 #ifdef KR_headers
    5 lbit_shift(a, b) integer a; integer b;
    6 #else
    7 lbit_shift(integer a, integer b)
    8 #endif
     3integer
     4lbit_shift (integer a, integer b)
    95{
    10         return b >= 0 ? a << b : (integer)((uinteger)a >> -b);
    11         }
     6  return b >= 0 ? a << b : (integer) ((uinteger) a >> -b);
     7}
  • branches/GNU/src/gcc/libf2c/libF77/main.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    44#include "signal1.h"
    55
    6 #ifndef KR_headers
    7 #undef VOID
    86#include <stdlib.h>
     7
     8extern void f_exit (void);
     9#ifndef NO_ONEXIT
     10#define ONEXIT atexit
     11extern int atexit (void (*)(void));
    912#endif
    1013
    11 #ifndef VOID
    12 #define VOID void
     14extern void f_init (void);
     15extern int MAIN__ (void);
     16extern void f_setarg (int, char **);
     17extern void f_setsig (void);
     18
     19int
     20main (int argc, char **argv)
     21{
     22  f_setarg (argc, argv);
     23  f_setsig ();
     24  f_init ();
     25#ifndef NO_ONEXIT
     26  ONEXIT (f_exit);
    1327#endif
    14 
    15 #ifdef __cplusplus
    16 extern "C" {
     28  MAIN__ ();
     29#ifdef NO_ONEXIT
     30  f_exit ();
    1731#endif
    18 
    19 #ifdef NO__STDC
    20 #define ONEXIT onexit
    21 extern VOID f_exit();
    22 #else
    23 #ifndef KR_headers
    24 extern void f_exit(void);
    25 #ifndef NO_ONEXIT
    26 #define ONEXIT atexit
    27 extern int atexit(void (*)(void));
    28 #endif
    29 #else
    30 #ifndef NO_ONEXIT
    31 #define ONEXIT onexit
    32 extern VOID f_exit();
    33 #endif
    34 #endif
    35 #endif
    36 
    37 #ifdef KR_headers
    38 extern VOID f_init();
    39 extern int MAIN__();
    40 #else
    41 extern void f_init(void);
    42 extern int MAIN__(void);
    43 #endif
    44 
    45 #ifdef __cplusplus
    46         }
    47 #endif
    48 
    49 #ifdef KR_headers
    50 main(argc, argv) int argc; char **argv;
    51 #else
    52 main(int argc, char **argv)
    53 #endif
    54 {
    55 f_setarg(argc, argv);
    56 f_setsig();
    57 f_init();
    58 #ifndef NO_ONEXIT
    59 ONEXIT(f_exit);
    60 #endif
    61 MAIN__();
    62 #ifdef NO_ONEXIT
    63 f_exit();
    64 #endif
    65 exit(0);        /* exit(0) rather than return(0) to bypass Cray bug */
    66 return 0;       /* For compilers that complain of missing return values; */
    67                 /* others will complain that this is unreachable code. */
     32  exit (0);                     /* exit(0) rather than return(0) to bypass Cray bug */
     33  return 0;                     /* For compilers that complain of missing return values; */
     34  /* others will complain that this is unreachable code. */
    6835}
  • branches/GNU/src/gcc/libf2c/libF77/pow_ci.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 VOID pow_ci(p, a, b)    /* p = a**b  */
    5  complex *p, *a; integer *b;
    6 #else
    7 extern void pow_zi(doublecomplex*, doublecomplex*, integer*);
    8 void pow_ci(complex *p, complex *a, integer *b)         /* p = a**b  */
    9 #endif
     3extern void pow_zi (doublecomplex *, doublecomplex *, integer *);
     4void
     5pow_ci (complex * p, complex * a, integer * b)  /* p = a**b  */
    106{
    11 doublecomplex p1, a1;
     7  doublecomplex p1, a1;
    128
    13 a1.r = a->r;
    14 a1.i = a->i;
     9  a1.r = a->r;
     10  a1.i = a->i;
    1511
    16 pow_zi(&p1, &a1, b);
     12  pow_zi (&p1, &a1, b);
    1713
    18 p->r = p1.r;
    19 p->i = p1.i;
     14  p->r = p1.r;
     15  p->i = p1.i;
    2016}
  • branches/GNU/src/gcc/libf2c/libF77/pow_dd.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double pow();
    5 double pow_dd(ap, bp) doublereal *ap, *bp;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double pow_dd(doublereal *ap, doublereal *bp)
    10 #endif
     5double
     6pow_dd (doublereal * ap, doublereal * bp)
    117{
    12 return(pow(*ap, *bp) );
     8  return (pow (*ap, *bp));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/pow_di.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double pow_di(ap, bp) doublereal *ap; integer *bp;
    5 #else
    6 double pow_di(doublereal *ap, integer *bp)
    7 #endif
     3double
     4pow_di (doublereal * ap, integer * bp)
    85{
    9 double pow, x;
    10 integer n;
    11 unsigned long u;
     6  double pow, x;
     7  integer n;
     8  unsigned long u;
    129
    13 pow = 1;
    14 x = *ap;
    15 n = *bp;
     10  pow = 1;
     11  x = *ap;
     12  n = *bp;
    1613
    17 if(n != 0)
     14  if (n != 0)
     15    {
     16      if (n < 0)
    1817        {
    19         if(n < 0)
    20                 {
    21                 n = -n;
    22                 x = 1/x;
    23                 }
    24         for(u = n; ; )
    25                 {
    26                 if(u & 01)
    27                         pow *= x;
    28                 if(u >>= 1)
    29                         x *= x;
    30                 else
    31                         break;
    32                 }
     18          n = -n;
     19          x = 1 / x;
    3320        }
    34 return(pow);
     21      for (u = n;;)
     22        {
     23          if (u & 01)
     24            pow *= x;
     25          if (u >>= 1)
     26            x *= x;
     27          else
     28            break;
     29        }
     30    }
     31  return (pow);
    3532}
  • branches/GNU/src/gcc/libf2c/libF77/pow_hh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 shortint pow_hh(ap, bp) shortint *ap, *bp;
    5 #else
    6 shortint pow_hh(shortint *ap, shortint *bp)
    7 #endif
     3shortint
     4pow_hh (shortint * ap, shortint * bp)
    85{
    9         shortint pow, x, n;
    10         unsigned u;
     6  shortint pow, x, n;
     7  unsigned u;
    118
    12         x = *ap;
    13         n = *bp;
     9  x = *ap;
     10  n = *bp;
    1411
    15         if (n <= 0) {
    16                 if (n == 0 || x == 1)
    17                         return 1;
    18                 if (x != -1)
    19                         return x == 0 ? 1/x : 0;
    20                 n = -n;
    21                 }
    22         u = n;
    23         for(pow = 1; ; )
    24                 {
    25                 if(u & 01)
    26                         pow *= x;
    27                 if(u >>= 1)
    28                         x *= x;
    29                 else
    30                         break;
    31                 }
    32         return(pow);
    33         }
     12  if (n <= 0)
     13    {
     14      if (n == 0 || x == 1)
     15        return 1;
     16      if (x != -1)
     17        return x == 0 ? 1 / x : 0;
     18      n = -n;
     19    }
     20  u = n;
     21  for (pow = 1;;)
     22    {
     23      if (u & 01)
     24        pow *= x;
     25      if (u >>= 1)
     26        x *= x;
     27      else
     28        break;
     29    }
     30  return (pow);
     31}
  • branches/GNU/src/gcc/libf2c/libF77/pow_ii.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 integer pow_ii(ap, bp) integer *ap, *bp;
    5 #else
    6 integer pow_ii(integer *ap, integer *bp)
    7 #endif
     3integer
     4pow_ii (integer * ap, integer * bp)
    85{
    9         integer pow, x, n;
    10         unsigned long u;
     6  integer pow, x, n;
     7  unsigned long u;
    118
    12         x = *ap;
    13         n = *bp;
     9  x = *ap;
     10  n = *bp;
    1411
    15         if (n <= 0) {
    16                 if (n == 0 || x == 1)
    17                         return 1;
    18                 if (x != -1)
    19                         return x == 0 ? 1/x : 0;
    20                 n = -n;
    21                 }
    22         u = n;
    23         for(pow = 1; ; )
    24                 {
    25                 if(u & 01)
    26                         pow *= x;
    27                 if(u >>= 1)
    28                         x *= x;
    29                 else
    30                         break;
    31                 }
    32         return(pow);
    33         }
     12  if (n <= 0)
     13    {
     14      if (n == 0 || x == 1)
     15        return 1;
     16      if (x != -1)
     17        return x == 0 ? 1 / x : 0;
     18      n = -n;
     19    }
     20  u = n;
     21  for (pow = 1;;)
     22    {
     23      if (u & 01)
     24        pow *= x;
     25      if (u >>= 1)
     26        x *= x;
     27      else
     28        break;
     29    }
     30  return (pow);
     31}
  • branches/GNU/src/gcc/libf2c/libF77/pow_qq.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 longint pow_qq(ap, bp) longint *ap, *bp;
    5 #else
    6 longint pow_qq(longint *ap, longint *bp)
    7 #endif
     3longint
     4pow_qq (longint * ap, longint * bp)
    85{
    9         longint pow, x, n;
    10         unsigned long long u;   /* system-dependent */
     6  longint pow, x, n;
     7  unsigned long long u;         /* system-dependent */
    118
    12         x = *ap;
    13         n = *bp;
     9  x = *ap;
     10  n = *bp;
    1411
    15         if (n <= 0) {
    16                 if (n == 0 || x == 1)
    17                         return 1;
    18                 if (x != -1)
    19                         return x == 0 ? 1/x : 0;
    20                 n = -n;
    21                 }
    22         u = n;
    23         for(pow = 1; ; )
    24                 {
    25                 if(u & 01)
    26                         pow *= x;
    27                 if(u >>= 1)
    28                         x *= x;
    29                 else
    30                         break;
    31                 }
    32         return(pow);
    33         }
     12  if (n <= 0)
     13    {
     14      if (n == 0 || x == 1)
     15        return 1;
     16      if (x != -1)
     17        return x == 0 ? 1 / x : 0;
     18      n = -n;
     19    }
     20  u = n;
     21  for (pow = 1;;)
     22    {
     23      if (u & 01)
     24        pow *= x;
     25      if (u >>= 1)
     26        x *= x;
     27      else
     28        break;
     29    }
     30  return (pow);
     31}
  • branches/GNU/src/gcc/libf2c/libF77/pow_ri.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double pow_ri(ap, bp) real *ap; integer *bp;
    5 #else
    6 double pow_ri(real *ap, integer *bp)
    7 #endif
     3double
     4pow_ri (real * ap, integer * bp)
    85{
    9 double pow, x;
    10 integer n;
    11 unsigned long u;
     6  double pow, x;
     7  integer n;
     8  unsigned long u;
    129
    13 pow = 1;
    14 x = *ap;
    15 n = *bp;
     10  pow = 1;
     11  x = *ap;
     12  n = *bp;
    1613
    17 if(n != 0)
     14  if (n != 0)
     15    {
     16      if (n < 0)
    1817        {
    19         if(n < 0)
    20                 {
    21                 n = -n;
    22                 x = 1/x;
    23                 }
    24         for(u = n; ; )
    25                 {
    26                 if(u & 01)
    27                         pow *= x;
    28                 if(u >>= 1)
    29                         x *= x;
    30                 else
    31                         break;
    32                 }
     18          n = -n;
     19          x = 1 / x;
    3320        }
    34 return(pow);
     21      for (u = n;;)
     22        {
     23          if (u & 01)
     24            pow *= x;
     25          if (u >>= 1)
     26            x *= x;
     27          else
     28            break;
     29        }
     30    }
     31  return (pow);
    3532}
  • branches/GNU/src/gcc/libf2c/libF77/pow_zi.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 VOID pow_zi(p, a, b)    /* p = a**b  */
    5  doublecomplex *p, *a; integer *b;
    6 #else
    7 extern void z_div(doublecomplex*, doublecomplex*, doublecomplex*);
    8 void pow_zi(doublecomplex *p, doublecomplex *a, integer *b)     /* p = a**b  */
    9 #endif
     3extern void z_div (doublecomplex *, doublecomplex *, doublecomplex *);
     4void
     5pow_zi (doublecomplex * p, doublecomplex * a, integer * b)      /* p = a**b  */
    106{
    11         integer n;
    12         unsigned long u;
    13         double t;
    14         doublecomplex q, x;
    15         static doublecomplex one = {1.0, 0.0};
     7  integer n;
     8  unsigned long u;
     9  double t;
     10  doublecomplex q, x;
     11  static doublecomplex one = { 1.0, 0.0 };
    1612
    17         n = *b;
    18         q.r = 1;
    19         q.i = 0;
     13  n = *b;
     14  q.r = 1;
     15  q.i = 0;
    2016
    21         if(n == 0)
    22                 goto done;
    23         if(n < 0)
    24                 {
    25                 n = -n;
    26                 z_div(&x, &one, a);
    27                 }
    28         else
    29                 {
    30                 x.r = a->r;
    31                 x.i = a->i;
    32                 }
     17  if (n == 0)
     18    goto done;
     19  if (n < 0)
     20    {
     21      n = -n;
     22      z_div (&x, &one, a);
     23    }
     24  else
     25    {
     26      x.r = a->r;
     27      x.i = a->i;
     28    }
    3329
    34         for(u = n; ; )
    35                 {
    36                 if(u & 01)
    37                         {
    38                         t = q.r * x.r - q.i * x.i;
    39                         q.i = q.r * x.i + q.i * x.r;
    40                         q.r = t;
    41                         }
    42                 if(u >>= 1)
    43                         {
    44                         t = x.r * x.r - x.i * x.i;
    45                         x.i = 2 * x.r * x.i;
    46                         x.r = t;
    47                         }
    48                 else
    49                         break;
    50                 }
    51  done:
    52         p->i = q.i;
    53         p->r = q.r;
     30  for (u = n;;)
     31    {
     32      if (u & 01)
     33        {
     34          t = q.r * x.r - q.i * x.i;
     35          q.i = q.r * x.i + q.i * x.r;
     36          q.r = t;
    5437        }
     38      if (u >>= 1)
     39        {
     40          t = x.r * x.r - x.i * x.i;
     41          x.i = 2 * x.r * x.i;
     42          x.r = t;
     43        }
     44      else
     45        break;
     46    }
     47done:
     48  p->i = q.i;
     49  p->r = q.r;
     50}
  • branches/GNU/src/gcc/libf2c/libF77/pow_zz.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double log(), exp(), cos(), sin(), atan2(), f__cabs();
    5 VOID pow_zz(r,a,b) doublecomplex *r, *a, *b;
    6 #else
    73#undef abs
    84#include <math.h>
    9 extern double f__cabs(double,double);
    10 void pow_zz(doublecomplex *r, doublecomplex *a, doublecomplex *b)
    11 #endif
     5extern double f__cabs (double, double);
     6void
     7pow_zz (doublecomplex * r, doublecomplex * a, doublecomplex * b)
    128{
    13 double logr, logi, x, y;
     9  double logr, logi, x, y;
    1410
    15 logr = log( f__cabs(a->r, a->i) );
    16 logi = atan2(a->i, a->r);
     11  if (a->r == 0.0 && a->i == 0.0)
     12    {
     13        /* Algorithm below doesn't cope.  */
     14        r->r = r->i = 0.0;
     15        return;
     16    }
     17  logr = log (f__cabs (a->r, a->i));
     18  logi = atan2 (a->i, a->r);
    1719
    18 x = exp( logr * b->r - logi * b->i );
    19 y = logr * b->i + logi * b->r;
     20  x = exp (logr * b->r - logi * b->i);
     21  y = logr * b->i + logi * b->r;
    2022
    21 r->r = x * cos(y);
    22 r->i = x * sin(y);
     23  r->r = x * cos (y);
     24  r->i = x * sin (y);
    2325}
  • branches/GNU/src/gcc/libf2c/libF77/qbitbits.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    99#endif
    1010
    11  integer
    12 #ifdef KR_headers
    13 qbit_bits(a, b, len) longint a; integer b, len;
    14 #else
    15 qbit_bits(longint a, integer b, integer len)
    16 #endif
     11integer
     12qbit_bits (longint a, integer b, integer len)
    1713{
    18         /* Assume 2's complement arithmetic */
     14  /* Assume 2's complement arithmetic */
    1915
    20         ulongint x, y;
     16  ulongint x, y;
    2117
    22         x = (ulongint) a;
    23         y = (ulongint)-1L;
    24         x >>= b;
    25         y <<= len;
    26         return (longint)(x & y);
     18  x = (ulongint) a;
     19  y = (ulongint) - 1L;
     20  x >>= b;
     21  y <<= len;
     22  return (longint) (x & y);
     23}
     24
     25longint
     26qbit_cshift (longint a, integer b, integer len)
     27{
     28  ulongint x, y, z;
     29
     30  x = (ulongint) a;
     31  if (len <= 0)
     32    {
     33      if (len == 0)
     34        return 0;
     35      goto full_len;
     36    }
     37  if (len >= LONG8BITS)
     38    {
     39    full_len:
     40      if (b >= 0)
     41        {
     42          b %= LONG8BITS;
     43          return (longint) (x << b | x >> (LONG8BITS - b));
    2744        }
    28 
    29  longint
    30 #ifdef KR_headers
    31 qbit_cshift(a, b, len) longint a; integer b, len;
    32 #else
    33 qbit_cshift(longint a, integer b, integer len)
    34 #endif
    35 {
    36         ulongint x, y, z;
    37 
    38         x = (ulongint)a;
    39         if (len <= 0) {
    40                 if (len == 0)
    41                         return 0;
    42                 goto full_len;
    43                 }
    44         if (len >= LONG8BITS) {
    45  full_len:
    46                 if (b >= 0) {
    47                         b %= LONG8BITS;
    48                         return (longint)(x << b | x >> LONG8BITS - b );
    49                         }
    50                 b = -b;
    51                 b %= LONG8BITS;
    52                 return (longint)(x << LONG8BITS - b | x >> b);
    53                 }
    54         y = z = (unsigned long)-1;
    55         y <<= len;
    56         z &= ~y;
    57         y &= x;
    58         x &= z;
    59         if (b >= 0) {
    60                 b %= len;
    61                 return (longint)(y | z & (x << b | x >> len - b));
    62                 }
    63         b = -b;
    64         b %= len;
    65         return (longint)(y | z & (x >> b | x << len - b));
    66         }
     45      b = -b;
     46      b %= LONG8BITS;
     47      return (longint) (x << (LONG8BITS - b) | x >> b);
     48    }
     49  y = z = (unsigned long) -1;
     50  y <<= len;
     51  z &= ~y;
     52  y &= x;
     53  x &= z;
     54  if (b >= 0)
     55    {
     56      b %= len;
     57      return (longint) (y | (z & (x << b | x >> (len - b))));
     58    }
     59  b = -b;
     60  b %= len;
     61  return (longint) (y | (z & (x >> b | x << (len - b))));
     62}
  • branches/GNU/src/gcc/libf2c/libF77/qbitshft.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3  longint
    4 #ifdef KR_headers
    5 qbit_shift(a, b) longint a; integer b;
    6 #else
    7 qbit_shift(longint a, integer b)
    8 #endif
     3longint
     4qbit_shift (longint a, integer b)
    95{
    10         return b >= 0 ? a << b : (longint)((ulongint)a >> -b);
    11         }
     6  return b >= 0 ? a << b : (longint) ((ulongint) a >> -b);
     7}
  • branches/GNU/src/gcc/libf2c/libF77/r_abs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double r_abs(x) real *x;
    5 #else
    6 double r_abs(real *x)
    7 #endif
     3double
     4r_abs (real * x)
    85{
    9 if(*x >= 0)
    10         return(*x);
    11 return(- *x);
     6  if (*x >= 0)
     7    return (*x);
     8  return (-*x);
    129}
  • branches/GNU/src/gcc/libf2c/libF77/r_acos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double acos();
    5 double r_acos(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_acos(real *x)
    10 #endif
     5double
     6r_acos (real * x)
    117{
    12 return( acos(*x) );
     8  return (acos (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_asin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double asin();
    5 double r_asin(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_asin(real *x)
    10 #endif
     5double
     6r_asin (real * x)
    117{
    12 return( asin(*x) );
     8  return (asin (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_atan.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double atan();
    5 double r_atan(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_atan(real *x)
    10 #endif
     5double
     6r_atan (real * x)
    117{
    12 return( atan(*x) );
     8  return (atan (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_atn2.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double atan2();
    5 double r_atn2(x,y) real *x, *y;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_atn2(real *x, real *y)
    10 #endif
     5double
     6r_atn2 (real * x, real * y)
    117{
    12 return( atan2(*x,*y) );
     8  return (atan2 (*x, *y));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_cnjg.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 VOID r_cnjg(r, z) complex *r, *z;
    5 #else
    6 VOID r_cnjg(complex *r, complex *z)
    7 #endif
     3void
     4r_cnjg (complex * r, complex * z)
    85{
    9         real zi = z->i;
    10         r->r = z->r;
    11         r->i = -zi;
    12         }
     6  real zi = z->i;
     7  r->r = z->r;
     8  r->i = -zi;
     9}
  • branches/GNU/src/gcc/libf2c/libF77/r_cos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double cos();
    5 double r_cos(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_cos(real *x)
    10 #endif
     5double
     6r_cos (real * x)
    117{
    12 return( cos(*x) );
     8  return (cos (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_cosh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double cosh();
    5 double r_cosh(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_cosh(real *x)
    10 #endif
     5double
     6r_cosh (real * x)
    117{
    12 return( cosh(*x) );
     8  return (cosh (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_dim.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double r_dim(a,b) real *a, *b;
    5 #else
    6 double r_dim(real *a, real *b)
    7 #endif
     3double
     4r_dim (real * a, real * b)
    85{
    9 return( *a > *b ? *a - *b : 0);
     6  return (*a > *b ? *a - *b : 0);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/r_exp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double exp();
    5 double r_exp(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_exp(real *x)
    10 #endif
     5double
     6r_exp (real * x)
    117{
    12 return( exp(*x) );
     8  return (exp (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_imag.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double r_imag(z) complex *z;
    5 #else
    6 double r_imag(complex *z)
    7 #endif
     3double
     4r_imag (complex * z)
    85{
    9 return(z->i);
     6  return (z->i);
    107}
  • branches/GNU/src/gcc/libf2c/libF77/r_int.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double floor();
    5 double r_int(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_int(real *x)
    10 #endif
     5double
     6r_int (real * x)
    117{
    12 return( (*x>0) ? floor(*x) : -floor(- *x) );
     8  return ((*x > 0) ? floor (*x) : -floor (-*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_lg10.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    33#define log10e 0.43429448190325182765
    44
    5 #ifdef KR_headers
    6 double log();
    7 double r_lg10(x) real *x;
    8 #else
    95#undef abs
    106#include <math.h>
    11 double r_lg10(real *x)
    12 #endif
     7double
     8r_lg10 (real * x)
    139{
    14 return( log10e * log(*x) );
     10  return (log10e * log (*x));
    1511}
  • branches/GNU/src/gcc/libf2c/libF77/r_log.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double log();
    5 double r_log(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_log(real *x)
    10 #endif
     5double
     6r_log (real * x)
    117{
    12 return( log(*x) );
     8  return (log (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_mod.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    43#ifdef IEEE_drem
    5 double drem();
    6 #else
    7 double floor();
    8 #endif
    9 double r_mod(x,y) real *x, *y;
    10 #else
    11 #ifdef IEEE_drem
    12 double drem(double, double);
     4double drem (double, double);
    135#else
    146#undef abs
    157#include <math.h>
    168#endif
    17 double r_mod(real *x, real *y)
    18 #endif
     9double
     10r_mod (real * x, real * y)
    1911{
    2012#ifdef IEEE_drem
    21         double xa, ya, z;
    22         if ((ya = *y) < 0.)
    23                 ya = -ya;
    24         z = drem(xa = *x, ya);
    25         if (xa > 0) {
    26                 if (z < 0)
    27                         z += ya;
    28                 }
    29         else if (z > 0)
    30                 z -= ya;
    31         return z;
     13  double xa, ya, z;
     14  if ((ya = *y) < 0.)
     15    ya = -ya;
     16  z = drem (xa = *x, ya);
     17  if (xa > 0)
     18    {
     19      if (z < 0)
     20        z += ya;
     21    }
     22  else if (z > 0)
     23    z -= ya;
     24  return z;
    3225#else
    33         double quotient;
    34         if( (quotient = (double)*x / *y) >= 0)
    35                 quotient = floor(quotient);
    36         else
    37                 quotient = -floor(-quotient);
    38         return(*x - (*y) * quotient );
     26  double quotient;
     27  if ((quotient = (double) *x / *y) >= 0)
     28    quotient = floor (quotient);
     29  else
     30    quotient = -floor (-quotient);
     31  return (*x - (*y) * quotient);
    3932#endif
    4033}
  • branches/GNU/src/gcc/libf2c/libF77/r_nint.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double floor();
    5 double r_nint(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_nint(real *x)
    10 #endif
     5double
     6r_nint (real * x)
    117{
    12 return( (*x)>=0 ?
    13         floor(*x + .5) : -floor(.5 - *x) );
     8  return ((*x) >= 0 ? floor (*x + .5) : -floor (.5 - *x));
    149}
  • branches/GNU/src/gcc/libf2c/libF77/r_sign.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double r_sign(a,b) real *a, *b;
    5 #else
    6 double r_sign(real *a, real *b)
    7 #endif
     3double
     4r_sign (real * a, real * b)
    85{
    9 double x;
    10 x = (*a >= 0 ? *a : - *a);
    11 return( *b >= 0 ? x : -x);
     6  double x;
     7  x = (*a >= 0 ? *a : -*a);
     8  return (*b >= 0 ? x : -x);
    129}
  • branches/GNU/src/gcc/libf2c/libF77/r_sin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sin();
    5 double r_sin(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_sin(real *x)
    10 #endif
     5double
     6r_sin (real * x)
    117{
    12 return( sin(*x) );
     8  return (sin (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_sinh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sinh();
    5 double r_sinh(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_sinh(real *x)
    10 #endif
     5double
     6r_sinh (real * x)
    117{
    12 return( sinh(*x) );
     8  return (sinh (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_sqrt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sqrt();
    5 double r_sqrt(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_sqrt(real *x)
    10 #endif
     5double
     6r_sqrt (real * x)
    117{
    12 return( sqrt(*x) );
     8  return (sqrt (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_tan.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double tan();
    5 double r_tan(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_tan(real *x)
    10 #endif
     5double
     6r_tan (real * x)
    117{
    12 return( tan(*x) );
     8  return (tan (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/r_tanh.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double tanh();
    5 double r_tanh(x) real *x;
    6 #else
    73#undef abs
    84#include <math.h>
    9 double r_tanh(real *x)
    10 #endif
     5double
     6r_tanh (real * x)
    117{
    12 return( tanh(*x) );
     8  return (tanh (*x));
    139}
  • branches/GNU/src/gcc/libf2c/libF77/s_cat.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    88#include <stdio.h>
    99#undef abs
    10 #ifdef KR_headers
    11  extern char *F77_aloc();
    12  extern void free();
    13  extern void G77_exit_0 ();
    14 #else
    1510#undef min
    1611#undef max
    1712#include <stdlib.h>
    18  extern char *F77_aloc(ftnlen, char*);
    19 #endif
     13extern char *F77_aloc (ftnlen, char *);
    2014#include <string.h>
    2115#endif /* NO_OVERWRITE */
    2216
    23  VOID
    24 #ifdef KR_headers
    25 s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnint rnp[], *np; ftnlen ll;
    26 #else
    27 s_cat(char *lp, char *rpp[], ftnint rnp[], ftnint *np, ftnlen ll)
     17void
     18s_cat (char *lp, char *rpp[], ftnint rnp[], ftnint * np, ftnlen ll)
     19{
     20  ftnlen i, nc;
     21  char *rp;
     22  ftnlen n = *np;
     23#ifndef NO_OVERWRITE
     24  ftnlen L, m;
     25  char *lp0, *lp1;
     26
     27  lp0 = 0;
     28  lp1 = lp;
     29  L = ll;
     30  i = 0;
     31  while (i < n)
     32    {
     33      rp = rpp[i];
     34      m = rnp[i++];
     35      if (rp >= lp1 || rp + m <= lp)
     36        {
     37          if ((L -= m) <= 0)
     38            {
     39              n = i;
     40              break;
     41            }
     42          lp1 += m;
     43          continue;
     44        }
     45      lp0 = lp;
     46      lp = lp1 = F77_aloc (L = ll, "s_cat");
     47      break;
     48    }
     49  lp1 = lp;
     50#endif /* NO_OVERWRITE */
     51  for (i = 0; i < n; ++i)
     52    {
     53      nc = ll;
     54      if (rnp[i] < nc)
     55        nc = rnp[i];
     56      ll -= nc;
     57      rp = rpp[i];
     58      while (--nc >= 0)
     59        *lp++ = *rp++;
     60    }
     61  while (--ll >= 0)
     62    *lp++ = ' ';
     63#ifndef NO_OVERWRITE
     64  if (lp0)
     65    {
     66      memcpy (lp0, lp1, L);
     67      free (lp1);
     68    }
    2869#endif
    29 {
    30         ftnlen i, nc;
    31         char *rp;
    32         ftnlen n = *np;
    33 #ifndef NO_OVERWRITE
    34         ftnlen L, m;
    35         char *lp0, *lp1;
    36 
    37         lp0 = 0;
    38         lp1 = lp;
    39         L = ll;
    40         i = 0;
    41         while(i < n) {
    42                 rp = rpp[i];
    43                 m = rnp[i++];
    44                 if (rp >= lp1 || rp + m <= lp) {
    45                         if ((L -= m) <= 0) {
    46                                 n = i;
    47                                 break;
    48                                 }
    49                         lp1 += m;
    50                         continue;
    51                         }
    52                 lp0 = lp;
    53                 lp = lp1 = F77_aloc(L = ll, "s_cat");
    54                 break;
    55                 }
    56         lp1 = lp;
    57 #endif /* NO_OVERWRITE */
    58         for(i = 0 ; i < n ; ++i) {
    59                 nc = ll;
    60                 if(rnp[i] < nc)
    61                         nc = rnp[i];
    62                 ll -= nc;
    63                 rp = rpp[i];
    64                 while(--nc >= 0)
    65                         *lp++ = *rp++;
    66                 }
    67         while(--ll >= 0)
    68                 *lp++ = ' ';
    69 #ifndef NO_OVERWRITE
    70         if (lp0) {
    71                 memcpy(lp0, lp1, L);
    72                 free(lp1);
    73                 }
    74 #endif
    75         }
     70}
  • branches/GNU/src/gcc/libf2c/libF77/s_cmp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    33/* compare two strings */
    44
    5 #ifdef KR_headers
    6 integer s_cmp(a0, b0, la, lb) char *a0, *b0; ftnlen la, lb;
    7 #else
    8 integer s_cmp(char *a0, char *b0, ftnlen la, ftnlen lb)
    9 #endif
     5integer
     6s_cmp (char *a0, char *b0, ftnlen la, ftnlen lb)
    107{
    11 register unsigned char *a, *aend, *b, *bend;
    12 a = (unsigned char *)a0;
    13 b = (unsigned char *)b0;
    14 aend = a + la;
    15 bend = b + lb;
     8  register unsigned char *a, *aend, *b, *bend;
     9  a = (unsigned char *) a0;
     10  b = (unsigned char *) b0;
     11  aend = a + la;
     12  bend = b + lb;
    1613
    17 if(la <= lb)
    18         {
    19         while(a < aend)
    20                 if(*a != *b)
    21                         return( *a - *b );
    22                 else
    23                         { ++a; ++b; }
     14  if (la <= lb)
     15    {
     16      while (a < aend)
     17        if (*a != *b)
     18          return (*a - *b);
     19        else
     20          {
     21            ++a;
     22            ++b;
     23          }
    2424
    25         while(b < bend)
    26                 if(*b != ' ')
    27                         return( ' ' - *b );
    28                 else    ++b;
    29         }
     25      while (b < bend)
     26        if (*b != ' ')
     27          return (' ' - *b);
     28        else
     29          ++b;
     30    }
    3031
    31 else
    32         {
    33         while(b < bend)
    34                 if(*a == *b)
    35                         { ++a; ++b; }
    36                 else
    37                         return( *a - *b );
    38         while(a < aend)
    39                 if(*a != ' ')
    40                         return(*a - ' ');
    41                 else    ++a;
    42         }
    43 return(0);
     32  else
     33    {
     34      while (b < bend)
     35        if (*a == *b)
     36          {
     37            ++a;
     38            ++b;
     39          }
     40        else
     41          return (*a - *b);
     42      while (a < aend)
     43        if (*a != ' ')
     44          return (*a - ' ');
     45        else
     46          ++a;
     47    }
     48  return (0);
    4449}
  • branches/GNU/src/gcc/libf2c/libF77/s_copy.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    99/* assign strings:  a = b */
    1010
    11 #ifdef KR_headers
    12 VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb;
    13 #else
    14 void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb)
     11void
     12s_copy (register char *a, register char *b, ftnlen la, ftnlen lb)
     13{
     14  register char *aend, *bend;
     15
     16  aend = a + la;
     17
     18  if (la <= lb)
     19#ifndef NO_OVERWRITE
     20    if (a <= b || a >= b + la)
    1521#endif
    16 {
    17         register char *aend, *bend;
    18 
    19         aend = a + la;
    20 
    21         if(la <= lb)
     22      while (a < aend)
     23        *a++ = *b++;
    2224#ifndef NO_OVERWRITE
    23                 if (a <= b || a >= b + la)
    24 #endif
    25                         while(a < aend)
    26                                 *a++ = *b++;
    27 #ifndef NO_OVERWRITE
    28                 else
    29                         for(b += la; a < aend; )
    30                                 *--aend = *--b;
     25    else
     26      for (b += la; a < aend;)
     27        *--aend = *--b;
    3128#endif
    3229
    33         else {
    34                 bend = b + lb;
     30  else
     31    {
     32      bend = b + lb;
    3533#ifndef NO_OVERWRITE
    36                 if (a <= b || a >= bend)
     34      if (a <= b || a >= bend)
    3735#endif
    38                         while(b < bend)
    39                                 *a++ = *b++;
     36        while (b < bend)
     37          *a++ = *b++;
    4038#ifndef NO_OVERWRITE
    41                 else {
    42                         a += lb;
    43                         while(b < bend)
    44                                 *--a = *--bend;
    45                         a += lb;
    46                         }
     39      else
     40        {
     41          a += lb;
     42          while (b < bend)
     43            *--a = *--bend;
     44          a += lb;
     45        }
    4746#endif
    48                 while(a < aend)
    49                         *a++ = ' ';
    50                 }
    51         }
     47      while (a < aend)
     48        *a++ = ' ';
     49    }
     50}
  • branches/GNU/src/gcc/libf2c/libF77/s_paus.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    44
    55#include "signal1.h"
    6 #ifdef KR_headers
    7 #define Void /* void */
    8 #define Int /* int */
    9 #else
    10 #define Void void
    11 #define Int int
    126#undef abs
    137#undef min
    148#undef max
    159#include <stdlib.h>
    16 #ifdef __cplusplus
    17 extern "C" {
     10extern int getpid (void), isatty (int), pause (void);
     11
     12extern void f_exit (void);
     13
     14static void
     15waitpause (Sigarg)
     16{
     17  Use_Sigarg;
     18  return;
     19}
     20
     21static void
     22s_1paus (FILE * fin)
     23{
     24  fprintf (stderr,
     25           "To resume execution, type go.  Other input will terminate the job.\n");
     26  fflush (stderr);
     27  if (getc (fin) != 'g' || getc (fin) != 'o' || getc (fin) != '\n')
     28    {
     29      fprintf (stderr, "STOP\n");
     30#ifdef NO_ONEXIT
     31      f_exit ();
    1832#endif
    19 extern int getpid(void), isatty(int), pause(void);
     33      exit (0);
     34    }
     35}
     36
     37int
     38s_paus (char *s, ftnlen n)
     39{
     40  fprintf (stderr, "PAUSE ");
     41  if (n > 0)
     42    fprintf (stderr, " %.*s", (int) n, s);
     43  fprintf (stderr, " statement executed\n");
     44  if (isatty (fileno (stdin)))
     45    s_1paus (stdin);
     46  else
     47    {
     48#if (defined (MSDOS) && !defined (GO32)) || defined (_WIN32)
     49      FILE *fin;
     50      fin = fopen ("con", "r");
     51      if (!fin)
     52        {
     53          fprintf (stderr, "s_paus: can't open con!\n");
     54          fflush (stderr);
     55          exit (1);
     56        }
     57      s_1paus (fin);
     58      fclose (fin);
     59#else
     60      fprintf (stderr,
     61               "To resume execution, execute a   kill -%d %d   command\n",
     62               PAUSESIG, getpid ());
     63      signal1 (PAUSESIG, waitpause);
     64      fflush (stderr);
     65      pause ();
    2066#endif
    21 
    22 extern VOID f_exit(Void);
    23 
    24  static VOID
    25 waitpause(Sigarg)
    26 {       Use_Sigarg;
    27         return;
    28         }
    29 
    30  static VOID
    31 #ifdef KR_headers
    32 s_1paus(fin) FILE *fin;
    33 #else
    34 s_1paus(FILE *fin)
    35 #endif
    36 {
    37         fprintf(stderr,
    38         "To resume execution, type go.  Other input will terminate the job.\n");
    39         fflush(stderr);
    40         if( getc(fin)!='g' || getc(fin)!='o' || getc(fin)!='\n' ) {
    41                 fprintf(stderr, "STOP\n");
    42 #ifdef NO_ONEXIT
    43                 f_exit();
    44 #endif
    45                 exit(0);
    46                 }
    47         }
    48 
    49  int
    50 #ifdef KR_headers
    51 s_paus(s, n) char *s; ftnlen n;
    52 #else
    53 s_paus(char *s, ftnlen n)
    54 #endif
    55 {
    56         fprintf(stderr, "PAUSE ");
    57         if(n > 0)
    58                 fprintf(stderr, " %.*s", (int)n, s);
    59         fprintf(stderr, " statement executed\n");
    60         if( isatty(fileno(stdin)) )
    61                 s_1paus(stdin);
    62         else {
    63 #if (defined (MSDOS) && !defined (GO32)) || defined (_WIN32)
    64                 FILE *fin;
    65                 fin = fopen("con", "r");
    66                 if (!fin) {
    67                         fprintf(stderr, "s_paus: can't open con!\n");
    68                         fflush(stderr);
    69                         exit(1);
    70                         }
    71                 s_1paus(fin);
    72                 fclose(fin);
    73 #else
    74                 fprintf(stderr,
    75                 "To resume execution, execute a   kill -%d %d   command\n",
    76                         PAUSESIG, getpid() );
    77                 signal1(PAUSESIG, waitpause);
    78                 fflush(stderr);
    79                 pause();
    80 #endif
    81                 }
    82         fprintf(stderr, "Execution resumes after PAUSE.\n");
    83         fflush(stderr);
    84         return 0; /* NOT REACHED */
    85 #ifdef __cplusplus
    86         }
    87 #endif
     67    }
     68  fprintf (stderr, "Execution resumes after PAUSE.\n");
     69  fflush (stderr);
     70  return 0;                     /* NOT REACHED */
    8871}
  • branches/GNU/src/gcc/libf2c/libF77/s_rnge.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    44/* called when a subscript is out of range */
    55
    6 #ifdef KR_headers
    7 extern VOID sig_die();
    8 integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line;
    9 #else
    10 extern VOID sig_die(char*,int);
    11 integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
    12 #endif
     6extern void sig_die (char *, int);
     7integer
     8s_rnge (char *varn, ftnint offset, char *procn, ftnint line)
    139{
    14 register int i;
     10  register int i;
    1511
    16 fprintf(stderr, "Subscript out of range on file line %ld, procedure ",
    17         (long)line);
    18 while((i = *procn) && i != '_' && i != ' ')
    19         putc(*procn++, stderr);
    20 fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ",
    21         (long)offset+1);
    22 while((i = *varn) && i != ' ')
    23         putc(*varn++, stderr);
    24 sig_die(".", 1);
    25 return 0;       /* not reached */
     12  fprintf (stderr, "Subscript out of range on file line %ld, procedure ",
     13           (long) line);
     14  while ((i = *procn) && i != '_' && i != ' ')
     15    putc (*procn++, stderr);
     16  fprintf (stderr, ".\nAttempt to access the %ld-th element of variable ",
     17           (long) offset + 1);
     18  while ((i = *varn) && i != ' ')
     19    putc (*varn++, stderr);
     20  sig_die (".", 1);
     21  return 0;                     /* not reached */
    2622}
  • branches/GNU/src/gcc/libf2c/libF77/s_stop.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    22#include "f2c.h"
    33
    4 #ifdef KR_headers
    5 extern void f_exit();
    6 VOID s_stop(s, n) char *s; ftnlen n;
    7 #else
    84#undef abs
    95#undef min
    106#undef max
    117#include <stdlib.h>
    12 #ifdef __cplusplus
    13 extern "C" {
     8void f_exit (void);
     9
     10int
     11s_stop (char *s, ftnlen n)
     12{
     13  int i;
     14
     15  if (n > 0)
     16    {
     17      fprintf (stderr, "STOP ");
     18      for (i = 0; i < n; ++i)
     19        putc (*s++, stderr);
     20      fprintf (stderr, " statement executed\n");
     21    }
     22#ifdef NO_ONEXIT
     23  f_exit ();
    1424#endif
    15 void f_exit(void);
    16 
    17 int s_stop(char *s, ftnlen n)
    18 #endif
    19 {
    20 int i;
    21 
    22 if(n > 0)
    23         {
    24         fprintf(stderr, "STOP ");
    25         for(i = 0; i<n ; ++i)
    26                 putc(*s++, stderr);
    27         fprintf(stderr, " statement executed\n");
    28         }
    29 #ifdef NO_ONEXIT
    30 f_exit();
    31 #endif
    32 exit(0);
     25  exit (0);
    3326
    3427/* We cannot avoid (useless) compiler diagnostics here:         */
     
    3629/* and others complain that this one cannot be reached.         */
    3730
    38 return 0; /* NOT REACHED */
     31  return 0;                     /* NOT REACHED */
    3932}
    40 #ifdef __cplusplus
    41 }
    42 #endif
  • branches/GNU/src/gcc/libf2c/libF77/setarg.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    22   g77's inlined intrinsic equivalents.  */
    33
    4 #ifndef KR_headers
    5 #undef VOID
    64#include <stdlib.h>
    7 #endif
    8 
    9 #ifndef VOID
    10 #define VOID void
    11 #endif
    125
    136int f__xargc;
    147char **f__xargv;
    158
    16 #ifdef __cplusplus
    17         }
    18 #endif
    19 
    20  void
    21 #ifdef KR_headers
    22 f_setarg(argc, argv) int argc; char **argv;
    23 #else
    24 f_setarg(int argc, char **argv)
    25 #endif
     9void
     10f_setarg (int argc, char **argv)
    2611{
    27 f__xargc = argc;
    28 f__xargv = argv;
     12  f__xargc = argc;
     13  f__xargv = argv;
    2914}
  • branches/GNU/src/gcc/libf2c/libF77/setsig.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1010#endif
    1111
    12 #ifndef KR_headers
    13 #undef VOID
    1412#include <stdlib.h>
    15 #endif
    1613
    17 #ifndef VOID
    18 #define VOID void
    19 #endif
     14extern void sig_die (char *, int);
    2015
    21 #ifdef __cplusplus
    22 extern "C" {
    23 #endif
    24 
    25 #ifdef KR_headers
    26 extern VOID sig_die();
    27 #define Int /* int */
    28 #else
    29 extern void sig_die(char*, int);
    30 #define Int int
    31 #endif
    32 
    33 static VOID sigfdie(Sigarg)
     16static void
     17sigfdie (Sigarg)
    3418{
    35 Use_Sigarg;
    36 sig_die("Floating Exception", 1);
     19  Use_Sigarg;
     20  sig_die ("Floating Exception", 1);
    3721}
    3822
    3923
    40 static VOID sigidie(Sigarg)
     24static void
     25sigidie (Sigarg)
    4126{
    42 Use_Sigarg;
    43 sig_die("IOT Trap", 1);
     27  Use_Sigarg;
     28  sig_die ("IOT Trap", 1);
    4429}
    4530
    4631#ifdef SIGQUIT
    47 static VOID sigqdie(Sigarg)
     32static void
     33sigqdie (Sigarg)
    4834{
    49 Use_Sigarg;
    50 sig_die("Quit signal", 1);
     35  Use_Sigarg;
     36  sig_die ("Quit signal", 1);
    5137}
    5238#endif
    5339
    5440
    55 static VOID sigindie(Sigarg)
     41static void
     42sigindie (Sigarg)
    5643{
    57 Use_Sigarg;
    58 sig_die("Interrupt", 0);
     44  Use_Sigarg;
     45  sig_die ("Interrupt", 0);
    5946}
    6047
    61 static VOID sigtdie(Sigarg)
     48static void
     49sigtdie (Sigarg)
    6250{
    63 Use_Sigarg;
    64 sig_die("Killed", 0);
     51  Use_Sigarg;
     52  sig_die ("Killed", 0);
    6553}
    6654
    6755#ifdef SIGTRAP
    68 static VOID sigtrdie(Sigarg)
     56static void
     57sigtrdie (Sigarg)
    6958{
    70 Use_Sigarg;
    71 sig_die("Trace trap", 1);
     59  Use_Sigarg;
     60  sig_die ("Trace trap", 1);
    7261}
    7362#endif
    7463
    7564
    76 #ifdef __cplusplus
    77         }
    78 #endif
    79 
    80  void
    81 f_setsig()
     65void
     66f_setsig ()
    8267{
    83 signal1(SIGFPE, sigfdie);       /* ignore underflow, enable overflow */
     68  signal1 (SIGFPE, sigfdie);    /* ignore underflow, enable overflow */
    8469#ifdef SIGIOT
    85 signal1(SIGIOT, sigidie);
     70  signal1 (SIGIOT, sigidie);
    8671#endif
    8772#ifdef SIGTRAP
    88 signal1(SIGTRAP, sigtrdie);
     73  signal1 (SIGTRAP, sigtrdie);
    8974#endif
    9075#ifdef SIGQUIT
    91 if(signal1(SIGQUIT,sigqdie) == SIG_IGN)
    92         signal1(SIGQUIT, SIG_IGN);
     76  if (signal1 (SIGQUIT, sigqdie) == SIG_IGN)
     77    signal1 (SIGQUIT, SIG_IGN);
    9378#endif
    94 if(signal1(SIGINT, sigindie) == SIG_IGN)
    95         signal1(SIGINT, SIG_IGN);
    96 signal1(SIGTERM,sigtdie);
     79  if (signal1 (SIGINT, sigindie) == SIG_IGN)
     80    signal1 (SIGINT, SIG_IGN);
     81  signal1 (SIGTERM, sigtdie);
    9782
    9883#ifdef pdp11
    99         ldfps(01200); /* detect overflow as an exception */
     84  ldfps (01200);                /* detect overflow as an exception */
    10085#endif
    10186}
  • branches/GNU/src/gcc/libf2c/libF77/sig_die.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    88#endif
    99
    10 #ifdef KR_headers
    11 void sig_die(s, kill) register char *s; int kill;
    12 #else
    1310#include <stdlib.h>
    14 #ifdef __cplusplus
    15 extern "C" {
     11extern void f_exit (void);
     12
     13void
     14sig_die (register char *s, int kill)
     15{
     16  /* print error message, then clear buffers */
     17  fprintf (stderr, "%s\n", s);
     18
     19  if (kill)
     20    {
     21      fflush (stderr);
     22      f_exit ();
     23      fflush (stderr);
     24      /* now get a core */
     25#ifdef SIGIOT
     26      signal (SIGIOT, SIG_DFL);
    1627#endif
    17  extern void f_exit(void);
    18 
    19 void sig_die(register char *s, int kill)
     28      abort ();
     29    }
     30  else
     31    {
     32#ifdef NO_ONEXIT
     33      f_exit ();
    2034#endif
    21 {
    22         /* print error message, then clear buffers */
    23         fprintf(stderr, "%s\n", s);
    24 
    25         if(kill)
    26                 {
    27                 fflush(stderr);
    28                 f_exit();
    29                 fflush(stderr);
    30                 /* now get a core */
    31 #ifdef SIGIOT
    32                 signal(SIGIOT, SIG_DFL);
    33 #endif
    34                 abort();
    35                 }
    36         else {
    37 #ifdef NO_ONEXIT
    38                 f_exit();
    39 #endif
    40                 exit(1);
    41                 }
    42         }
    43 #ifdef __cplusplus
     35      exit (1);
     36    }
    4437}
    45 #endif
  • branches/GNU/src/gcc/libf2c/libF77/signal1.h0

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    1212#endif
    1313#ifndef Sigarg_t
    14 #ifdef KR_headers
    15 #define Sigarg_t
    16 #else
    1714#define Sigarg_t int
    18 #endif
    19 #endif /*Sigarg_t*/
     15#endif /*Sigarg_t */
    2016
    21 #ifdef USE_SIG_PF       /* compile with -DUSE_SIG_PF under IRIX */
     17#ifdef USE_SIG_PF               /* compile with -DUSE_SIG_PF under IRIX */
    2218#define sig_pf SIG_PF
    2319#else
    24 typedef Sigret_t (*sig_pf)(Sigarg_t);
     20typedef Sigret_t (*sig_pf) (Sigarg_t);
    2521#endif
    2622
    2723#define signal1(a,b) signal(a,(sig_pf)b)
    2824
    29 #ifdef __cplusplus
    30 #define Sigarg ...
    31 #define Use_Sigarg
    32 #else
    33 #define Sigarg Int n
     25#define Sigarg int n
    3426#define Use_Sigarg n = n        /* shut up compiler warning */
    35 #endif
  • branches/GNU/src/gcc/libf2c/libF77/signal_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    22#include "signal1.h"
    33
    4 #ifdef KR_headers
    54void *
    6 G77_signal_0 (sigp, proc) integer *sigp; sig_pf proc;
    7 #else
    8 void *
    9 G77_signal_0 (integer *sigp, sig_pf proc)
    10 #endif
     5G77_signal_0 (integer * sigp, sig_pf proc)
    116{
    12         int sig;
    13         sig = (int)*sigp;
     7  int sig;
     8  sig = (int) *sigp;
    149
    15         return (void *) signal(sig, proc);
    16         }
     10  return (void *) signal (sig, proc);
     11}
  • branches/GNU/src/gcc/libf2c/libF77/system_.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    33#include "f2c.h"
    44
    5 #ifdef KR_headers
    6 extern char *F77_aloc();
    7 
    8  integer
    9 G77_system_0 (s, n) register char *s; ftnlen n;
    10 #else
    115#undef abs
    126#undef min
    137#undef max
    148#include <stdlib.h>
    15 extern char *F77_aloc(ftnlen, char*);
     9extern char *F77_aloc (ftnlen, char *);
    1610
    17  integer
     11integer
    1812G77_system_0 (register char *s, ftnlen n)
    19 #endif
    2013{
    21         char buff0[256], *buff;
    22         register char *bp, *blast;
    23         integer rv;
     14  char buff0[256], *buff;
     15  register char *bp, *blast;
     16  integer rv;
    2417
    25         buff = bp = n < sizeof(buff0)
    26                         ? buff0 : F77_aloc(n+1, "system_");
    27         blast = bp + n;
     18  buff = bp = n < (ftnlen) sizeof (buff0) ? buff0 : F77_aloc (n + 1, "system_");
     19  blast = bp + n;
    2820
    29         while(bp < blast && *s)
    30                 *bp++ = *s++;
    31         *bp = 0;
    32         rv = system(buff);
    33         if (buff != buff0)
    34                 free(buff);
    35         return rv;
    36         }
     21  while (bp < blast && *s)
     22    *bp++ = *s++;
     23  *bp = 0;
     24  rv = system (buff);
     25  if (buff != buff0)
     26    free (buff);
     27  return rv;
     28}
  • branches/GNU/src/gcc/libf2c/libF77/z_abs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double f__cabs();
    5 double z_abs(z) doublecomplex *z;
    6 #else
    7 double f__cabs(double, double);
    8 double z_abs(doublecomplex *z)
    9 #endif
     3double f__cabs (double, double);
     4double
     5z_abs (doublecomplex * z)
    106{
    11 return( f__cabs( z->r, z->i ) );
     7  return (f__cabs (z->r, z->i));
    128}
  • branches/GNU/src/gcc/libf2c/libF77/z_cos.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sin(), cos(), sinh(), cosh();
    5 VOID z_cos(r, z) doublecomplex *r, *z;
    6 #else
    73#undef abs
    84#include "math.h"
    9 void z_cos(doublecomplex *r, doublecomplex *z)
    10 #endif
     5void
     6z_cos (doublecomplex * r, doublecomplex * z)
    117{
    12         double zi = z->i, zr = z->r;
    13         r->r =   cos(zr) * cosh(zi);
    14         r->i = - sin(zr) * sinh(zi);
    15         }
     8  double zi = z->i, zr = z->r;
     9  r->r = cos (zr) * cosh (zi);
     10  r->i = -sin (zr) * sinh (zi);
     11}
  • branches/GNU/src/gcc/libf2c/libF77/z_div.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 extern VOID sig_die();
    5 VOID z_div(c, a, b) doublecomplex *a, *b, *c;
     3extern void sig_die (char *, int);
     4void
     5z_div (doublecomplex * c, doublecomplex * a, doublecomplex * b)
     6{
     7  double ratio, den;
     8  double abr, abi, cr;
     9
     10  if ((abr = b->r) < 0.)
     11    abr = -abr;
     12  if ((abi = b->i) < 0.)
     13    abi = -abi;
     14  if (abr <= abi)
     15    {
     16      if (abi == 0)
     17        {
     18#ifdef IEEE_COMPLEX_DIVIDE
     19          if (a->i != 0 || a->r != 0)
     20            abi = 1.;
     21          c->i = c->r = abi / abr;
     22          return;
    623#else
    7 extern void sig_die(char*, int);
    8 void z_div(doublecomplex *c, doublecomplex *a, doublecomplex *b)
     24          sig_die ("complex division by zero", 1);
    925#endif
    10 {
    11         double ratio, den;
    12         double abr, abi, cr;
     26        }
     27      ratio = b->r / b->i;
     28      den = b->i * (1 + ratio * ratio);
     29      cr = (a->r * ratio + a->i) / den;
     30      c->i = (a->i * ratio - a->r) / den;
     31    }
    1332
    14         if( (abr = b->r) < 0.)
    15                 abr = - abr;
    16         if( (abi = b->i) < 0.)
    17                 abi = - abi;
    18         if( abr <= abi )
    19                 {
    20                 if(abi == 0) {
    21 #ifdef IEEE_COMPLEX_DIVIDE
    22                         if (a->i != 0 || a->r != 0)
    23                                 abi = 1.;
    24                         c->i = c->r = abi / abr;
    25                         return;
    26 #else
    27                         sig_die("complex division by zero", 1);
    28 #endif
    29                         }
    30                 ratio = b->r / b->i ;
    31                 den = b->i * (1 + ratio*ratio);
    32                 cr = (a->r*ratio + a->i) / den;
    33                 c->i = (a->i*ratio - a->r) / den;
    34                 }
    35 
    36         else
    37                 {
    38                 ratio = b->i / b->r ;
    39                 den = b->r * (1 + ratio*ratio);
    40                 cr = (a->r + a->i*ratio) / den;
    41                 c->i = (a->i - a->r*ratio) / den;
    42                 }
    43         c->r = cr;
    44         }
     33  else
     34    {
     35      ratio = b->i / b->r;
     36      den = b->r * (1 + ratio * ratio);
     37      cr = (a->r + a->i * ratio) / den;
     38      c->i = (a->i - a->r * ratio) / den;
     39    }
     40  c->r = cr;
     41}
  • branches/GNU/src/gcc/libf2c/libF77/z_exp.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double exp(), cos(), sin();
    5 VOID z_exp(r, z) doublecomplex *r, *z;
    6 #else
    73#undef abs
    84#include "math.h"
    9 void z_exp(doublecomplex *r, doublecomplex *z)
    10 #endif
     5void
     6z_exp (doublecomplex * r, doublecomplex * z)
    117{
    12         double expx, zi = z->i;
     8  double expx, zi = z->i;
    139
    14         expx = exp(z->r);
    15         r->r = expx * cos(zi);
    16         r->i = expx * sin(zi);
    17         }
     10  expx = exp (z->r);
     11  r->r = expx * cos (zi);
     12  r->i = expx * sin (zi);
     13}
  • branches/GNU/src/gcc/libf2c/libF77/z_log.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double log(), f__cabs(), atan2();
    5 VOID z_log(r, z) doublecomplex *r, *z;
    6 #else
    73#undef abs
    84#include "math.h"
    9 extern double f__cabs(double, double);
    10 void z_log(doublecomplex *r, doublecomplex *z)
    11 #endif
     5extern double f__cabs (double, double);
     6void
     7z_log (doublecomplex * r, doublecomplex * z)
    128{
    13         double s, s0, t, t2, u, v;
    14         double zi = z->i, zr = z->r;
     9  double s, s0, t, t2, u, v;
     10  double zi = z->i, zr = z->r;
    1511
    16         r->i = atan2(zi, zr);
     12  r->i = atan2 (zi, zr);
    1713#ifdef Pre20000310
    18         r->r = log( f__cabs( zr, zi ) );
     14  r->r = log (f__cabs (zr, zi));
    1915#else
    20         if (zi < 0)
    21                 zi = -zi;
    22         if (zr < 0)
    23                 zr = -zr;
    24         if (zr < zi) {
    25                 t = zi;
    26                 zi = zr;
    27                 zr = t;
    28                 }
    29         t = zi/zr;
    30         s = zr * sqrt(1 + t*t);
    31         /* now s = f__cabs(zi,zr), and zr = |zr| >= |zi| = zi */
    32         if ((t = s - 1) < 0)
    33                 t = -t;
    34         if (t > .01)
    35                 r->r = log(s);
    36         else {
     16  if (zi < 0)
     17    zi = -zi;
     18  if (zr < 0)
     19    zr = -zr;
     20  if (zr < zi)
     21    {
     22      t = zi;
     23      zi = zr;
     24      zr = t;
     25    }
     26  t = zi / zr;
     27  s = zr * sqrt (1 + t * t);
     28  /* now s = f__cabs(zi,zr), and zr = |zr| >= |zi| = zi */
     29  if ((t = s - 1) < 0)
     30    t = -t;
     31  if (t > .01)
     32    r->r = log (s);
     33  else
     34    {
    3735
    3836#ifdef Comment
    3937
    40         log(1+x) = x - x^2/2 + x^3/3 - x^4/4 + - ...
    41 
    42                  = x(1 - x/2 + x^2/3 -+...)
    43 
    44         [sqrt(y^2 + z^2) - 1] * [sqrt(y^2 + z^2) + 1] = y^2 + z^2 - 1, so
    45 
    46         sqrt(y^2 + z^2) - 1 = (y^2 + z^2 - 1) / [sqrt(y^2 + z^2) + 1]
    47 
    48 #endif /*Comment*/
    49 
    50                 t = ((zr*zr - 1.) + zi*zi) / (s + 1);
    51                 t2 = t*t;
    52                 s = 1. - 0.5*t;
    53                 u = v = 1;
    54                 do {
    55                         s0 = s;
    56                         u *= t2;
    57                         v += 2;
    58                         s += u/v - t*u/(v+1);
    59                         } while(s > s0);
    60                 r->r = s*t;
    61                 }
     38      log (1 + x) = x - x ^ 2 / 2 + x ^ 3 / 3 - x ^ 4 / 4 + -...
     39        = x (1 - x / 2 + x ^ 2 / 3 - +...)
     40        [sqrt (y ^ 2 + z ^ 2) - 1] *[sqrt (y ^ 2 + z ^ 2) + 1] =
     41        y ^ 2 + z ^ 2 - 1, so sqrt (y ^ 2 + z ^ 2) - 1 =
     42        (y ^ 2 + z ^ 2 - 1) /[sqrt (y ^ 2 + z ^ 2) + 1]
     43#endif /*Comment */
     44        t = ((zr * zr - 1.) + zi * zi) / (s + 1);
     45      t2 = t * t;
     46      s = 1. - 0.5 * t;
     47      u = v = 1;
     48      do
     49        {
     50          s0 = s;
     51          u *= t2;
     52          v += 2;
     53          s += u / v - t * u / (v + 1);
     54        }
     55      while (s > s0);
     56      r->r = s * t;
     57    }
    6258#endif
    63         }
     59}
  • branches/GNU/src/gcc/libf2c/libF77/z_sin.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sin(), cos(), sinh(), cosh();
    5 VOID z_sin(r, z) doublecomplex *r, *z;
    6 #else
    73#undef abs
    84#include "math.h"
    9 void z_sin(doublecomplex *r, doublecomplex *z)
    10 #endif
     5void
     6z_sin (doublecomplex * r, doublecomplex * z)
    117{
    12         double zi = z->i, zr = z->r;
    13         r->r = sin(zr) * cosh(zi);
    14         r->i = cos(zr) * sinh(zi);
    15         }
     8  double zi = z->i, zr = z->r;
     9  r->r = sin (zr) * cosh (zi);
     10  r->i = cos (zr) * sinh (zi);
     11}
  • branches/GNU/src/gcc/libf2c/libF77/z_sqrt.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11#include "f2c.h"
    22
    3 #ifdef KR_headers
    4 double sqrt(), f__cabs();
    5 VOID z_sqrt(r, z) doublecomplex *r, *z;
    6 #else
    73#undef abs
    84#include "math.h"
    9 extern double f__cabs(double, double);
    10 void z_sqrt(doublecomplex *r, doublecomplex *z)
    11 #endif
     5extern double f__cabs (double, double);
     6void
     7z_sqrt (doublecomplex * r, doublecomplex * z)
    128{
    13         double mag, zi = z->i, zr = z->r;
     9  double mag, zi = z->i, zr = z->r;
    1410
    15         if( (mag = f__cabs(zr, zi)) == 0.)
    16                 r->r = r->i = 0.;
    17         else if(zr > 0)
    18                 {
    19                 r->r = sqrt(0.5 * (mag + zr) );
    20                 r->i = zi / r->r / 2;
    21                 }
    22         else
    23                 {
    24                 r->i = sqrt(0.5 * (mag - zr) );
    25                 if(zi < 0)
    26                         r->i = - r->i;
    27                 r->r = zi / r->i / 2;
    28                 }
    29         }
     11  if ((mag = f__cabs (zr, zi)) == 0.)
     12    r->r = r->i = 0.;
     13  else if (zr > 0)
     14    {
     15      r->r = sqrt (0.5 * (mag + zr));
     16      r->i = zi / r->r / 2;
     17    }
     18  else
     19    {
     20      r->i = sqrt (0.5 * (mag - zr));
     21      if (zi < 0)
     22        r->i = -r->i;
     23      r->r = zi / r->i / 2;
     24    }
     25}
Note: See TracChangeset for help on using the changeset viewer.