Changeset 1391 for branches/GNU/src/gcc/libf2c/libF77
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (21 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 130 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 dir.info 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libf2c/libF77/F77_aloc.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 7 7 static integer memfailure = 3; 8 8 9 #ifdef KR_headers 10 extern char *malloc(); 11 extern void G77_exit_0 (); 9 #include <stdlib.h> 10 extern void G77_exit_0 (integer *); 12 11 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 12 char * 13 F77_aloc (integer Len, char *whence) 14 { 15 char *rv; 16 unsigned int uLen = (unsigned int) Len; /* for K&R C */ 24 17 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/Makefile.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 42 42 @SET_MAKE@ 43 43 44 SHELL = /bin/sh44 SHELL = @SHELL@ 45 45 46 46 #### End of system configuration section. #### 47 47 48 ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR) -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $( CFLAGS)48 ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_DIR) -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(WARN_CFLAGS) $(CFLAGS) 49 49 50 50 .SUFFIXES: -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/Version.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.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)"; 1 const char __LIBF77_VERSION__[] = "@(#) LIBF77 VERSION 20000929\n"; 2 extern const char __LIBI77_VERSION__[]; 3 extern const char __LIBU77_VERSION__[]; 7 4 8 5 /* … … 88 85 g77__fvers__ () 89 86 { 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); 92 94 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/abort_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 2 2 #include "f2c.h" 3 3 4 #ifdef KR_headers 5 extern VOID sig_die(); 4 extern void sig_die (char *, int); 6 5 7 int G77_abort_0 () 8 #else 9 extern void sig_die(char*,int); 10 11 int G77_abort_0 (void) 12 #endif 6 int 7 G77_abort_0 (void) 13 8 { 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 */ 16 11 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/c_abs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 extern double f__cabs(); 3 extern double f__cabs (double, double); 5 4 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 5 double 6 c_abs (complex * z) 12 7 { 13 return( f__cabs( z->r, z->i ));8 return (f__cabs (z->r, z->i)); 14 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/c_cos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 extern double sin(), cos(), sinh(), cosh();5 6 VOID c_cos(r, z) complex *r, *z;7 #else8 3 #undef abs 9 4 #include "math.h" 10 5 11 void c_cos(complex *r, complex *z)12 #endif 6 void 7 c_cos (complex * r, complex * z) 13 8 { 14 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/c_div.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 extern VOID sig_die(); 5 VOID c_div(c, a, b) 6 complex *a, *b, *c; 3 extern void sig_die (char *, int); 4 void 5 c_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; 7 25 #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); 10 27 #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 } 14 34 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/c_exp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 extern double exp(), cos(), sin();5 6 VOID c_exp(r, z) complex *r, *z;7 #else8 3 #undef abs 9 4 #include "math.h" 10 5 11 void c_exp(complex *r, complex *z)12 #endif 6 void 7 c_exp (complex * r, complex * z) 13 8 { 14 9 double expx, zi = z->i; 15 10 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/c_log.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 extern double log(), f__cabs(), atan2();5 VOID c_log(r, z) complex *r, *z;6 #else7 3 #undef abs 8 4 #include "math.h" 9 extern double f__cabs (double, double);5 extern double f__cabs (double, double); 10 6 11 void c_log(complex *r, complex *z)12 #endif 7 void 8 c_log (complex * r, complex * z) 13 9 { 14 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/c_sin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 extern double sin(), cos(), sinh(), cosh();5 6 VOID c_sin(r, z) complex *r, *z;7 #else8 3 #undef abs 9 4 #include "math.h" 10 5 11 void c_sin(complex *r, complex *z)12 #endif 6 void 7 c_sin (complex * r, complex * z) 13 8 { 14 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/c_sqrt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 extern double sqrt(), f__cabs();5 6 VOID c_sqrt(r, z) complex *r, *z;7 #else8 3 #undef abs 9 4 #include "math.h" 10 extern double f__cabs (double, double);5 extern double f__cabs (double, double); 11 6 12 void c_sqrt(complex *r, complex *z)13 #endif 7 void 8 c_sqrt (complex * r, complex * z) 14 9 { 15 16 10 double mag, t; 11 double zi = z->i, zr = z->r; 17 12 18 if( (mag = f__cabs(zr, zi)) == 0.)19 20 else if(zr > 0)21 22 r->r = t = sqrt(0.5 * (mag + zr));23 24 25 26 27 28 t = sqrt(0.5 * (mag - zr));29 if(zi < 0)30 31 32 33 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/cabs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 #ifdef KR_headers2 extern double sqrt();3 double f__cabs(real, imag) double real, imag;4 #else5 1 #undef abs 6 2 #include <math.h> 7 double f__cabs(double real, double imag)8 #endif 3 double 4 f__cabs (double real, double imag) 9 5 { 10 double temp;6 double temp; 11 7 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); 20 24 } 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/configure
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 29 29 silent= 30 30 site= 31 sitefile=32 31 srcdir= 33 32 target=NONE … … 144 143 --no-create do not create output files 145 144 --quiet, --silent do not print \`checking...' messages 146 --site-file=FILE use FILE as the site file147 145 --version print the version of autoconf that created configure 148 146 Directory and file names: … … 315 313 site="$ac_optarg" ;; 316 314 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 322 315 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 323 316 ac_prev=srcdir ;; … … 485 478 486 479 # 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 480 if 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" 494 485 fi 495 else496 CONFIG_SITE="$sitefile"497 486 fi 498 487 for ac_site_file in $CONFIG_SITE; do … … 542 531 set dummy gcc; ac_word=$2 543 532 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 544 echo "configure:5 45: checking for $ac_word" >&5533 echo "configure:534: checking for $ac_word" >&5 545 534 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 546 535 echo $ac_n "(cached) $ac_c" 1>&6 … … 572 561 set dummy cc; ac_word=$2 573 562 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 574 echo "configure:5 75: checking for $ac_word" >&5563 echo "configure:564: checking for $ac_word" >&5 575 564 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 576 565 echo $ac_n "(cached) $ac_c" 1>&6 … … 623 612 set dummy cl; ac_word=$2 624 613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 625 echo "configure:6 26: checking for $ac_word" >&5614 echo "configure:615: checking for $ac_word" >&5 626 615 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 627 616 echo $ac_n "(cached) $ac_c" 1>&6 … … 656 645 657 646 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 658 echo "configure:6 59: checking whether we are using GNU C" >&5647 echo "configure:648: checking whether we are using GNU C" >&5 659 648 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 660 649 echo $ac_n "(cached) $ac_c" 1>&6 … … 665 654 #endif 666 655 EOF 667 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:6 68: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then656 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 668 657 ac_cv_prog_gcc=yes 669 658 else … … 684 673 CFLAGS= 685 674 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 686 echo "configure:6 87: checking whether ${CC-cc} accepts -g" >&5675 echo "configure:676: checking whether ${CC-cc} accepts -g" >&5 687 676 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 688 677 echo $ac_n "(cached) $ac_c" 1>&6 … … 727 716 set dummy ranlib; ac_word=$2 728 717 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 729 echo "configure:7 30: checking for $ac_word" >&5718 echo "configure:719: checking for $ac_word" >&5 730 719 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 731 720 echo $ac_n "(cached) $ac_c" 1>&6 … … 756 745 fi 757 746 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 758 echo "configure:7 59: checking whether ${MAKE-make} sets \${MAKE}" >&5747 echo "configure:748: checking whether ${MAKE-make} sets \${MAKE}" >&5 759 748 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 760 749 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then … … 786 775 # Sanity check for the cross-compilation case: 787 776 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 788 echo "configure:7 89: checking how to run the C preprocessor" >&5777 echo "configure:778: checking how to run the C preprocessor" >&5 789 778 # On Suns, sometimes $CPP names a directory. 790 779 if test -n "$CPP" && test -d "$CPP"; then … … 801 790 # not just through cpp. 802 791 cat > conftest.$ac_ext <<EOF 803 #line 804"configure"792 #line 793 "configure" 804 793 #include "confdefs.h" 805 794 #include <assert.h> … … 807 796 EOF 808 797 ac_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; } 810 799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 811 800 if test -z "$ac_err"; then … … 818 807 CPP="${CC-cc} -E -traditional-cpp" 819 808 cat > conftest.$ac_ext <<EOF 820 #line 8 21"configure"809 #line 810 "configure" 821 810 #include "confdefs.h" 822 811 #include <assert.h> … … 824 813 EOF 825 814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 826 { (eval echo configure:8 27: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }815 { (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 827 816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 828 817 if test -z "$ac_err"; then … … 835 824 CPP="${CC-cc} -nologo -E" 836 825 cat > conftest.$ac_ext <<EOF 837 #line 8 38"configure"826 #line 827 "configure" 838 827 #include "confdefs.h" 839 828 #include <assert.h> … … 841 830 EOF 842 831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 843 { (eval echo configure:8 44: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }832 { (eval echo configure:833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 844 833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 845 834 if test -z "$ac_err"; then … … 867 856 ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'` 868 857 echo $ac_n "checking for stdio.h""... $ac_c" 1>&6 869 echo "configure:8 70: checking for stdio.h" >&5858 echo "configure:859: checking for stdio.h" >&5 870 859 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 871 860 echo $ac_n "(cached) $ac_c" 1>&6 872 861 else 873 862 cat > conftest.$ac_ext <<EOF 874 #line 8 75"configure"863 #line 864 "configure" 875 864 #include "confdefs.h" 876 865 #include <stdio.h> 877 866 EOF 878 867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 879 { (eval echo configure:8 80: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }868 { (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 880 869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 881 870 if test -z "$ac_err"; then … … 905 894 906 895 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 907 echo "configure: 908: checking for ANSI C header files" >&5896 echo "configure:897: checking for ANSI C header files" >&5 908 897 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 909 898 echo $ac_n "(cached) $ac_c" 1>&6 910 899 else 911 900 cat > conftest.$ac_ext <<EOF 912 #line 9 13"configure"901 #line 902 "configure" 913 902 #include "confdefs.h" 914 903 #include <stdlib.h> … … 918 907 EOF 919 908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 920 { (eval echo configure:9 21: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }909 { (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 921 910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 922 911 if test -z "$ac_err"; then … … 935 924 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 936 925 cat > conftest.$ac_ext <<EOF 937 #line 9 38"configure"926 #line 927 "configure" 938 927 #include "confdefs.h" 939 928 #include <string.h> … … 953 942 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 954 943 cat > conftest.$ac_ext <<EOF 955 #line 9 56"configure"944 #line 945 "configure" 956 945 #include "confdefs.h" 957 946 #include <stdlib.h> … … 974 963 else 975 964 cat > conftest.$ac_ext <<EOF 976 #line 9 77"configure"965 #line 966 "configure" 977 966 #include "confdefs.h" 978 967 #include <ctype.h> … … 985 974 986 975 EOF 987 if { (eval echo configure:9 88: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null976 if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 988 977 then 989 978 : … … 1008 997 fi 1009 998 1010 1011 999 echo $ac_n "checking for posix""... $ac_c" 1>&6 1012 echo "configure:10 13: checking for posix" >&51000 echo "configure:1001: checking for posix" >&5 1013 1001 if eval "test \"`echo '$''{'g77_cv_header_posix'+set}'`\" = set"; then 1014 1002 echo $ac_n "(cached) $ac_c" 1>&6 1015 1003 else 1016 1004 cat > conftest.$ac_ext <<EOF 1017 #line 10 18"configure"1005 #line 1006 "configure" 1018 1006 #include "confdefs.h" 1019 1007 #include <sys/types.h> … … 1041 1029 # header isn't actually like checking the functions, though... 1042 1030 echo $ac_n "checking for GNU library""... $ac_c" 1>&6 1043 echo "configure:10 44: checking for GNU library" >&51031 echo "configure:1032: checking for GNU library" >&5 1044 1032 if eval "test \"`echo '$''{'g77_cv_lib_gnu'+set}'`\" = set"; then 1045 1033 echo $ac_n "(cached) $ac_c" 1>&6 1046 1034 else 1047 1035 cat > conftest.$ac_ext <<EOF 1048 #line 10 49"configure"1036 #line 1037 "configure" 1049 1037 #include "confdefs.h" 1050 1038 #include <stdio.h> … … 1069 1057 1070 1058 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 1071 echo "configure:10 72: checking return type of signal handlers" >&51059 echo "configure:1060: checking return type of signal handlers" >&5 1072 1060 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then 1073 1061 echo $ac_n "(cached) $ac_c" 1>&6 1074 1062 else 1075 1063 cat > conftest.$ac_ext <<EOF 1076 #line 10 77"configure"1064 #line 1065 "configure" 1077 1065 #include "confdefs.h" 1078 1066 #include <sys/types.h> … … 1091 1079 ; return 0; } 1092 1080 EOF 1093 if { (eval echo configure:10 94: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1081 if { (eval echo configure:1082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1094 1082 rm -rf conftest* 1095 1083 ac_cv_type_signal=void … … 1112 1100 if test $ac_cv_header_stdc != yes; then 1113 1101 echo $ac_n "checking for atexit""... $ac_c" 1>&6 1114 echo "configure:11 15: checking for atexit" >&51102 echo "configure:1103: checking for atexit" >&5 1115 1103 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then 1116 1104 echo $ac_n "(cached) $ac_c" 1>&6 1117 1105 else 1118 1106 cat > conftest.$ac_ext <<EOF 1119 #line 11 20"configure"1107 #line 1108 "configure" 1120 1108 #include "confdefs.h" 1121 1109 /* System header to define __stub macros and hopefully few prototypes, … … 1140 1128 ; return 0; } 1141 1129 EOF 1142 if { (eval echo configure:11 43: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1130 if { (eval echo configure:1131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1143 1131 rm -rf conftest* 1144 1132 eval "ac_cv_func_atexit=yes" … … 1165 1153 1166 1154 echo $ac_n "checking for onexit""... $ac_c" 1>&6 1167 echo "configure:11 68: checking for onexit" >&51155 echo "configure:1156: checking for onexit" >&5 1168 1156 if eval "test \"`echo '$''{'ac_cv_func_onexit'+set}'`\" = set"; then 1169 1157 echo $ac_n "(cached) $ac_c" 1>&6 1170 1158 else 1171 1159 cat > conftest.$ac_ext <<EOF 1172 #line 11 73"configure"1160 #line 1161 "configure" 1173 1161 #include "confdefs.h" 1174 1162 /* System header to define __stub macros and hopefully few prototypes, … … 1193 1181 ; return 0; } 1194 1182 EOF 1195 if { (eval echo configure:11 96: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1183 if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1196 1184 rm -rf conftest* 1197 1185 eval "ac_cv_func_onexit=yes" … … 1211 1199 echo "$ac_t""no" 1>&6 1212 1200 echo $ac_n "checking for on_exit""... $ac_c" 1>&6 1213 echo "configure:12 14: checking for on_exit" >&51201 echo "configure:1202: checking for on_exit" >&5 1214 1202 if eval "test \"`echo '$''{'ac_cv_func_on_exit'+set}'`\" = set"; then 1215 1203 echo $ac_n "(cached) $ac_c" 1>&6 1216 1204 else 1217 1205 cat > conftest.$ac_ext <<EOF 1218 #line 12 19"configure"1206 #line 1207 "configure" 1219 1207 #include "confdefs.h" 1220 1208 /* System header to define __stub macros and hopefully few prototypes, … … 1239 1227 ; return 0; } 1240 1228 EOF 1241 if { (eval echo configure:12 42: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1229 if { (eval echo configure:1230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1242 1230 rm -rf conftest* 1243 1231 eval "ac_cv_func_on_exit=yes" … … 1269 1257 1270 1258 echo $ac_n "checking for drem in -lm""... $ac_c" 1>&6 1271 echo "configure:12 72: checking for drem in -lm" >&51259 echo "configure:1260: checking for drem in -lm" >&5 1272 1260 ac_lib_var=`echo m'_'drem | sed 'y%./+-%__p_%'` 1273 1261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then … … 1277 1265 LIBS="-lm $LIBS" 1278 1266 cat > conftest.$ac_ext <<EOF 1279 #line 12 80"configure"1267 #line 1268 "configure" 1280 1268 #include "confdefs.h" 1281 1269 /* Override any gcc2 internal prototype to avoid an error. */ … … 1288 1276 ; return 0; } 1289 1277 EOF 1290 if { (eval echo configure:12 91: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1278 if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1291 1279 rm -rf conftest* 1292 1280 eval "ac_cv_lib_$ac_lib_var=yes" -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/configure.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 57 57 58 58 AC_HEADER_STDC 59 dnl We could do this if we didn't know we were using gcc60 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 body64 dnl [return 0;} int foo (int * bar) {],65 dnl g77_cv_sys_proto=yes,66 dnl [g77_cv_sys_proto=no67 dnl AC_DEFINE(KR_headers)])])68 dnl AC_MSG_RESULT($g77_cv_sys_proto)69 70 59 AC_MSG_CHECKING(for posix) 71 60 AC_CACHE_VAL(g77_cv_header_posix, -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_abs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 double d_abs(x) doublereal *x; 5 #else 6 double d_abs(doublereal *x) 7 #endif 3 double 4 d_abs (doublereal * x) 8 5 { 9 if(*x >= 0)10 return(*x);11 return(-*x);6 if (*x >= 0) 7 return (*x); 8 return (-*x); 12 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_acos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double acos();5 double d_acos(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_acos(doublereal *x)10 #endif 5 double 6 d_acos (doublereal * x) 11 7 { 12 return( acos(*x));8 return (acos (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_asin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double asin();5 double d_asin(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_asin(doublereal *x)10 #endif 5 double 6 d_asin (doublereal * x) 11 7 { 12 return( asin(*x));8 return (asin (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_atan.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double atan();5 double d_atan(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_atan(doublereal *x)10 #endif 5 double 6 d_atan (doublereal * x) 11 7 { 12 return( atan(*x));8 return (atan (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_atn2.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double atan2();5 double d_atn2(x,y) doublereal *x, *y;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_atn2(doublereal *x, doublereal *y)10 #endif 5 double 6 d_atn2 (doublereal * x, doublereal * y) 11 7 { 12 return( atan2(*x,*y));8 return (atan2 (*x, *y)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_cnjg.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 void 4 d_cnjg (doublecomplex * r, doublecomplex * z) 9 5 { 10 11 12 13 6 doublereal zi = z->i; 7 r->r = z->r; 8 r->i = -zi; 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_cos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double cos();5 double d_cos(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_cos(doublereal *x)10 #endif 5 double 6 d_cos (doublereal * x) 11 7 { 12 return( cos(*x));8 return (cos (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_cosh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double cosh();5 double d_cosh(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_cosh(doublereal *x)10 #endif 5 double 6 d_cosh (doublereal * x) 11 7 { 12 return( cosh(*x));8 return (cosh (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_dim.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 double 4 d_dim (doublereal * a, doublereal * b) 8 5 { 9 return(*a > *b ? *a - *b : 0);6 return (*a > *b ? *a - *b : 0); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_exp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double exp();5 double d_exp(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_exp(doublereal *x)10 #endif 5 double 6 d_exp (doublereal * x) 11 7 { 12 return( exp(*x));8 return (exp (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_imag.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 double d_imag(z) doublecomplex *z; 5 #else 6 double d_imag(doublecomplex *z) 7 #endif 3 double 4 d_imag (doublecomplex * z) 8 5 { 9 return(z->i);6 return (z->i); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_int.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double floor();5 double d_int(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_int(doublereal *x)10 #endif 5 double 6 d_int (doublereal * x) 11 7 { 12 return( (*x>0) ? floor(*x) : -floor(- *x));8 return ((*x > 0) ? floor (*x) : -floor (-*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_lg10.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 3 3 #define log10e 0.43429448190325182765 4 4 5 #ifdef KR_headers6 double log();7 double d_lg10(x) doublereal *x;8 #else9 5 #undef abs 10 6 #include <math.h> 11 double d_lg10(doublereal *x)12 #endif 7 double 8 d_lg10 (doublereal * x) 13 9 { 14 return( log10e * log(*x));10 return (log10e * log (*x)); 15 11 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_log.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double log();5 double d_log(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_log(doublereal *x)10 #endif 5 double 6 d_log (doublereal * x) 11 7 { 12 return( log(*x));8 return (log (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_mod.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 3 #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); 4 double drem (double, double); 13 5 #else 14 6 #undef abs 15 7 #include <math.h> 16 8 #endif 17 double d_mod(doublereal *x, doublereal *y)18 #endif 9 double 10 d_mod (doublereal * x, doublereal * y) 19 11 { 20 12 #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; 32 25 #else 33 34 if((quotient = *x / *y) >= 0)35 quotient = floor(quotient);36 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); 39 32 #endif 40 33 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_nint.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double floor();5 double d_nint(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_nint(doublereal *x)10 #endif 5 double 6 d_nint (doublereal * x) 11 7 { 12 return( (*x)>=0 ? 13 floor(*x + .5) : -floor(.5 - *x) ); 8 return ((*x) >= 0 ? floor (*x + .5) : -floor (.5 - *x)); 14 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_prod.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 double 4 d_prod (real * x, real * y) 8 5 { 9 return( (*x) * (*y));6 return ((*x) * (*y)); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_sign.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 double 4 d_sign (doublereal * a, doublereal * b) 8 5 { 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); 12 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_sin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sin();5 double d_sin(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_sin(doublereal *x)10 #endif 5 double 6 d_sin (doublereal * x) 11 7 { 12 return( sin(*x));8 return (sin (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_sinh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sinh();5 double d_sinh(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_sinh(doublereal *x)10 #endif 5 double 6 d_sinh (doublereal * x) 11 7 { 12 return( sinh(*x));8 return (sinh (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_sqrt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sqrt();5 double d_sqrt(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_sqrt(doublereal *x)10 #endif 5 double 6 d_sqrt (doublereal * x) 11 7 { 12 return( sqrt(*x));8 return (sqrt (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_tan.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double tan();5 double d_tan(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_tan(doublereal *x)10 #endif 5 double 6 d_tan (doublereal * x) 11 7 { 12 return( tan(*x));8 return (tan (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/d_tanh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double tanh();5 double d_tanh(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double d_tanh(doublereal *x)10 #endif 5 double 6 d_tanh (doublereal * x) 11 7 { 12 return( tanh(*x));8 return (tanh (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/derf_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern double erf (double); 4 double 5 G77_derf_0 (doublereal * x) 10 6 { 11 return( erf(*x));7 return (erf (*x)); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/derfc_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 extern double erfc(); 3 extern double erfc (double); 5 4 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 5 double 6 G77_derfc_0 (doublereal * x) 12 7 { 13 return( erfc(*x));8 return (erfc (*x)); 14 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/dtime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 24 24 #endif 25 25 26 double 27 #ifdef KR_headers 28 dtime_(tarray) float *tarray; 29 #else 30 dtime_(float *tarray) 31 #endif 26 double 27 dtime_ (float *tarray) 32 28 { 33 29 #ifdef USE_CLOCK … … 35 31 #define CLOCKS_PER_SECOND Hz 36 32 #endif 37 38 double t = clock();39 40 41 42 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]; 43 39 #else 44 45 40 struct tms t; 41 static struct tms t0; 46 42 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 51 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]; 52 48 #endif 53 49 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/ef1asc_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 7 7 #define EVEN(x) ( ( (x)+ M) & (~M) ) 8 8 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 9 extern void s_copy (char *, char *, ftnlen, ftnlen); 10 int 11 G77_ef1asc_0 (ftnint * a, ftnlen * la, ftnint * b, ftnlen * lb) 16 12 { 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 */ 19 15 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/ef1cmc_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 3 3 #include "f2c.h" 4 4 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 5 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 6 integer 7 G77_ef1cmc_0 (ftnint * a, ftnlen * la, ftnint * b, ftnlen * lb) 12 8 { 13 return( s_cmp( (char *)a, (char *)b, *la, *lb));9 return (s_cmp ((char *) a, (char *) b, *la, *lb)); 14 10 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/erf_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern double erf (double); 4 double 5 G77_erf_0 (real * x) 10 6 { 11 return( erf(*x));7 return (erf (*x)); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/erfc_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern double erfc (double); 4 double 5 G77_erfc_0 (real * x) 10 6 { 11 return( erfc(*x));7 return (erfc (*x)); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/etime_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 24 24 #endif 25 25 26 double 27 #ifdef KR_headers 28 etime_(tarray) float *tarray; 29 #else 30 etime_(float *tarray) 31 #endif 26 double 27 etime_ (float *tarray) 32 28 { 33 29 #ifdef USE_CLOCK … … 35 31 #define CLOCKS_PER_SECOND Hz 36 32 #endif 37 double t = clock();38 39 33 double t = clock (); 34 tarray[1] = 0; 35 return tarray[0] = t / CLOCKS_PER_SECOND; 40 36 #else 41 37 struct tms t; 42 38 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); 46 42 #endif 47 43 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/exit_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 13 13 #undef min 14 14 #undef max 15 #ifndef KR_headers16 15 #include <stdlib.h> 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 extern void f_exit(void); 21 #endif 16 extern void f_exit (void); 22 17 23 void 24 #ifdef KR_headers 25 G77_exit_0 (rc) integer *rc; 26 #else 27 G77_exit_0 (integer *rc) 28 #endif 18 void 19 G77_exit_0 (integer * rc) 29 20 { 30 21 #ifdef NO_ONEXIT 31 f_exit();22 f_exit (); 32 23 #endif 33 exit(*rc); 34 } 35 #ifdef __cplusplus 24 exit (*rc); 36 25 } 37 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/f2ch.add
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 3 3 4 4 #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 } 5 extern "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 } 162 163 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/getarg_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 7 7 */ 8 8 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 9 void 10 G77_getarg_0 (ftnint * n, register char *s, ftnlen ls) 14 11 { 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; 19 16 20 if(*n>=0 && *n<f__xargc)21 22 else23 24 for(i = 0; i<ls && *t!='\0'; ++i)25 26 for( ; i<ls; ++i)27 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++ = ' '; 28 25 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/getenv_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 #undef abs 3 #ifdef KR_headers4 extern char *F77_aloc(), *getenv();5 #else6 3 #include <stdlib.h> 7 4 #include <string.h> 8 extern char *F77_aloc(ftnlen, char*); 9 #endif 5 extern char *F77_aloc (ftnlen, char *); 10 6 11 7 /* … … 21 17 */ 22 18 23 #ifdef KR_headers 24 VOID 25 G77_getenv_0 (fname, value, flen, vlen) char *value, *fname; ftnlen vlen, flen; 26 #else 27 void 19 void 28 20 G77_getenv_0 (char *fname, char *value, ftnlen flen, ftnlen vlen) 29 #endif30 21 { 31 32 22 char buf[256], *ep, *fp; 23 integer i; 33 24 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; 56 34 } 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); 42 have_ep: 43 if (ep) 44 while (*ep && vlen-- > 0) 45 *value++ = *ep++; 46 add_blanks: 47 while (vlen-- > 0) 48 *value++ = ' '; 49 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/h_abs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 shortint h_abs(x) shortint *x; 5 #else 6 shortint h_abs(shortint *x) 7 #endif 3 shortint 4 h_abs (shortint * x) 8 5 { 9 if(*x >= 0)10 return(*x);11 return(-*x);6 if (*x >= 0) 7 return (*x); 8 return (-*x); 12 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/h_dim.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 shortint 4 h_dim (shortint * a, shortint * b) 8 5 { 9 return(*a > *b ? *a - *b : 0);6 return (*a > *b ? *a - *b : 0); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/h_dnnt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double floor();5 shortint h_dnnt(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 shortint h_dnnt(doublereal *x)10 #endif 5 shortint 6 h_dnnt (doublereal * x) 11 7 { 12 return (shortint)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));8 return (shortint) (*x >= 0. ? floor (*x + .5) : -floor (.5 - *x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/h_indx.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 shortint 4 h_indx (char *a, char *b, ftnlen la, ftnlen lb) 8 5 { 9 ftnlen i, n;10 char *s, *t, *bend;6 ftnlen i, n; 7 char *s, *t, *bend; 11 8 12 n = la - lb + 1;13 bend = b + lb;9 n = la - lb + 1; 10 bend = b + lb; 14 11 15 for(i = 0 ; i < n; ++i)16 17 18 19 while(t < bend)20 if(*s++ != *t++)21 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); 26 23 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/h_len.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 shortint 4 h_len (char *s __attribute__ ((__unused__)), ftnlen n) 8 5 { 9 return(n);6 return (n); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/h_mod.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 shortint 4 h_mod (short *a, short *b) 8 5 { 9 return(*a % *b);6 return (*a % *b); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/h_nint.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double floor();5 shortint h_nint(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 shortint h_nint(real *x)10 #endif 5 shortint 6 h_nint (real * x) 11 7 { 12 return (shortint)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));8 return (shortint) (*x >= 0 ? floor (*x + .5) : -floor (.5 - *x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/h_sign.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 shortint 4 h_sign (shortint * a, shortint * b) 8 5 { 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); 12 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/hl_ge.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 4 shortlogical 5 hl_ge (char *a, char *b, ftnlen la, ftnlen lb) 10 6 { 11 return(s_cmp(a,b,la,lb) >= 0);7 return (s_cmp (a, b, la, lb) >= 0); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/hl_gt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 4 shortlogical 5 hl_gt (char *a, char *b, ftnlen la, ftnlen lb) 10 6 { 11 return(s_cmp(a,b,la,lb) > 0);7 return (s_cmp (a, b, la, lb) > 0); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/hl_le.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 4 shortlogical 5 hl_le (char *a, char *b, ftnlen la, ftnlen lb) 10 6 { 11 return(s_cmp(a,b,la,lb) <= 0);7 return (s_cmp (a, b, la, lb) <= 0); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/hl_lt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 4 shortlogical 5 hl_lt (char *a, char *b, ftnlen la, ftnlen lb) 10 6 { 11 return(s_cmp(a,b,la,lb) < 0);7 return (s_cmp (a, b, la, lb) < 0); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/i_abs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 integer i_abs(x) integer *x; 5 #else 6 integer i_abs(integer *x) 7 #endif 3 integer 4 i_abs (integer * x) 8 5 { 9 if(*x >= 0)10 return(*x);11 return(-*x);6 if (*x >= 0) 7 return (*x); 8 return (-*x); 12 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/i_dim.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 integer 4 i_dim (integer * a, integer * b) 8 5 { 9 return(*a > *b ? *a - *b : 0);6 return (*a > *b ? *a - *b : 0); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/i_dnnt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double floor();5 integer i_dnnt(x) doublereal *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 integer i_dnnt(doublereal *x)10 #endif 5 integer 6 i_dnnt (doublereal * x) 11 7 { 12 return (integer)(*x >= 0. ? floor(*x + .5) : -floor(.5 - *x));8 return (integer) (*x >= 0. ? floor (*x + .5) : -floor (.5 - *x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/i_indx.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 integer 4 i_indx (char *a, char *b, ftnlen la, ftnlen lb) 8 5 { 9 ftnlen i, n;10 char *s, *t, *bend;6 ftnlen i, n; 7 char *s, *t, *bend; 11 8 12 n = la - lb + 1;13 bend = b + lb;9 n = la - lb + 1; 10 bend = b + lb; 14 11 15 for(i = 0 ; i < n; ++i)16 17 18 19 while(t < bend)20 if(*s++ != *t++)21 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); 26 23 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/i_len.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 integer 4 i_len (char *s __attribute__ ((__unused__)), ftnlen n) 8 5 { 9 return(n);6 return (n); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/i_mod.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 integer 4 i_mod (integer * a, integer * b) 8 5 { 9 return(*a % *b);6 return (*a % *b); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/i_nint.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double floor();5 integer i_nint(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 integer i_nint(real *x)10 #endif 5 integer 6 i_nint (real * x) 11 7 { 12 return (integer)(*x >= 0 ? floor(*x + .5) : -floor(.5 - *x));8 return (integer) (*x >= 0 ? floor (*x + .5) : -floor (.5 - *x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/i_sign.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 integer 4 i_sign (integer * a, integer * b) 8 5 { 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); 12 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/iargc_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 ftnint G77_iargc_0 () 5 #else 6 ftnint G77_iargc_0 (void) 7 #endif 3 ftnint 4 G77_iargc_0 (void) 8 5 { 9 extern int f__xargc;10 return ( f__xargc - 1);6 extern int f__xargc; 7 return (f__xargc - 1); 11 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/l_ge.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 4 logical 5 l_ge (char *a, char *b, ftnlen la, ftnlen lb) 10 6 { 11 return(s_cmp(a,b,la,lb) >= 0);7 return (s_cmp (a, b, la, lb) >= 0); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/l_gt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 4 logical 5 l_gt (char *a, char *b, ftnlen la, ftnlen lb) 10 6 { 11 return(s_cmp(a,b,la,lb) > 0);7 return (s_cmp (a, b, la, lb) > 0); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/l_le.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 4 logical 5 l_le (char *a, char *b, ftnlen la, ftnlen lb) 10 6 { 11 return(s_cmp(a,b,la,lb) <= 0);7 return (s_cmp (a, b, la, lb) <= 0); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/l_lt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern integer s_cmp (char *, char *, ftnlen, ftnlen); 4 logical 5 l_lt (char *a, char *b, ftnlen la, ftnlen lb) 10 6 { 11 return(s_cmp(a,b,la,lb) < 0);7 return (s_cmp (a, b, la, lb) < 0); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/lbitbits.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 5 5 #endif 6 6 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 7 integer 8 lbit_bits (integer a, integer b, integer len) 13 9 { 14 10 /* Assume 2's complement arithmetic */ 15 11 16 12 unsigned long x, y; 17 13 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 21 integer 22 lbit_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)); 23 40 } 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/lbitshft.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 integer 4 lbit_shift (integer a, integer b) 9 5 { 10 return b >= 0 ? a << b : (integer)((uinteger)a >> -b);11 6 return b >= 0 ? a << b : (integer) ((uinteger) a >> -b); 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/main.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 4 4 #include "signal1.h" 5 5 6 #ifndef KR_headers7 #undef VOID8 6 #include <stdlib.h> 7 8 extern void f_exit (void); 9 #ifndef NO_ONEXIT 10 #define ONEXIT atexit 11 extern int atexit (void (*)(void)); 9 12 #endif 10 13 11 #ifndef VOID 12 #define VOID void 14 extern void f_init (void); 15 extern int MAIN__ (void); 16 extern void f_setarg (int, char **); 17 extern void f_setsig (void); 18 19 int 20 main (int argc, char **argv) 21 { 22 f_setarg (argc, argv); 23 f_setsig (); 24 f_init (); 25 #ifndef NO_ONEXIT 26 ONEXIT (f_exit); 13 27 #endif 14 15 #ifdef __cplusplus16 extern "C" { 28 MAIN__ (); 29 #ifdef NO_ONEXIT 30 f_exit (); 17 31 #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. */ 68 35 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_ci.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern void pow_zi (doublecomplex *, doublecomplex *, integer *); 4 void 5 pow_ci (complex * p, complex * a, integer * b) /* p = a**b */ 10 6 { 11 doublecomplex p1, a1;7 doublecomplex p1, a1; 12 8 13 a1.r = a->r;14 a1.i = a->i;9 a1.r = a->r; 10 a1.i = a->i; 15 11 16 pow_zi(&p1, &a1, b);12 pow_zi (&p1, &a1, b); 17 13 18 p->r = p1.r;19 p->i = p1.i;14 p->r = p1.r; 15 p->i = p1.i; 20 16 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_dd.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double pow();5 double pow_dd(ap, bp) doublereal *ap, *bp;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double pow_dd(doublereal *ap, doublereal *bp)10 #endif 5 double 6 pow_dd (doublereal * ap, doublereal * bp) 11 7 { 12 return(pow(*ap, *bp));8 return (pow (*ap, *bp)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_di.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 double 4 pow_di (doublereal * ap, integer * bp) 8 5 { 9 double pow, x;10 integer n;11 unsigned long u;6 double pow, x; 7 integer n; 8 unsigned long u; 12 9 13 pow = 1;14 x = *ap;15 n = *bp;10 pow = 1; 11 x = *ap; 12 n = *bp; 16 13 17 if(n != 0) 14 if (n != 0) 15 { 16 if (n < 0) 18 17 { 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; 33 20 } 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); 35 32 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_hh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 shortint 4 pow_hh (shortint * ap, shortint * bp) 8 5 { 9 10 6 shortint pow, x, n; 7 unsigned u; 11 8 12 13 9 x = *ap; 10 n = *bp; 14 11 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_ii.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 integer 4 pow_ii (integer * ap, integer * bp) 8 5 { 9 10 6 integer pow, x, n; 7 unsigned long u; 11 8 12 13 9 x = *ap; 10 n = *bp; 14 11 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_qq.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 longint 4 pow_qq (longint * ap, longint * bp) 8 5 { 9 10 unsigned long long u;/* system-dependent */6 longint pow, x, n; 7 unsigned long long u; /* system-dependent */ 11 8 12 13 9 x = *ap; 10 n = *bp; 14 11 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_ri.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 double 4 pow_ri (real * ap, integer * bp) 8 5 { 9 double pow, x;10 integer n;11 unsigned long u;6 double pow, x; 7 integer n; 8 unsigned long u; 12 9 13 pow = 1;14 x = *ap;15 n = *bp;10 pow = 1; 11 x = *ap; 12 n = *bp; 16 13 17 if(n != 0) 14 if (n != 0) 15 { 16 if (n < 0) 18 17 { 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; 33 20 } 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); 35 32 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_zi.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 extern void z_div (doublecomplex *, doublecomplex *, doublecomplex *); 4 void 5 pow_zi (doublecomplex * p, doublecomplex * a, integer * b) /* p = a**b */ 10 6 { 11 12 13 14 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 }; 16 12 17 18 19 13 n = *b; 14 q.r = 1; 15 q.i = 0; 20 16 21 if(n == 0)22 23 if(n < 0)24 25 26 z_div(&x, &one, a);27 28 29 30 31 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 } 33 29 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; 54 37 } 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 } 47 done: 48 p->i = q.i; 49 p->r = q.r; 50 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/pow_zz.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double log(), exp(), cos(), sin(), atan2(), f__cabs();5 VOID pow_zz(r,a,b) doublecomplex *r, *a, *b;6 #else7 3 #undef abs 8 4 #include <math.h> 9 extern double f__cabs (double,double);10 void pow_zz(doublecomplex *r, doublecomplex *a, doublecomplex *b)11 #endif 5 extern double f__cabs (double, double); 6 void 7 pow_zz (doublecomplex * r, doublecomplex * a, doublecomplex * b) 12 8 { 13 double logr, logi, x, y;9 double logr, logi, x, y; 14 10 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); 17 19 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; 20 22 21 r->r = x * cos(y);22 r->i = x * sin(y);23 r->r = x * cos (y); 24 r->i = x * sin (y); 23 25 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/qbitbits.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 9 9 #endif 10 10 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 11 integer 12 qbit_bits (longint a, integer b, integer len) 17 13 { 18 14 /* Assume 2's complement arithmetic */ 19 15 20 16 ulongint x, y; 21 17 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 25 longint 26 qbit_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)); 27 44 } 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/qbitshft.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 longint 4 qbit_shift (longint a, integer b) 9 5 { 10 return b >= 0 ? a << b : (longint)((ulongint)a >> -b);11 6 return b >= 0 ? a << b : (longint) ((ulongint) a >> -b); 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_abs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 double r_abs(x) real *x; 5 #else 6 double r_abs(real *x) 7 #endif 3 double 4 r_abs (real * x) 8 5 { 9 if(*x >= 0)10 return(*x);11 return(-*x);6 if (*x >= 0) 7 return (*x); 8 return (-*x); 12 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_acos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double acos();5 double r_acos(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_acos(real *x)10 #endif 5 double 6 r_acos (real * x) 11 7 { 12 return( acos(*x));8 return (acos (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_asin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double asin();5 double r_asin(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_asin(real *x)10 #endif 5 double 6 r_asin (real * x) 11 7 { 12 return( asin(*x));8 return (asin (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_atan.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double atan();5 double r_atan(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_atan(real *x)10 #endif 5 double 6 r_atan (real * x) 11 7 { 12 return( atan(*x));8 return (atan (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_atn2.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double atan2();5 double r_atn2(x,y) real *x, *y;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_atn2(real *x, real *y)10 #endif 5 double 6 r_atn2 (real * x, real * y) 11 7 { 12 return( atan2(*x,*y));8 return (atan2 (*x, *y)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_cnjg.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 void 4 r_cnjg (complex * r, complex * z) 8 5 { 9 10 11 12 6 real zi = z->i; 7 r->r = z->r; 8 r->i = -zi; 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_cos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double cos();5 double r_cos(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_cos(real *x)10 #endif 5 double 6 r_cos (real * x) 11 7 { 12 return( cos(*x));8 return (cos (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_cosh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double cosh();5 double r_cosh(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_cosh(real *x)10 #endif 5 double 6 r_cosh (real * x) 11 7 { 12 return( cosh(*x));8 return (cosh (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_dim.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 double 4 r_dim (real * a, real * b) 8 5 { 9 return(*a > *b ? *a - *b : 0);6 return (*a > *b ? *a - *b : 0); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_exp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double exp();5 double r_exp(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_exp(real *x)10 #endif 5 double 6 r_exp (real * x) 11 7 { 12 return( exp(*x));8 return (exp (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_imag.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 double r_imag(z) complex *z; 5 #else 6 double r_imag(complex *z) 7 #endif 3 double 4 r_imag (complex * z) 8 5 { 9 return(z->i);6 return (z->i); 10 7 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_int.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double floor();5 double r_int(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_int(real *x)10 #endif 5 double 6 r_int (real * x) 11 7 { 12 return( (*x>0) ? floor(*x) : -floor(- *x));8 return ((*x > 0) ? floor (*x) : -floor (-*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_lg10.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 3 3 #define log10e 0.43429448190325182765 4 4 5 #ifdef KR_headers6 double log();7 double r_lg10(x) real *x;8 #else9 5 #undef abs 10 6 #include <math.h> 11 double r_lg10(real *x)12 #endif 7 double 8 r_lg10 (real * x) 13 9 { 14 return( log10e * log(*x));10 return (log10e * log (*x)); 15 11 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_log.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double log();5 double r_log(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_log(real *x)10 #endif 5 double 6 r_log (real * x) 11 7 { 12 return( log(*x));8 return (log (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_mod.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 3 #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); 4 double drem (double, double); 13 5 #else 14 6 #undef abs 15 7 #include <math.h> 16 8 #endif 17 double r_mod(real *x, real *y)18 #endif 9 double 10 r_mod (real * x, real * y) 19 11 { 20 12 #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; 32 25 #else 33 34 if( (quotient = (double)*x / *y) >= 0)35 quotient = floor(quotient);36 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); 39 32 #endif 40 33 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_nint.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double floor();5 double r_nint(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_nint(real *x)10 #endif 5 double 6 r_nint (real * x) 11 7 { 12 return( (*x)>=0 ? 13 floor(*x + .5) : -floor(.5 - *x) ); 8 return ((*x) >= 0 ? floor (*x + .5) : -floor (.5 - *x)); 14 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_sign.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 double 4 r_sign (real * a, real * b) 8 5 { 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); 12 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_sin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sin();5 double r_sin(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_sin(real *x)10 #endif 5 double 6 r_sin (real * x) 11 7 { 12 return( sin(*x));8 return (sin (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_sinh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sinh();5 double r_sinh(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_sinh(real *x)10 #endif 5 double 6 r_sinh (real * x) 11 7 { 12 return( sinh(*x));8 return (sinh (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_sqrt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sqrt();5 double r_sqrt(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_sqrt(real *x)10 #endif 5 double 6 r_sqrt (real * x) 11 7 { 12 return( sqrt(*x));8 return (sqrt (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_tan.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double tan();5 double r_tan(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_tan(real *x)10 #endif 5 double 6 r_tan (real * x) 11 7 { 12 return( tan(*x));8 return (tan (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/r_tanh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double tanh();5 double r_tanh(x) real *x;6 #else7 3 #undef abs 8 4 #include <math.h> 9 double r_tanh(real *x)10 #endif 5 double 6 r_tanh (real * x) 11 7 { 12 return( tanh(*x));8 return (tanh (*x)); 13 9 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/s_cat.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 8 8 #include <stdio.h> 9 9 #undef abs 10 #ifdef KR_headers11 extern char *F77_aloc();12 extern void free();13 extern void G77_exit_0 ();14 #else15 10 #undef min 16 11 #undef max 17 12 #include <stdlib.h> 18 extern char *F77_aloc(ftnlen, char*); 19 #endif 13 extern char *F77_aloc (ftnlen, char *); 20 14 #include <string.h> 21 15 #endif /* NO_OVERWRITE */ 22 16 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) 17 void 18 s_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 } 28 69 #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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/s_cmp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 3 3 /* compare two strings */ 4 4 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 5 integer 6 s_cmp (char *a0, char *b0, ftnlen la, ftnlen lb) 10 7 { 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; 16 13 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 } 24 24 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 } 30 31 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); 44 49 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/s_copy.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 9 9 /* assign strings: a = b */ 10 10 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) 11 void 12 s_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) 15 21 #endif 16 { 17 register char *aend, *bend; 18 19 aend = a + la; 20 21 if(la <= lb) 22 while (a < aend) 23 *a++ = *b++; 22 24 #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; 31 28 #endif 32 29 33 else { 34 bend = b + lb; 30 else 31 { 32 bend = b + lb; 35 33 #ifndef NO_OVERWRITE 36 34 if (a <= b || a >= bend) 37 35 #endif 38 while(b < bend)39 36 while (b < bend) 37 *a++ = *b++; 40 38 #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 } 47 46 #endif 48 while(a < aend)49 50 51 47 while (a < aend) 48 *a++ = ' '; 49 } 50 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/s_paus.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 4 4 5 5 #include "signal1.h" 6 #ifdef KR_headers7 #define Void /* void */8 #define Int /* int */9 #else10 #define Void void11 #define Int int12 6 #undef abs 13 7 #undef min 14 8 #undef max 15 9 #include <stdlib.h> 16 #ifdef __cplusplus 17 extern "C" { 10 extern int getpid (void), isatty (int), pause (void); 11 12 extern void f_exit (void); 13 14 static void 15 waitpause (Sigarg) 16 { 17 Use_Sigarg; 18 return; 19 } 20 21 static void 22 s_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 (); 18 32 #endif 19 extern int getpid(void), isatty(int), pause(void); 33 exit (0); 34 } 35 } 36 37 int 38 s_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 (); 20 66 #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 */ 88 71 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/s_rnge.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 4 4 /* called when a subscript is out of range */ 5 5 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 6 extern void sig_die (char *, int); 7 integer 8 s_rnge (char *varn, ftnint offset, char *procn, ftnint line) 13 9 { 14 register int i;10 register int i; 15 11 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 */ 26 22 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/s_stop.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 2 2 #include "f2c.h" 3 3 4 #ifdef KR_headers5 extern void f_exit();6 VOID s_stop(s, n) char *s; ftnlen n;7 #else8 4 #undef abs 9 5 #undef min 10 6 #undef max 11 7 #include <stdlib.h> 12 #ifdef __cplusplus 13 extern "C" { 8 void f_exit (void); 9 10 int 11 s_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 (); 14 24 #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); 33 26 34 27 /* We cannot avoid (useless) compiler diagnostics here: */ … … 36 29 /* and others complain that this one cannot be reached. */ 37 30 38 return 0;/* NOT REACHED */31 return 0; /* NOT REACHED */ 39 32 } 40 #ifdef __cplusplus41 }42 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/setarg.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 2 2 g77's inlined intrinsic equivalents. */ 3 3 4 #ifndef KR_headers5 #undef VOID6 4 #include <stdlib.h> 7 #endif8 9 #ifndef VOID10 #define VOID void11 #endif12 5 13 6 int f__xargc; 14 7 char **f__xargv; 15 8 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 9 void 10 f_setarg (int argc, char **argv) 26 11 { 27 f__xargc = argc;28 f__xargv = argv;12 f__xargc = argc; 13 f__xargv = argv; 29 14 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/setsig.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 10 10 #endif 11 11 12 #ifndef KR_headers13 #undef VOID14 12 #include <stdlib.h> 15 #endif16 13 17 #ifndef VOID 18 #define VOID void 19 #endif 14 extern void sig_die (char *, int); 20 15 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) 16 static void 17 sigfdie (Sigarg) 34 18 { 35 Use_Sigarg;36 sig_die("Floating Exception", 1);19 Use_Sigarg; 20 sig_die ("Floating Exception", 1); 37 21 } 38 22 39 23 40 static VOID sigidie(Sigarg) 24 static void 25 sigidie (Sigarg) 41 26 { 42 Use_Sigarg;43 sig_die("IOT Trap", 1);27 Use_Sigarg; 28 sig_die ("IOT Trap", 1); 44 29 } 45 30 46 31 #ifdef SIGQUIT 47 static VOID sigqdie(Sigarg) 32 static void 33 sigqdie (Sigarg) 48 34 { 49 Use_Sigarg;50 sig_die("Quit signal", 1);35 Use_Sigarg; 36 sig_die ("Quit signal", 1); 51 37 } 52 38 #endif 53 39 54 40 55 static VOID sigindie(Sigarg) 41 static void 42 sigindie (Sigarg) 56 43 { 57 Use_Sigarg;58 sig_die("Interrupt", 0);44 Use_Sigarg; 45 sig_die ("Interrupt", 0); 59 46 } 60 47 61 static VOID sigtdie(Sigarg) 48 static void 49 sigtdie (Sigarg) 62 50 { 63 Use_Sigarg;64 sig_die("Killed", 0);51 Use_Sigarg; 52 sig_die ("Killed", 0); 65 53 } 66 54 67 55 #ifdef SIGTRAP 68 static VOID sigtrdie(Sigarg) 56 static void 57 sigtrdie (Sigarg) 69 58 { 70 Use_Sigarg;71 sig_die("Trace trap", 1);59 Use_Sigarg; 60 sig_die ("Trace trap", 1); 72 61 } 73 62 #endif 74 63 75 64 76 #ifdef __cplusplus 77 } 78 #endif 79 80 void 81 f_setsig() 65 void 66 f_setsig () 82 67 { 83 signal1(SIGFPE, sigfdie); /* ignore underflow, enable overflow */68 signal1 (SIGFPE, sigfdie); /* ignore underflow, enable overflow */ 84 69 #ifdef SIGIOT 85 signal1(SIGIOT, sigidie);70 signal1 (SIGIOT, sigidie); 86 71 #endif 87 72 #ifdef SIGTRAP 88 signal1(SIGTRAP, sigtrdie);73 signal1 (SIGTRAP, sigtrdie); 89 74 #endif 90 75 #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); 93 78 #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); 97 82 98 83 #ifdef pdp11 99 ldfps(01200);/* detect overflow as an exception */84 ldfps (01200); /* detect overflow as an exception */ 100 85 #endif 101 86 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/sig_die.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 8 8 #endif 9 9 10 #ifdef KR_headers11 void sig_die(s, kill) register char *s; int kill;12 #else13 10 #include <stdlib.h> 14 #ifdef __cplusplus 15 extern "C" { 11 extern void f_exit (void); 12 13 void 14 sig_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); 16 27 #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 (); 20 34 #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 } 44 37 } 45 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/signal1.h0
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 12 12 #endif 13 13 #ifndef Sigarg_t 14 #ifdef KR_headers15 #define Sigarg_t16 #else17 14 #define Sigarg_t int 18 #endif 19 #endif /*Sigarg_t*/ 15 #endif /*Sigarg_t */ 20 16 21 #ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */17 #ifdef USE_SIG_PF /* compile with -DUSE_SIG_PF under IRIX */ 22 18 #define sig_pf SIG_PF 23 19 #else 24 typedef Sigret_t (*sig_pf) (Sigarg_t);20 typedef Sigret_t (*sig_pf) (Sigarg_t); 25 21 #endif 26 22 27 23 #define signal1(a,b) signal(a,(sig_pf)b) 28 24 29 #ifdef __cplusplus 30 #define Sigarg ... 31 #define Use_Sigarg 32 #else 33 #define Sigarg Int n 25 #define Sigarg int n 34 26 #define Use_Sigarg n = n /* shut up compiler warning */ 35 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/signal_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 2 2 #include "signal1.h" 3 3 4 #ifdef KR_headers5 4 void * 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 5 G77_signal_0 (integer * sigp, sig_pf proc) 11 6 { 12 13 sig = (int)*sigp;7 int sig; 8 sig = (int) *sigp; 14 9 15 return (void *) signal(sig, proc);16 10 return (void *) signal (sig, proc); 11 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/system_.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 3 3 #include "f2c.h" 4 4 5 #ifdef KR_headers6 extern char *F77_aloc();7 8 integer9 G77_system_0 (s, n) register char *s; ftnlen n;10 #else11 5 #undef abs 12 6 #undef min 13 7 #undef max 14 8 #include <stdlib.h> 15 extern char *F77_aloc (ftnlen, char*);9 extern char *F77_aloc (ftnlen, char *); 16 10 17 11 integer 18 12 G77_system_0 (register char *s, ftnlen n) 19 #endif20 13 { 21 22 23 14 char buff0[256], *buff; 15 register char *bp, *blast; 16 integer rv; 24 17 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; 28 20 29 while(bp < blast && *s)30 31 32 rv = system(buff);33 34 free(buff);35 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/z_abs.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 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 3 double f__cabs (double, double); 4 double 5 z_abs (doublecomplex * z) 10 6 { 11 return( f__cabs( z->r, z->i ));7 return (f__cabs (z->r, z->i)); 12 8 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/z_cos.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sin(), cos(), sinh(), cosh();5 VOID z_cos(r, z) doublecomplex *r, *z;6 #else7 3 #undef abs 8 4 #include "math.h" 9 void z_cos(doublecomplex *r, doublecomplex *z)10 #endif 5 void 6 z_cos (doublecomplex * r, doublecomplex * z) 11 7 { 12 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/z_div.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers 4 extern VOID sig_die(); 5 VOID z_div(c, a, b) doublecomplex *a, *b, *c; 3 extern void sig_die (char *, int); 4 void 5 z_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; 6 23 #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); 9 25 #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 } 13 32 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/z_exp.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double exp(), cos(), sin();5 VOID z_exp(r, z) doublecomplex *r, *z;6 #else7 3 #undef abs 8 4 #include "math.h" 9 void z_exp(doublecomplex *r, doublecomplex *z)10 #endif 5 void 6 z_exp (doublecomplex * r, doublecomplex * z) 11 7 { 12 8 double expx, zi = z->i; 13 9 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/z_log.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double log(), f__cabs(), atan2();5 VOID z_log(r, z) doublecomplex *r, *z;6 #else7 3 #undef abs 8 4 #include "math.h" 9 extern double f__cabs (double, double);10 void z_log(doublecomplex *r, doublecomplex *z)11 #endif 5 extern double f__cabs (double, double); 6 void 7 z_log (doublecomplex * r, doublecomplex * z) 12 8 { 13 14 9 double s, s0, t, t2, u, v; 10 double zi = z->i, zr = z->r; 15 11 16 r->i = atan2(zi, zr);12 r->i = atan2 (zi, zr); 17 13 #ifdef Pre20000310 18 r->r = log( f__cabs( zr, zi ));14 r->r = log (f__cabs (zr, zi)); 19 15 #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 { 37 35 38 36 #ifdef Comment 39 37 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 } 62 58 #endif 63 59 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/z_sin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sin(), cos(), sinh(), cosh();5 VOID z_sin(r, z) doublecomplex *r, *z;6 #else7 3 #undef abs 8 4 #include "math.h" 9 void z_sin(doublecomplex *r, doublecomplex *z)10 #endif 5 void 6 z_sin (doublecomplex * r, doublecomplex * z) 11 7 { 12 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 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libf2c/libF77/z_sqrt.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 #include "f2c.h" 2 2 3 #ifdef KR_headers4 double sqrt(), f__cabs();5 VOID z_sqrt(r, z) doublecomplex *r, *z;6 #else7 3 #undef abs 8 4 #include "math.h" 9 extern double f__cabs (double, double);10 void z_sqrt(doublecomplex *r, doublecomplex *z)11 #endif 5 extern double f__cabs (double, double); 6 void 7 z_sqrt (doublecomplex * r, doublecomplex * z) 12 8 { 13 9 double mag, zi = z->i, zr = z->r; 14 10 15 if( (mag = f__cabs(zr, zi)) == 0.)16 17 else if(zr > 0)18 19 r->r = sqrt(0.5 * (mag + zr));20 21 22 23 24 r->i = sqrt(0.5 * (mag - zr));25 if(zi < 0)26 r->i = -r->i;27 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 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.