diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-05-26 16:30:51 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-05-26 16:30:51 +0000 |
commit | b9666a04899b8427ad99256361691ad4f08d17b2 (patch) | |
tree | 782aaf9251a058333775595f88d85e65bea4dd19 /gnu/usr.bin/gcc/f/runtime/libF77 | |
parent | ae415c5f809531e1ff6823250f15e15c5e221f34 (diff) |
So long, and thanks for all the bugs.
Diffstat (limited to 'gnu/usr.bin/gcc/f/runtime/libF77')
124 files changed, 0 insertions, 2972 deletions
diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/F77_aloc.c b/gnu/usr.bin/gcc/f/runtime/libF77/F77_aloc.c deleted file mode 100644 index b44ba61c333..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/F77_aloc.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "f2c.h" -#undef abs -#undef min -#undef max -#include <stdio.h> - -static integer memfailure = 3; - -#ifdef KR_headers -extern char *malloc(); -extern void exit_(); - - char * -F77_aloc(Len, whence) integer Len; char *whence; -#else -#include <stdlib.h> -extern void exit_(integer*); - - char * -F77_aloc(integer Len, char *whence) -#endif -{ - char *rv; - unsigned int uLen = (unsigned int) Len; /* for K&R C */ - - if (!(rv = (char*)malloc(uLen))) { - fprintf(stderr, "malloc(%u) failure in %s\n", - uLen, whence); - exit_(&memfailure); - } - return rv; - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/Makefile.in b/gnu/usr.bin/gcc/f/runtime/libF77/Makefile.in deleted file mode 100644 index 164c7bcef38..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/Makefile.in +++ /dev/null @@ -1,114 +0,0 @@ -# Makefile for GNU F77 compiler runtime. -# Copyright 1990 - 1994 by AT&T Bell Laboratories and Bellcore (see the -# file `Notice'). -# Portions of this file Copyright (C) 1995, 1996 Free Software Foundation, Inc. -# Contributed by Dave Love (d.love@dl.ac.uk). -# -#This file is part of GNU Fortran. -# -#GNU Fortran is free software; you can redistribute it and/or modify -#it under the terms of the GNU General Public License as published by -#the Free Software Foundation; either version 2, or (at your option) -#any later version. -# -#GNU Fortran is distributed in the hope that it will be useful, -#but WITHOUT ANY WARRANTY; without even the implied warranty of -#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -#GNU General Public License for more details. -# -#You should have received a copy of the GNU General Public License -#along with GNU Fortran; see the file COPYING. If not, write to -#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -#02111-1307, USA. - -SHELL = /bin/sh - -srcdir = @srcdir@ -VPATH = @srcdir@ - -#### Start of system configuration section. #### - -# The _FOR_TARGET things are appropriate for a cross-make, passed by the -# superior makefile -GCC_FOR_TARGET = @CC@ -CC = $(GCC_FOR_TARGET) -CFLAGS = @CFLAGS@ $(GCC_FLAGS) -CPPFLAGS = @CPPFLAGS@ -DEFS = @DEFS@ -CGFLAGS = -g0 -# f2c.h should already be installed in xgcc's include directory but add that -# to -I anyhow in case not using xgcc. -ALL_CFLAGS = -I$(srcdir) -I../../../include $(CPPFLAGS) $(DEFS) $(CFLAGS) -AR = @AR@ -AR_FLAGS = rc -RANLIB = @RANLIB@ -RANLIB_TEST = @RANLIB_TEST@ -CROSS = @CROSS@ - -.SUFFIXES: -.SUFFIXES: .c .o - -.c.o: - $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $(CGFLAGS) $< -# Next two lines were removed because Solaris doesn't like `ld -x', and -# it seems there's no real benefit to doing this anyway. -# ld -r -x -o $@x $@ -# mv $@x $@ - -MISC = F77_aloc.o VersionF.o main.o s_rnge.o abort_.o getarg_.o iargc_.o\ - getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o\ - derf_.o derfc_.o erf_.o erfc_.o sig_die.o exit.o -POW = pow_ci.o pow_dd.o pow_di.o pow_hh.o pow_ii.o pow_ri.o pow_zi.o pow_zz.o -CX = c_abs.o c_cos.o c_div.o c_exp.o c_log.o c_sin.o c_sqrt.o -DCX = z_abs.o z_cos.o z_div.o z_exp.o z_log.o z_sin.o z_sqrt.o -REAL = r_abs.o r_acos.o r_asin.o r_atan.o r_atn2.o r_cnjg.o r_cos.o\ - r_cosh.o r_dim.o r_exp.o r_imag.o r_int.o\ - r_lg10.o r_log.o r_mod.o r_nint.o r_sign.o\ - r_sin.o r_sinh.o r_sqrt.o r_tan.o r_tanh.o -DBL = d_abs.o d_acos.o d_asin.o d_atan.o d_atn2.o\ - d_cnjg.o d_cos.o d_cosh.o d_dim.o d_exp.o\ - d_imag.o d_int.o d_lg10.o d_log.o d_mod.o\ - d_nint.o d_prod.o d_sign.o d_sin.o d_sinh.o\ - d_sqrt.o d_tan.o d_tanh.o -INT = i_abs.o i_dim.o i_dnnt.o i_indx.o i_len.o i_mod.o i_nint.o i_sign.o -HALF = h_abs.o h_dim.o h_dnnt.o h_indx.o h_len.o h_mod.o h_nint.o h_sign.o -CMP = l_ge.o l_gt.o l_le.o l_lt.o hl_ge.o hl_gt.o hl_le.o hl_lt.o -EFL = ef1asc_.o ef1cmc_.o -CHAR = s_cat.o s_cmp.o s_copy.o -F90BIT = lbitbits.o lbitshft.o - -lib = ../../../libf2c.a - -F2C_H = ../../include/f2c.h - -all: $(lib) - -$(lib): force $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \ - $(HALF) $(CMP) $(EFL) $(CHAR) -# Don't worry if ar fails, that can happen when a root-like user installs a -# system built by a user to which the installer has insufficient access -# to modify libf2c.a. Probably a better solution to this should be -# found, but this should do for now. -- burley 951226 - -$(AR) $(AR_FLAGS) $(lib) $(MISC) $(POW) $(CX) $(DCX) $(REAL) \ - $(DBL) $(INT) $(HALF) $(CMP) $(EFL) $(CHAR) - if $(RANLIB_TEST); then $(RANLIB) $(lib); \ - else true; fi - -uninstall: -install: - -VersionF.o: Version.c - $(CC) -c $(CGFLAGS) -o $@ $(srcdir)/Version.c -# Next two lines were removed because Solaris doesn't like `ld -x', and -# it seems there's no real benefit to doing this anyway. -# ld -r -x -o $@x $@ -# mv $@x $@ - -clean: - rm -f *.o - -# Not quite all these actually do depend on f2c.h... -$(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \ - $(HALF) $(CMP) $(EFL) $(CHAR): $(F2C_H) $(F90BIT) - -force: diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/Notice b/gnu/usr.bin/gcc/f/runtime/libF77/Notice deleted file mode 100644 index 64af9f12dc4..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/Notice +++ /dev/null @@ -1,23 +0,0 @@ -/**************************************************************** -Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories and Bellcore. - -Permission to use, copy, modify, and distribute this software -and its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the names of AT&T Bell Laboratories or -Bellcore or any of their entities not be used in advertising or -publicity pertaining to distribution of the software without -specific, written prior permission. - -AT&T and Bellcore disclaim all warranties with regard to this -software, including all implied warranties of merchantability -and fitness. In no event shall AT&T or Bellcore be liable for -any special, indirect or consequential damages or any damages -whatsoever resulting from loss of use, data or profits, whether -in an action of contract, negligence or other tortious action, -arising out of or in connection with the use or performance of -this software. -****************************************************************/ - diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/README b/gnu/usr.bin/gcc/f/runtime/libF77/README deleted file mode 100644 index f3afeb6855f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/README +++ /dev/null @@ -1,113 +0,0 @@ -If your compiler does not recognize ANSI C headers, -compile with KR_headers defined: either add -DKR_headers -to the definition of CFLAGS in the makefile, or insert - -#define KR_headers - -at the top of f2c.h , cabs.c , main.c , and sig_die.c . - -Under MS-DOS, compile s_paus.c with -DMSDOS. - -If you have a really ancient K&R C compiler that does not understand -void, add -Dvoid=int to the definition of CFLAGS in the makefile. - -If you use a C++ compiler, first create a local f2c.h by appending -f2ch.add to the usual f2c.h, e.g., by issuing the command - make f2c.h -which assumes f2c.h is installed in /usr/include . - -If your system lacks onexit() and you are not using an ANSI C -compiler, then you should compile main.c, s_paus.c, s_stop.c, and -sig_die.c with NO_ONEXIT defined. See the comments about onexit in -the makefile. - -You may need to specify the return type of signal handlers for -signal.c. By default this is `int' if KR_headers is defined, `void' -otherwise. Define RETSIGTYPE to be `int' or `void' to override the -default. - -If your system has a double drem() function such that drem(a,b) -is the IEEE remainder function (with double a, b), then you may -wish to compile r_mod.c and d_mod.c with IEEE_drem defined. -On some systems, you may also need to compile with -Ddrem=remainder . - -To check for transmission errors, issue the command - make check -This assumes you have the xsum program whose source, xsum.c, -is distributed as part of "all from f2c/src". If you do not -have xsum, you can obtain xsum.c by sending the following E-mail -message to netlib@bell-labs.com - send xsum.c from f2c/src - -The makefile assumes you have installed f2c.h in a standard -place (and does not cause recompilation when f2c.h is changed); -f2c.h comes with "all from f2c" (the source for f2c) and is -available separately ("f2c.h from f2c"). - -Most of the routines in libF77 are support routines for Fortran -intrinsic functions or for operations that f2c chooses not -to do "in line". There are a few exceptions, summarized below -- -functions and subroutines that appear to your program as ordinary -external Fortran routines. - -1. CALL ABORT prints a message and causes a core dump. - -2. ERF(r) and DERF(d) and the REAL and DOUBLE PRECISION - error functions (with x REAL and d DOUBLE PRECISION); - DERF must be declared DOUBLE PRECISION in your program. - Both ERF and DERF assume your C library provides the - underlying erf() function (which not all systems do). - -3. ERFC(r) and DERFC(d) are the complementary error functions: - ERFC(r) = 1 - ERF(r) and DERFC(d) = 1.d0 - DERFC(d) - (except that their results may be more accurate than - explicitly evaluating the above formulae would give). - Again, ERFC and r are REAL, and DERFC and d are DOUBLE - PRECISION (and must be declared as such in your program), - and ERFC and DERFC rely on your system's erfc(). - -4. CALL GETARG(n,s), where n is an INTEGER and s is a CHARACTER - variable, sets s to the n-th command-line argument (or to - all blanks if there are fewer than n command-line arguments); - CALL GETARG(0,s) sets s to the name of the program (on systems - that support this feature). See IARGC below. - -5. CALL GETENV(name, value), where name and value are of type - CHARACTER, sets value to the environment value, $name, of - name (or to blanks if $name has not been set). - -6. NARGS = IARGC() sets NARGS to the number of command-line - arguments (an INTEGER value). - -7. CALL SIGNAL(n,func), where n is an INTEGER and func is an - EXTERNAL procedure, arranges for func to be invoked when - signal n occurs (on systems where this makes sense). - -8. CALL SYSTEM(cmd), where cmd is of type CHARACTER, passes - cmd to the system's command processor (on systems where - this can be done). - -The makefile does not attempt to compile pow_qq.c, qbitbits.c, -and qbitshft.c, which are meant for use with INTEGER*8. To use -INTEGER*8, you must modify f2c.h to declare longint and ulongint -appropriately; then add pow_qq.o to the POW = line in the makefile, -and add " qbitbits.o qbitshft.o" to the makefile's F90BIT = line. - -Following Fortran 90, s_cat.c and s_copy.c allow the target of a -(character string) assignment to be appear on its right-hand, at -the cost of some extra overhead for all run-time concatenations. -If you prefer the extra efficiency that comes with the Fortran 77 -requirement that the left-hand side of a character assignment not -be involved in the right-hand side, compile s_cat.c and s_copy.c -with -DNO_OVERWRITE . - -If your system lacks a ranlib command, you don't need it. -Either comment out the makefile's ranlib invocation, or install -a harmless "ranlib" command somewhere in your PATH, such as the -one-line shell script - - exit 0 - -or (on some systems) - - exec /usr/bin/ar lts $1 >/dev/null diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/Version.c b/gnu/usr.bin/gcc/f/runtime/libF77/Version.c deleted file mode 100644 index d38e01d1907..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/Version.c +++ /dev/null @@ -1,58 +0,0 @@ -static char junk[] = "\n@(#)LIBF77 VERSION 19960619\n"; - -/* -*/ - -char __G77_LIBF77_VERSION__[] = "0.5.19"; - -/* -2.00 11 June 1980. File version.c added to library. -2.01 31 May 1988. s_paus() flushes stderr; names of hl_* fixed - [ d]erf[c ] added - 8 Aug. 1989: #ifdefs for f2c -i2 added to s_cat.c - 29 Nov. 1989: s_cmp returns long (for f2c) - 30 Nov. 1989: arg types from f2c.h - 12 Dec. 1989: s_rnge allows long names - 19 Dec. 1989: getenv_ allows unsorted environment - 28 Mar. 1990: add exit(0) to end of main() - 2 Oct. 1990: test signal(...) == SIG_IGN rather than & 01 in main - 17 Oct. 1990: abort() calls changed to sig_die(...,1) - 22 Oct. 1990: separate sig_die from main - 25 Apr. 1991: minor, theoretically invisible tweaks to s_cat, sig_die - 31 May 1991: make system_ return status - 18 Dec. 1991: change long to ftnlen (for -i2) many places - 28 Feb. 1992: repair z_sqrt.c (scribbled on input, gave wrong answer) - 18 July 1992: for n < 0, repair handling of 0**n in pow_[dr]i.c - and m**n in pow_hh.c and pow_ii.c; - catch SIGTRAP in main() for error msg before abort - 23 July 1992: switch to ANSI prototypes unless KR_headers is #defined - 23 Oct. 1992: fix botch in signal_.c (erroneous deref of 2nd arg); - change Cabs to f__cabs. - 12 March 1993: various tweaks for C++ - 2 June 1994: adjust so abnormal terminations invoke f_exit just once - 16 Sept. 1994: s_cmp: treat characters as unsigned in comparisons. - 19 Sept. 1994: s_paus: flush after end of PAUSE; add -DMSDOS - 12 Jan. 1995: pow_[dhiqrz][hiq]: adjust x**i to work on machines - that sign-extend right shifts when i is the most - negative integer. - 26 Jan. 1995: adjust s_cat.c, s_copy.c to permit the left-hand side - of character assignments to appear on the right-hand - side (unless compiled with -DNO_OVERWRITE). - 27 Jan. 1995: minor tweak to s_copy.c: copy forward whenever - possible (for better cache behavior). - 30 May 1995: added subroutine exit(rc) integer rc. Version not changed. - 29 Aug. 1995: add F77_aloc.c; use it in s_cat.c and system_.c. - 6 Sept. 1995: fix return type of system_ under -DKR_headers. - 19 Dec. 1995: s_cat.c: fix bug when 2nd or later arg overlaps lhs. - 19 Mar. 1996: s_cat.c: supply missing break after overlap detection. - 13 May 1996: add [lq]bitbits.c and [lq]bitshft.c (f90 bit intrinsics). - 19 June 1996: add casts to unsigned in [lq]bitshft.c. -*/ - -#include <stdio.h> - -void -g77_libf77_version () -{ - fprintf (stderr, "__G77_LIBF77_VERSION__: %s\n", __G77_LIBF77_VERSION__); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/abort_.c b/gnu/usr.bin/gcc/f/runtime/libF77/abort_.c deleted file mode 100644 index 7a7e55236b8..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/abort_.c +++ /dev/null @@ -1,18 +0,0 @@ -#include <stdio.h> -#include "f2c.h" - -#ifdef KR_headers -extern VOID sig_die(); - -int abort_() -#else -extern void sig_die(char*,int); - -int abort_(void) -#endif -{ -sig_die("Fortran abort routine called", 1); -#ifdef __cplusplus -return 0; -#endif -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/c_abs.c b/gnu/usr.bin/gcc/f/runtime/libF77/c_abs.c deleted file mode 100644 index 041fbd3d8bb..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/c_abs.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern double f__cabs(); - -double c_abs(z) complex *z; -#else -extern double f__cabs(double, double); - -double c_abs(complex *z) -#endif -{ -return( f__cabs( z->r, z->i ) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/c_cos.c b/gnu/usr.bin/gcc/f/runtime/libF77/c_cos.c deleted file mode 100644 index 09c8719848f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/c_cos.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern double sin(), cos(), sinh(), cosh(); - -VOID c_cos(r, z) complex *r, *z; -#else -#undef abs -#include <math.h> - -void c_cos(complex *r, complex *z) -#endif -{ -r->r = cos(z->r) * cosh(z->i); -r->i = - sin(z->r) * sinh(z->i); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/c_div.c b/gnu/usr.bin/gcc/f/runtime/libF77/c_div.c deleted file mode 100644 index 0bb56b485e1..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/c_div.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern VOID sig_die(); -VOID c_div(c, a, b) -complex *a, *b, *c; -#else -extern void sig_die(char*,int); -void c_div(complex *c, complex *a, complex *b) -#endif -{ -double ratio, den; -double abr, abi; - -if( (abr = b->r) < 0.) - abr = - abr; -if( (abi = b->i) < 0.) - abi = - abi; -if( abr <= abi ) - { - if(abi == 0) - sig_die("complex division by zero", 1); - ratio = (double)b->r / b->i ; - den = b->i * (1 + ratio*ratio); - c->r = (a->r*ratio + a->i) / den; - c->i = (a->i*ratio - a->r) / den; - } - -else - { - ratio = (double)b->i / b->r ; - den = b->r * (1 + ratio*ratio); - c->r = (a->r + a->i*ratio) / den; - c->i = (a->i - a->r*ratio) / den; - } -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/c_exp.c b/gnu/usr.bin/gcc/f/runtime/libF77/c_exp.c deleted file mode 100644 index 68aebd3dbfb..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/c_exp.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern double exp(), cos(), sin(); - - VOID c_exp(r, z) complex *r, *z; -#else -#undef abs -#include <math.h> - -void c_exp(complex *r, complex *z) -#endif -{ -double expx; - -expx = exp(z->r); -r->r = expx * cos(z->i); -r->i = expx * sin(z->i); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/c_log.c b/gnu/usr.bin/gcc/f/runtime/libF77/c_log.c deleted file mode 100644 index 39dcfa50967..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/c_log.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern double log(), f__cabs(), atan2(); -VOID c_log(r, z) complex *r, *z; -#else -#undef abs -#include <math.h> -extern double f__cabs(double, double); - -void c_log(complex *r, complex *z) -#endif -{ -r->i = atan2(z->i, z->r); -r->r = log( f__cabs(z->r, z->i) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/c_sin.c b/gnu/usr.bin/gcc/f/runtime/libF77/c_sin.c deleted file mode 100644 index 620360ce53e..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/c_sin.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern double sin(), cos(), sinh(), cosh(); - -VOID c_sin(r, z) complex *r, *z; -#else -#undef abs -#include <math.h> - -void c_sin(complex *r, complex *z) -#endif -{ -r->r = sin(z->r) * cosh(z->i); -r->i = cos(z->r) * sinh(z->i); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/c_sqrt.c b/gnu/usr.bin/gcc/f/runtime/libF77/c_sqrt.c deleted file mode 100644 index 4095ce17b5b..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/c_sqrt.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern double sqrt(), f__cabs(); - -VOID c_sqrt(r, z) complex *r, *z; -#else -#undef abs -#include <math.h> -extern double f__cabs(double, double); - -void c_sqrt(complex *r, complex *z) -#endif -{ -double mag, t; - -if( (mag = f__cabs(z->r, z->i)) == 0.) - r->r = r->i = 0.; -else if(z->r > 0) - { - r->r = t = sqrt(0.5 * (mag + z->r) ); - t = z->i / t; - r->i = 0.5 * t; - } -else - { - t = sqrt(0.5 * (mag - z->r) ); - if(z->i < 0) - t = -t; - r->i = t; - t = z->i / t; - r->r = 0.5 * t; - } -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/cabs.c b/gnu/usr.bin/gcc/f/runtime/libF77/cabs.c deleted file mode 100644 index 2fad044e884..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/cabs.c +++ /dev/null @@ -1,27 +0,0 @@ -#ifdef KR_headers -extern double sqrt(); -double f__cabs(real, imag) double real, imag; -#else -#undef abs -#include <math.h> -double f__cabs(double real, double imag) -#endif -{ -double temp; - -if(real < 0) - real = -real; -if(imag < 0) - imag = -imag; -if(imag > real){ - temp = real; - real = imag; - imag = temp; -} -if((real+imag) == real) - return(real); - -temp = imag/real; -temp = real*sqrt(1.0 + temp*temp); /*overflow!!*/ -return(temp); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_abs.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_abs.c deleted file mode 100644 index cb157e067b7..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_abs.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double d_abs(x) doublereal *x; -#else -double d_abs(doublereal *x) -#endif -{ -if(*x >= 0) - return(*x); -return(- *x); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_acos.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_acos.c deleted file mode 100644 index 33da5369db2..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_acos.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double acos(); -double d_acos(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_acos(doublereal *x) -#endif -{ -return( acos(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_asin.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_asin.c deleted file mode 100644 index 79b33ca1bd6..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_asin.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double asin(); -double d_asin(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_asin(doublereal *x) -#endif -{ -return( asin(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_atan.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_atan.c deleted file mode 100644 index caea4a406e0..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_atan.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double atan(); -double d_atan(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_atan(doublereal *x) -#endif -{ -return( atan(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_atn2.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_atn2.c deleted file mode 100644 index 6748a55d56f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_atn2.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double atan2(); -double d_atn2(x,y) doublereal *x, *y; -#else -#undef abs -#include <math.h> -double d_atn2(doublereal *x, doublereal *y) -#endif -{ -return( atan2(*x,*y) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_cnjg.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_cnjg.c deleted file mode 100644 index c778c38758c..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_cnjg.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - - VOID -#ifdef KR_headers -d_cnjg(r, z) doublecomplex *r, *z; -#else -d_cnjg(doublecomplex *r, doublecomplex *z) -#endif -{ -r->r = z->r; -r->i = - z->i; -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_cos.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_cos.c deleted file mode 100644 index fa4d6ca406f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_cos.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double cos(); -double d_cos(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_cos(doublereal *x) -#endif -{ -return( cos(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_cosh.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_cosh.c deleted file mode 100644 index edc0ebc1092..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_cosh.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double cosh(); -double d_cosh(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_cosh(doublereal *x) -#endif -{ -return( cosh(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_dim.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_dim.c deleted file mode 100644 index 1d0ecb7bbb6..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_dim.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double d_dim(a,b) doublereal *a, *b; -#else -double d_dim(doublereal *a, doublereal *b) -#endif -{ -return( *a > *b ? *a - *b : 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_exp.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_exp.c deleted file mode 100644 index be12fd70551..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_exp.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double exp(); -double d_exp(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_exp(doublereal *x) -#endif -{ -return( exp(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_imag.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_imag.c deleted file mode 100644 index 793a3f9c405..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_imag.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double d_imag(z) doublecomplex *z; -#else -double d_imag(doublecomplex *z) -#endif -{ -return(z->i); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_int.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_int.c deleted file mode 100644 index beff1e7d378..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_int.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double floor(); -double d_int(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_int(doublereal *x) -#endif -{ -return( (*x>0) ? floor(*x) : -floor(- *x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_lg10.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_lg10.c deleted file mode 100644 index c0892bd512a..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_lg10.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "f2c.h" - -#define log10e 0.43429448190325182765 - -#ifdef KR_headers -double log(); -double d_lg10(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_lg10(doublereal *x) -#endif -{ -return( log10e * log(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_log.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_log.c deleted file mode 100644 index 592015b2821..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_log.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double log(); -double d_log(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_log(doublereal *x) -#endif -{ -return( log(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_mod.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_mod.c deleted file mode 100644 index 23f19299168..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_mod.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -#ifdef IEEE_drem -double drem(); -#else -double floor(); -#endif -double d_mod(x,y) doublereal *x, *y; -#else -#ifdef IEEE_drem -double drem(double, double); -#else -#undef abs -#include <math.h> -#endif -double d_mod(doublereal *x, doublereal *y) -#endif -{ -#ifdef IEEE_drem - double xa, ya, z; - if ((ya = *y) < 0.) - ya = -ya; - z = drem(xa = *x, ya); - if (xa > 0) { - if (z < 0) - z += ya; - } - else if (z > 0) - z -= ya; - return z; -#else - double quotient; - if( (quotient = *x / *y) >= 0) - quotient = floor(quotient); - else - quotient = -floor(-quotient); - return(*x - (*y) * quotient ); -#endif -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_nint.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_nint.c deleted file mode 100644 index 064beff669c..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_nint.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double floor(); -double d_nint(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_nint(doublereal *x) -#endif -{ -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_prod.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_prod.c deleted file mode 100644 index 3d4cef7835c..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_prod.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double d_prod(x,y) real *x, *y; -#else -double d_prod(real *x, real *y) -#endif -{ -return( (*x) * (*y) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_sign.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_sign.c deleted file mode 100644 index 514ff0bbff8..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_sign.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double d_sign(a,b) doublereal *a, *b; -#else -double d_sign(doublereal *a, doublereal *b) -#endif -{ -double x; -x = (*a >= 0 ? *a : - *a); -return( *b >= 0 ? x : -x); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_sin.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_sin.c deleted file mode 100644 index fdd699eede5..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_sin.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sin(); -double d_sin(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_sin(doublereal *x) -#endif -{ -return( sin(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_sinh.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_sinh.c deleted file mode 100644 index 77f36904f8e..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_sinh.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sinh(); -double d_sinh(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_sinh(doublereal *x) -#endif -{ -return( sinh(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_sqrt.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_sqrt.c deleted file mode 100644 index b5cf83b946f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_sqrt.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sqrt(); -double d_sqrt(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_sqrt(doublereal *x) -#endif -{ -return( sqrt(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_tan.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_tan.c deleted file mode 100644 index af94a053223..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_tan.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double tan(); -double d_tan(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_tan(doublereal *x) -#endif -{ -return( tan(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/d_tanh.c b/gnu/usr.bin/gcc/f/runtime/libF77/d_tanh.c deleted file mode 100644 index 92a02d4fd6b..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/d_tanh.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double tanh(); -double d_tanh(x) doublereal *x; -#else -#undef abs -#include <math.h> -double d_tanh(doublereal *x) -#endif -{ -return( tanh(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/derf_.c b/gnu/usr.bin/gcc/f/runtime/libF77/derf_.c deleted file mode 100644 index 6afaccdaa3e..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/derf_.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double erf(); -double derf_(x) doublereal *x; -#else -extern double erf(double); -double derf_(doublereal *x) -#endif -{ -return( erf(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/derfc_.c b/gnu/usr.bin/gcc/f/runtime/libF77/derfc_.c deleted file mode 100644 index e199f916058..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/derfc_.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern double erfc(); - -double derfc_(x) doublereal *x; -#else -extern double erfc(double); - -double derfc_(doublereal *x) -#endif -{ -return( erfc(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/ef1asc_.c b/gnu/usr.bin/gcc/f/runtime/libF77/ef1asc_.c deleted file mode 100644 index b2b8d72a781..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/ef1asc_.c +++ /dev/null @@ -1,21 +0,0 @@ -/* EFL support routine to copy string b to string a */ - -#include "f2c.h" - - -#define M ( (long) (sizeof(long) - 1) ) -#define EVEN(x) ( ( (x)+ M) & (~M) ) - -#ifdef KR_headers -extern VOID s_copy(); -ef1asc_(a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb; -#else -extern void s_copy(char*,char*,ftnlen,ftnlen); -int ef1asc_(ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb) -#endif -{ -s_copy( (char *)a, (char *)b, EVEN(*la), *lb ); -#ifdef __cplusplus -return 0; -#endif -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/ef1cmc_.c b/gnu/usr.bin/gcc/f/runtime/libF77/ef1cmc_.c deleted file mode 100644 index 8239a6ba2e1..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/ef1cmc_.c +++ /dev/null @@ -1,14 +0,0 @@ -/* EFL support routine to compare two character strings */ - -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -integer ef1cmc_(a, la, b, lb) ftnint *a, *b; ftnlen *la, *lb; -#else -extern integer s_cmp(char*,char*,ftnlen,ftnlen); -integer ef1cmc_(ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb) -#endif -{ -return( s_cmp( (char *)a, (char *)b, *la, *lb) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/erf_.c b/gnu/usr.bin/gcc/f/runtime/libF77/erf_.c deleted file mode 100644 index f7565ae6ae3..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/erf_.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double erf(); -double erf_(x) real *x; -#else -extern double erf(double); -double erf_(real *x) -#endif -{ -return( erf(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/erfc_.c b/gnu/usr.bin/gcc/f/runtime/libF77/erfc_.c deleted file mode 100644 index 56adb2f910b..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/erfc_.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double erfc(); -double erfc_(x) real *x; -#else -extern double erfc(double); -double erfc_(real *x) -#endif -{ -return( erfc(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/exit.c b/gnu/usr.bin/gcc/f/runtime/libF77/exit.c deleted file mode 100644 index 2c3116edaa2..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/exit.c +++ /dev/null @@ -1,37 +0,0 @@ -/* This gives the effect of - - subroutine exit(rc) - integer*4 rc - stop - end - - * with the added side effect of supplying rc as the program's exit code. - */ - -#include "f2c.h" -#undef abs -#undef min -#undef max -#ifndef KR_headers -#include <stdlib.h> -#ifdef __cplusplus -extern "C" { -#endif -extern void f_exit(void); -#endif - - void -#ifdef KR_headers -exit_(rc) integer *rc; -#else -exit_(integer *rc) -#endif -{ -#ifdef NO_ONEXIT - f_exit(); -#endif - exit(*rc); - } -#ifdef __cplusplus -} -#endif diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/f2ch.add b/gnu/usr.bin/gcc/f/runtime/libF77/f2ch.add deleted file mode 100644 index a2acc17a159..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/f2ch.add +++ /dev/null @@ -1,162 +0,0 @@ -/* If you are using a C++ compiler, append the following to f2c.h - for compiling libF77 and libI77. */ - -#ifdef __cplusplus -extern "C" { -extern int abort_(void); -extern double c_abs(complex *); -extern void c_cos(complex *, complex *); -extern void c_div(complex *, complex *, complex *); -extern void c_exp(complex *, complex *); -extern void c_log(complex *, complex *); -extern void c_sin(complex *, complex *); -extern void c_sqrt(complex *, complex *); -extern double d_abs(double *); -extern double d_acos(double *); -extern double d_asin(double *); -extern double d_atan(double *); -extern double d_atn2(double *, double *); -extern void d_cnjg(doublecomplex *, doublecomplex *); -extern double d_cos(double *); -extern double d_cosh(double *); -extern double d_dim(double *, double *); -extern double d_exp(double *); -extern double d_imag(doublecomplex *); -extern double d_int(double *); -extern double d_lg10(double *); -extern double d_log(double *); -extern double d_mod(double *, double *); -extern double d_nint(double *); -extern double d_prod(float *, float *); -extern double d_sign(double *, double *); -extern double d_sin(double *); -extern double d_sinh(double *); -extern double d_sqrt(double *); -extern double d_tan(double *); -extern double d_tanh(double *); -extern double derf_(double *); -extern double derfc_(double *); -extern integer do_fio(ftnint *, char *, ftnlen); -extern integer do_lio(ftnint *, ftnint *, char *, ftnlen); -extern integer do_uio(ftnint *, char *, ftnlen); -extern integer e_rdfe(void); -extern integer e_rdue(void); -extern integer e_rsfe(void); -extern integer e_rsfi(void); -extern integer e_rsle(void); -extern integer e_rsli(void); -extern integer e_rsue(void); -extern integer e_wdfe(void); -extern integer e_wdue(void); -extern integer e_wsfe(void); -extern integer e_wsfi(void); -extern integer e_wsle(void); -extern integer e_wsli(void); -extern integer e_wsue(void); -extern int ef1asc_(ftnint *, ftnlen *, ftnint *, ftnlen *); -extern integer ef1cmc_(ftnint *, ftnlen *, ftnint *, ftnlen *); -extern double erf(double); -extern double erf_(float *); -extern double erfc(double); -extern double erfc_(float *); -extern integer f_back(alist *); -extern integer f_clos(cllist *); -extern integer f_end(alist *); -extern void f_exit(void); -extern integer f_inqu(inlist *); -extern integer f_open(olist *); -extern integer f_rew(alist *); -extern int flush_(void); -extern void getarg_(integer *, char *, ftnlen); -extern void getenv_(char *, char *, ftnlen, ftnlen); -extern short h_abs(short *); -extern short h_dim(short *, short *); -extern short h_dnnt(double *); -extern short h_indx(char *, char *, ftnlen, ftnlen); -extern short h_len(char *, ftnlen); -extern short h_mod(short *, short *); -extern short h_nint(float *); -extern short h_sign(short *, short *); -extern short hl_ge(char *, char *, ftnlen, ftnlen); -extern short hl_gt(char *, char *, ftnlen, ftnlen); -extern short hl_le(char *, char *, ftnlen, ftnlen); -extern short hl_lt(char *, char *, ftnlen, ftnlen); -extern integer i_abs(integer *); -extern integer i_dim(integer *, integer *); -extern integer i_dnnt(double *); -extern integer i_indx(char *, char *, ftnlen, ftnlen); -extern integer i_len(char *, ftnlen); -extern integer i_mod(integer *, integer *); -extern integer i_nint(float *); -extern integer i_sign(integer *, integer *); -extern integer iargc_(void); -extern ftnlen l_ge(char *, char *, ftnlen, ftnlen); -extern ftnlen l_gt(char *, char *, ftnlen, ftnlen); -extern ftnlen l_le(char *, char *, ftnlen, ftnlen); -extern ftnlen l_lt(char *, char *, ftnlen, ftnlen); -extern void pow_ci(complex *, complex *, integer *); -extern double pow_dd(double *, double *); -extern double pow_di(double *, integer *); -extern short pow_hh(short *, shortint *); -extern integer pow_ii(integer *, integer *); -extern double pow_ri(float *, integer *); -extern void pow_zi(doublecomplex *, doublecomplex *, integer *); -extern void pow_zz(doublecomplex *, doublecomplex *, doublecomplex *); -extern double r_abs(float *); -extern double r_acos(float *); -extern double r_asin(float *); -extern double r_atan(float *); -extern double r_atn2(float *, float *); -extern void r_cnjg(complex *, complex *); -extern double r_cos(float *); -extern double r_cosh(float *); -extern double r_dim(float *, float *); -extern double r_exp(float *); -extern double r_imag(complex *); -extern double r_int(float *); -extern double r_lg10(float *); -extern double r_log(float *); -extern double r_mod(float *, float *); -extern double r_nint(float *); -extern double r_sign(float *, float *); -extern double r_sin(float *); -extern double r_sinh(float *); -extern double r_sqrt(float *); -extern double r_tan(float *); -extern double r_tanh(float *); -extern void s_cat(char *, char **, integer *, integer *, ftnlen); -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -extern void s_copy(char *, char *, ftnlen, ftnlen); -extern int s_paus(char *, ftnlen); -extern integer s_rdfe(cilist *); -extern integer s_rdue(cilist *); -extern integer s_rnge(char *, integer, char *, integer); -extern integer s_rsfe(cilist *); -extern integer s_rsfi(icilist *); -extern integer s_rsle(cilist *); -extern integer s_rsli(icilist *); -extern integer s_rsne(cilist *); -extern integer s_rsni(icilist *); -extern integer s_rsue(cilist *); -extern int s_stop(char *, ftnlen); -extern integer s_wdfe(cilist *); -extern integer s_wdue(cilist *); -extern integer s_wsfe(cilist *); -extern integer s_wsfi(icilist *); -extern integer s_wsle(cilist *); -extern integer s_wsli(icilist *); -extern integer s_wsne(cilist *); -extern integer s_wsni(icilist *); -extern integer s_wsue(cilist *); -extern void sig_die(char *, int); -extern integer signal_(integer *, void (*)(int)); -extern integer system_(char *, ftnlen); -extern double z_abs(doublecomplex *); -extern void z_cos(doublecomplex *, doublecomplex *); -extern void z_div(doublecomplex *, doublecomplex *, doublecomplex *); -extern void z_exp(doublecomplex *, doublecomplex *); -extern void z_log(doublecomplex *, doublecomplex *); -extern void z_sin(doublecomplex *, doublecomplex *); -extern void z_sqrt(doublecomplex *, doublecomplex *); - } -#endif diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/getarg_.c b/gnu/usr.bin/gcc/f/runtime/libF77/getarg_.c deleted file mode 100644 index fef0da7b1d5..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/getarg_.c +++ /dev/null @@ -1,28 +0,0 @@ -#include "f2c.h" - -/* - * subroutine getarg(k, c) - * returns the kth unix command argument in fortran character - * variable argument c -*/ - -#ifdef KR_headers -VOID getarg_(n, s, ls) ftnint *n; register char *s; ftnlen ls; -#else -void getarg_(ftnint *n, register char *s, ftnlen ls) -#endif -{ -extern int xargc; -extern char **xargv; -register char *t; -register int i; - -if(*n>=0 && *n<xargc) - t = xargv[*n]; -else - t = ""; -for(i = 0; i<ls && *t!='\0' ; ++i) - *s++ = *t++; -for( ; i<ls ; ++i) - *s++ = ' '; -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/getenv_.c b/gnu/usr.bin/gcc/f/runtime/libF77/getenv_.c deleted file mode 100644 index 2a035ea9a6b..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/getenv_.c +++ /dev/null @@ -1,51 +0,0 @@ -#include "f2c.h" - -/* - * getenv - f77 subroutine to return environment variables - * - * called by: - * call getenv (ENV_NAME, char_var) - * where: - * ENV_NAME is the name of an environment variable - * char_var is a character variable which will receive - * the current value of ENV_NAME, or all blanks - * if ENV_NAME is not defined - */ - -#ifdef KR_headers -VOID getenv_(fname, value, flen, vlen) char *value, *fname; ftnlen vlen, flen; -#else -void getenv_(char *fname, char *value, ftnlen flen, ftnlen vlen) -#endif -{ -extern char **environ; -register char *ep, *fp, *flast; -register char **env = environ; - -flast = fname + flen; -for(fp = fname ; fp < flast ; ++fp) - if(*fp == ' ') - { - flast = fp; - break; - } - -while (ep = *env++) - { - for(fp = fname; fp<flast ; ) - if(*fp++ != *ep++) - goto endloop; - - if(*ep++ == '=') { /* copy right hand side */ - while( *ep && --vlen>=0 ) - *value++ = *ep++; - - goto blank; - } -endloop: ; - } - -blank: - while( --vlen >= 0 ) - *value++ = ' '; -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/h_abs.c b/gnu/usr.bin/gcc/f/runtime/libF77/h_abs.c deleted file mode 100644 index 73b82151ac1..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/h_abs.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -shortint h_abs(x) shortint *x; -#else -shortint h_abs(shortint *x) -#endif -{ -if(*x >= 0) - return(*x); -return(- *x); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/h_dim.c b/gnu/usr.bin/gcc/f/runtime/libF77/h_dim.c deleted file mode 100644 index ceff660e26c..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/h_dim.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -shortint h_dim(a,b) shortint *a, *b; -#else -shortint h_dim(shortint *a, shortint *b) -#endif -{ -return( *a > *b ? *a - *b : 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/h_dnnt.c b/gnu/usr.bin/gcc/f/runtime/libF77/h_dnnt.c deleted file mode 100644 index 9d0aa25f1d3..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/h_dnnt.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double floor(); -shortint h_dnnt(x) doublereal *x; -#else -#undef abs -#include <math.h> -shortint h_dnnt(doublereal *x) -#endif -{ -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/h_indx.c b/gnu/usr.bin/gcc/f/runtime/libF77/h_indx.c deleted file mode 100644 index a211cc7fa0f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/h_indx.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -shortint h_indx(a, b, la, lb) char *a, *b; ftnlen la, lb; -#else -shortint h_indx(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -ftnlen i, n; -char *s, *t, *bend; - -n = la - lb + 1; -bend = b + lb; - -for(i = 0 ; i < n ; ++i) - { - s = a + i; - t = b; - while(t < bend) - if(*s++ != *t++) - goto no; - return((shortint)i+1); - no: ; - } -return(0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/h_len.c b/gnu/usr.bin/gcc/f/runtime/libF77/h_len.c deleted file mode 100644 index 00a2151bfa1..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/h_len.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -shortint h_len(s, n) char *s; ftnlen n; -#else -shortint h_len(char *s, ftnlen n) -#endif -{ -return(n); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/h_mod.c b/gnu/usr.bin/gcc/f/runtime/libF77/h_mod.c deleted file mode 100644 index 43431c1c503..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/h_mod.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -shortint h_mod(a,b) short *a, *b; -#else -shortint h_mod(short *a, short *b) -#endif -{ -return( *a % *b); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/h_nint.c b/gnu/usr.bin/gcc/f/runtime/libF77/h_nint.c deleted file mode 100644 index 0af3735da42..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/h_nint.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double floor(); -shortint h_nint(x) real *x; -#else -#undef abs -#include <math.h> -shortint h_nint(real *x) -#endif -{ -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/h_sign.c b/gnu/usr.bin/gcc/f/runtime/libF77/h_sign.c deleted file mode 100644 index 7b06c157a74..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/h_sign.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -shortint h_sign(a,b) shortint *a, *b; -#else -shortint h_sign(shortint *a, shortint *b) -#endif -{ -shortint x; -x = (*a >= 0 ? *a : - *a); -return( *b >= 0 ? x : -x); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/hl_ge.c b/gnu/usr.bin/gcc/f/runtime/libF77/hl_ge.c deleted file mode 100644 index 4c29527065a..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/hl_ge.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -shortlogical hl_ge(a,b,la,lb) char *a, *b; ftnlen la, lb; -#else -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -shortlogical hl_ge(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -return(s_cmp(a,b,la,lb) >= 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/hl_gt.c b/gnu/usr.bin/gcc/f/runtime/libF77/hl_gt.c deleted file mode 100644 index c4f345a0859..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/hl_gt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -shortlogical hl_gt(a,b,la,lb) char *a, *b; ftnlen la, lb; -#else -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -shortlogical hl_gt(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -return(s_cmp(a,b,la,lb) > 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/hl_le.c b/gnu/usr.bin/gcc/f/runtime/libF77/hl_le.c deleted file mode 100644 index a9cce596c71..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/hl_le.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -shortlogical hl_le(a,b,la,lb) char *a, *b; ftnlen la, lb; -#else -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -shortlogical hl_le(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -return(s_cmp(a,b,la,lb) <= 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/hl_lt.c b/gnu/usr.bin/gcc/f/runtime/libF77/hl_lt.c deleted file mode 100644 index 162d919c3b4..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/hl_lt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -shortlogical hl_lt(a,b,la,lb) char *a, *b; ftnlen la, lb; -#else -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -shortlogical hl_lt(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -return(s_cmp(a,b,la,lb) < 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/i_abs.c b/gnu/usr.bin/gcc/f/runtime/libF77/i_abs.c deleted file mode 100644 index be21295aaa1..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/i_abs.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -integer i_abs(x) integer *x; -#else -integer i_abs(integer *x) -#endif -{ -if(*x >= 0) - return(*x); -return(- *x); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/i_dim.c b/gnu/usr.bin/gcc/f/runtime/libF77/i_dim.c deleted file mode 100644 index 6e1b1707b55..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/i_dim.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -integer i_dim(a,b) integer *a, *b; -#else -integer i_dim(integer *a, integer *b) -#endif -{ -return( *a > *b ? *a - *b : 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/i_dnnt.c b/gnu/usr.bin/gcc/f/runtime/libF77/i_dnnt.c deleted file mode 100644 index 8fcecb68200..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/i_dnnt.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double floor(); -integer i_dnnt(x) doublereal *x; -#else -#undef abs -#include <math.h> -integer i_dnnt(doublereal *x) -#endif -{ -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/i_indx.c b/gnu/usr.bin/gcc/f/runtime/libF77/i_indx.c deleted file mode 100644 index 96e7bc51ba8..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/i_indx.c +++ /dev/null @@ -1,26 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -integer i_indx(a, b, la, lb) char *a, *b; ftnlen la, lb; -#else -integer i_indx(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -ftnlen i, n; -char *s, *t, *bend; - -n = la - lb + 1; -bend = b + lb; - -for(i = 0 ; i < n ; ++i) - { - s = a + i; - t = b; - while(t < bend) - if(*s++ != *t++) - goto no; - return(i+1); - no: ; - } -return(0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/i_len.c b/gnu/usr.bin/gcc/f/runtime/libF77/i_len.c deleted file mode 100644 index 4020fee4618..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/i_len.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -integer i_len(s, n) char *s; ftnlen n; -#else -integer i_len(char *s, ftnlen n) -#endif -{ -return(n); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/i_mod.c b/gnu/usr.bin/gcc/f/runtime/libF77/i_mod.c deleted file mode 100644 index 6937c421357..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/i_mod.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -integer i_mod(a,b) integer *a, *b; -#else -integer i_mod(integer *a, integer *b) -#endif -{ -return( *a % *b); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/i_nint.c b/gnu/usr.bin/gcc/f/runtime/libF77/i_nint.c deleted file mode 100644 index c0f6795171f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/i_nint.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double floor(); -integer i_nint(x) real *x; -#else -#undef abs -#include <math.h> -integer i_nint(real *x) -#endif -{ -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/i_sign.c b/gnu/usr.bin/gcc/f/runtime/libF77/i_sign.c deleted file mode 100644 index 94009b86e6f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/i_sign.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -integer i_sign(a,b) integer *a, *b; -#else -integer i_sign(integer *a, integer *b) -#endif -{ -integer x; -x = (*a >= 0 ? *a : - *a); -return( *b >= 0 ? x : -x); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/iargc_.c b/gnu/usr.bin/gcc/f/runtime/libF77/iargc_.c deleted file mode 100644 index 29614ec6595..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/iargc_.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -ftnint iargc_() -#else -ftnint iargc_(void) -#endif -{ -extern int xargc; -return ( xargc - 1 ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/l_ge.c b/gnu/usr.bin/gcc/f/runtime/libF77/l_ge.c deleted file mode 100644 index 86b4a1f5a7f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/l_ge.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -logical l_ge(a,b,la,lb) char *a, *b; ftnlen la, lb; -#else -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -logical l_ge(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -return(s_cmp(a,b,la,lb) >= 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/l_gt.c b/gnu/usr.bin/gcc/f/runtime/libF77/l_gt.c deleted file mode 100644 index c4b52f5bf7d..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/l_gt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -logical l_gt(a,b,la,lb) char *a, *b; ftnlen la, lb; -#else -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -logical l_gt(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -return(s_cmp(a,b,la,lb) > 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/l_le.c b/gnu/usr.bin/gcc/f/runtime/libF77/l_le.c deleted file mode 100644 index f2740a23814..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/l_le.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -logical l_le(a,b,la,lb) char *a, *b; ftnlen la, lb; -#else -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -logical l_le(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -return(s_cmp(a,b,la,lb) <= 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/l_lt.c b/gnu/usr.bin/gcc/f/runtime/libF77/l_lt.c deleted file mode 100644 index c48dc946f9a..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/l_lt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern integer s_cmp(); -logical l_lt(a,b,la,lb) char *a, *b; ftnlen la, lb; -#else -extern integer s_cmp(char *, char *, ftnlen, ftnlen); -logical l_lt(char *a, char *b, ftnlen la, ftnlen lb) -#endif -{ -return(s_cmp(a,b,la,lb) < 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/lbitbits.c b/gnu/usr.bin/gcc/f/runtime/libF77/lbitbits.c deleted file mode 100644 index 75e9f9c603f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/lbitbits.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "f2c.h" - -#ifndef LONGBITS -#define LONGBITS 32 -#endif - - integer -#ifdef KR_headers -lbit_bits(a, b, len) integer a, b, len; -#else -lbit_bits(integer a, integer b, integer len) -#endif -{ - /* Assume 2's complement arithmetic */ - - unsigned long x, y; - - x = (unsigned long) a; - y = (unsigned long)-1L; - x >>= b; - y <<= len; - return (integer)(x & ~y); - } - - integer -#ifdef KR_headers -lbit_cshift(a, b, len) integer a, b, len; -#else -lbit_cshift(integer a, integer b, integer len) -#endif -{ - unsigned long x, y, z; - - x = (unsigned long)a; - if (len <= 0) { - if (len == 0) - return 0; - goto full_len; - } - if (len >= LONGBITS) { - full_len: - if (b >= 0) { - b %= LONGBITS; - return (integer)(x << b | x >> LONGBITS -b ); - } - b = -b; - b %= LONGBITS; - return (integer)(x << LONGBITS - b | x >> b); - } - y = z = (unsigned long)-1; - y <<= len; - z &= ~y; - y &= x; - x &= z; - if (b >= 0) { - b %= len; - return (integer)(y | z & (x << b | x >> len - b)); - } - b = -b; - b %= len; - return (integer)(y | z & (x >> b | x << len - b)); - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/lbitshft.c b/gnu/usr.bin/gcc/f/runtime/libF77/lbitshft.c deleted file mode 100644 index 81b0fdbeaba..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/lbitshft.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "f2c.h" - - integer -#ifdef KR_headers -lbit_shift(a, b) integer a; integer b; -#else -lbit_shift(integer a, integer b) -#endif -{ - return b >= 0 ? a << b : (integer)((uinteger)a >> -b); - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/main.c b/gnu/usr.bin/gcc/f/runtime/libF77/main.c deleted file mode 100644 index 7ecd3761cd3..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/main.c +++ /dev/null @@ -1,134 +0,0 @@ -/* STARTUP PROCEDURE FOR UNIX FORTRAN PROGRAMS */ - -#include <stdio.h> -#include <signal.h> - -#ifndef SIGIOT -#ifdef SIGABRT -#define SIGIOT SIGABRT -#endif -#endif - -#ifndef KR_headers -#undef VOID -#include <stdlib.h> -#endif - -#ifndef VOID -#define VOID void -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef NO__STDC -#define ONEXIT onexit -extern VOID f_exit(); -#else -#ifndef KR_headers -extern void f_exit(void); -#ifndef NO_ONEXIT -#define ONEXIT atexit -extern int atexit(void (*)(void)); -#endif -#else -#ifndef NO_ONEXIT -#define ONEXIT onexit -extern VOID f_exit(); -#endif -#endif -#endif - -#ifdef KR_headers -extern VOID f_init(), sig_die(); -extern int MAIN__(); -#define Int /* int */ -#else -extern void f_init(void), sig_die(char*, int); -extern int MAIN__(void); -#define Int int -#endif - -static VOID sigfdie(Int n) -{ -sig_die("Floating Exception", 1); -} - - -static VOID sigidie(Int n) -{ -sig_die("IOT Trap", 1); -} - -#ifdef SIGQUIT -static VOID sigqdie(Int n) -{ -sig_die("Quit signal", 1); -} -#endif - - -static VOID sigindie(Int n) -{ -sig_die("Interrupt", 0); -} - -static VOID sigtdie(Int n) -{ -sig_die("Killed", 0); -} - -#ifdef SIGTRAP -static VOID sigtrdie(Int n) -{ -sig_die("Trace trap", 1); -} -#endif - - -int xargc; -char **xargv; - -#ifdef KR_headers -main(argc, argv) int argc; char **argv; -#else -main(int argc, char **argv) -#endif -{ -xargc = argc; -xargv = argv; -signal(SIGFPE, sigfdie); /* ignore underflow, enable overflow */ -#ifdef SIGIOT -signal(SIGIOT, sigidie); -#endif -#ifdef SIGTRAP -signal(SIGTRAP, sigtrdie); -#endif -#ifdef SIGQUIT -if(signal(SIGQUIT,sigqdie) == SIG_IGN) - signal(SIGQUIT, SIG_IGN); -#endif -if(signal(SIGINT, sigindie) == SIG_IGN) - signal(SIGINT, SIG_IGN); -signal(SIGTERM,sigtdie); - -#ifdef pdp11 - ldfps(01200); /* detect overflow as an exception */ -#endif - -f_init(); -#ifndef NO_ONEXIT -ONEXIT(f_exit); -#endif -MAIN__(); -#ifdef NO_ONEXIT -f_exit(); -#endif -exit(0); /* exit(0) rather than return(0) to bypass Cray bug */ -return 0; /* For compilers that complain of missing return values; */ - /* others will complain that this is unreachable code. */ -} -#ifdef __cplusplus - } -#endif diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_ci.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_ci.c deleted file mode 100644 index 37e2ce0f2eb..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_ci.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -VOID pow_ci(p, a, b) /* p = a**b */ - complex *p, *a; integer *b; -#else -extern void pow_zi(doublecomplex*, doublecomplex*, integer*); -void pow_ci(complex *p, complex *a, integer *b) /* p = a**b */ -#endif -{ -doublecomplex p1, a1; - -a1.r = a->r; -a1.i = a->i; - -pow_zi(&p1, &a1, b); - -p->r = p1.r; -p->i = p1.i; -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_dd.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_dd.c deleted file mode 100644 index d0dd0ff2744..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_dd.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double pow(); -double pow_dd(ap, bp) doublereal *ap, *bp; -#else -#undef abs -#include <math.h> -double pow_dd(doublereal *ap, doublereal *bp) -#endif -{ -return(pow(*ap, *bp) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_di.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_di.c deleted file mode 100644 index affed625a91..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_di.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double pow_di(ap, bp) doublereal *ap; integer *bp; -#else -double pow_di(doublereal *ap, integer *bp) -#endif -{ -double pow, x; -integer n; -unsigned long u; - -pow = 1; -x = *ap; -n = *bp; - -if(n != 0) - { - if(n < 0) - { - n = -n; - x = 1/x; - } - for(u = n; ; ) - { - if(u & 01) - pow *= x; - if(u >>= 1) - x *= x; - else - break; - } - } -return(pow); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_hh.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_hh.c deleted file mode 100644 index 24a019734da..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_hh.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -shortint pow_hh(ap, bp) shortint *ap, *bp; -#else -shortint pow_hh(shortint *ap, shortint *bp) -#endif -{ - shortint pow, x, n; - unsigned u; - - x = *ap; - n = *bp; - - if (n <= 0) { - if (n == 0 || x == 1) - return 1; - if (x != -1) - return x == 0 ? 1/x : 0; - n = -n; - } - u = n; - for(pow = 1; ; ) - { - if(u & 01) - pow *= x; - if(u >>= 1) - x *= x; - else - break; - } - return(pow); - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_ii.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_ii.c deleted file mode 100644 index 84d1c7e0b5e..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_ii.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -integer pow_ii(ap, bp) integer *ap, *bp; -#else -integer pow_ii(integer *ap, integer *bp) -#endif -{ - integer pow, x, n; - unsigned long u; - - x = *ap; - n = *bp; - - if (n <= 0) { - if (n == 0 || x == 1) - return 1; - if (x != -1) - return x == 0 ? 1/x : 0; - n = -n; - } - u = n; - for(pow = 1; ; ) - { - if(u & 01) - pow *= x; - if(u >>= 1) - x *= x; - else - break; - } - return(pow); - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_qq.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_qq.c deleted file mode 100644 index 3bc80e05f7f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_qq.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -longint pow_qq(ap, bp) longint *ap, *bp; -#else -longint pow_qq(longint *ap, longint *bp) -#endif -{ - longint pow, x, n; - unsigned long long u; /* system-dependent */ - - x = *ap; - n = *bp; - - if (n <= 0) { - if (n == 0 || x == 1) - return 1; - if (x != -1) - return x == 0 ? 1/x : 0; - n = -n; - } - u = n; - for(pow = 1; ; ) - { - if(u & 01) - pow *= x; - if(u >>= 1) - x *= x; - else - break; - } - return(pow); - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_ri.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_ri.c deleted file mode 100644 index 6e5816bbf10..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_ri.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double pow_ri(ap, bp) real *ap; integer *bp; -#else -double pow_ri(real *ap, integer *bp) -#endif -{ -double pow, x; -integer n; -unsigned long u; - -pow = 1; -x = *ap; -n = *bp; - -if(n != 0) - { - if(n < 0) - { - n = -n; - x = 1/x; - } - for(u = n; ; ) - { - if(u & 01) - pow *= x; - if(u >>= 1) - x *= x; - else - break; - } - } -return(pow); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_zi.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_zi.c deleted file mode 100644 index 167e6acbc6a..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_zi.c +++ /dev/null @@ -1,51 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -VOID pow_zi(p, a, b) /* p = a**b */ - doublecomplex *p, *a; integer *b; -#else -extern void z_div(doublecomplex*, doublecomplex*, doublecomplex*); -void pow_zi(doublecomplex *p, doublecomplex *a, integer *b) /* p = a**b */ -#endif -{ -integer n; -unsigned long u; -double t; -doublecomplex x; -static doublecomplex one = {1.0, 0.0}; - -n = *b; -p->r = 1; -p->i = 0; - -if(n == 0) - return; -if(n < 0) - { - n = -n; - z_div(&x, &one, a); - } -else - { - x.r = a->r; - x.i = a->i; - } - -for(u = n; ; ) - { - if(u & 01) - { - t = p->r * x.r - p->i * x.i; - p->i = p->r * x.i + p->i * x.r; - p->r = t; - } - if(u >>= 1) - { - t = x.r * x.r - x.i * x.i; - x.i = 2 * x.r * x.i; - x.r = t; - } - else - break; - } -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/pow_zz.c b/gnu/usr.bin/gcc/f/runtime/libF77/pow_zz.c deleted file mode 100644 index 20faf29cfb8..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/pow_zz.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double log(), exp(), cos(), sin(), atan2(), f__cabs(); -VOID pow_zz(r,a,b) doublecomplex *r, *a, *b; -#else -#undef abs -#include <math.h> -extern double f__cabs(double,double); -void pow_zz(doublecomplex *r, doublecomplex *a, doublecomplex *b) -#endif -{ -double logr, logi, x, y; - -logr = log( f__cabs(a->r, a->i) ); -logi = atan2(a->i, a->r); - -x = exp( logr * b->r - logi * b->i ); -y = logr * b->i + logi * b->r; - -r->r = x * cos(y); -r->i = x * sin(y); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/qbitbits.c b/gnu/usr.bin/gcc/f/runtime/libF77/qbitbits.c deleted file mode 100644 index ad4ac963ce2..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/qbitbits.c +++ /dev/null @@ -1,66 +0,0 @@ -#include "f2c.h" - -#ifndef LONGBITS -#define LONGBITS 32 -#endif - -#ifndef LONG8BITS -#define LONG8BITS (2*LONGBITS) -#endif - - integer -#ifdef KR_headers -qbit_bits(a, b, len) longint a; integer b, len; -#else -qbit_bits(longint a, integer b, integer len) -#endif -{ - /* Assume 2's complement arithmetic */ - - ulongint x, y; - - x = (ulongint) a; - y = (ulongint)-1L; - x >>= b; - y <<= len; - return (longint)(x & y); - } - - longint -#ifdef KR_headers -qbit_cshift(a, b, len) longint a; integer b, len; -#else -qbit_cshift(longint a, integer b, integer len) -#endif -{ - ulongint x, y, z; - - x = (ulongint)a; - if (len <= 0) { - if (len == 0) - return 0; - goto full_len; - } - if (len >= LONG8BITS) { - full_len: - if (b >= 0) { - b %= LONG8BITS; - return (longint)(x << b | x >> LONG8BITS - b ); - } - b = -b; - b %= LONG8BITS; - return (longint)(x << LONG8BITS - b | x >> b); - } - y = z = (unsigned long)-1; - y <<= len; - z &= ~y; - y &= x; - x &= z; - if (b >= 0) { - b %= len; - return (longint)(y | z & (x << b | x >> len - b)); - } - b = -b; - b %= len; - return (longint)(y | z & (x >> b | x << len - b)); - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/qbitshft.c b/gnu/usr.bin/gcc/f/runtime/libF77/qbitshft.c deleted file mode 100644 index 87fffb91ff8..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/qbitshft.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "f2c.h" - - longint -#ifdef KR_headers -qbit_shift(a, b) longint a; integer b; -#else -qbit_shift(longint a, integer b) -#endif -{ - return b >= 0 ? a << b : (longint)((ulongint)a >> -b); - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_abs.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_abs.c deleted file mode 100644 index 7b222961d16..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_abs.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double r_abs(x) real *x; -#else -double r_abs(real *x) -#endif -{ -if(*x >= 0) - return(*x); -return(- *x); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_acos.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_acos.c deleted file mode 100644 index 330f88a3092..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_acos.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double acos(); -double r_acos(x) real *x; -#else -#undef abs -#include <math.h> -double r_acos(real *x) -#endif -{ -return( acos(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_asin.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_asin.c deleted file mode 100644 index 45ece4b749e..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_asin.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double asin(); -double r_asin(x) real *x; -#else -#undef abs -#include <math.h> -double r_asin(real *x) -#endif -{ -return( asin(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_atan.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_atan.c deleted file mode 100644 index 36479c915b0..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_atan.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double atan(); -double r_atan(x) real *x; -#else -#undef abs -#include <math.h> -double r_atan(real *x) -#endif -{ -return( atan(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_atn2.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_atn2.c deleted file mode 100644 index 9347e1f13a9..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_atn2.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double atan2(); -double r_atn2(x,y) real *x, *y; -#else -#undef abs -#include <math.h> -double r_atn2(real *x, real *y) -#endif -{ -return( atan2(*x,*y) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_cnjg.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_cnjg.c deleted file mode 100644 index e127ca969c4..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_cnjg.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -VOID r_cnjg(r, z) complex *r, *z; -#else -VOID r_cnjg(complex *r, complex *z) -#endif -{ -r->r = z->r; -r->i = - z->i; -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_cos.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_cos.c deleted file mode 100644 index 5bda158cee9..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_cos.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double cos(); -double r_cos(x) real *x; -#else -#undef abs -#include <math.h> -double r_cos(real *x) -#endif -{ -return( cos(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_cosh.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_cosh.c deleted file mode 100644 index 7ae72cc0cef..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_cosh.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double cosh(); -double r_cosh(x) real *x; -#else -#undef abs -#include <math.h> -double r_cosh(real *x) -#endif -{ -return( cosh(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_dim.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_dim.c deleted file mode 100644 index baca95cd9e4..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_dim.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double r_dim(a,b) real *a, *b; -#else -double r_dim(real *a, real *b) -#endif -{ -return( *a > *b ? *a - *b : 0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_exp.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_exp.c deleted file mode 100644 index d1dea75563f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_exp.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double exp(); -double r_exp(x) real *x; -#else -#undef abs -#include <math.h> -double r_exp(real *x) -#endif -{ -return( exp(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_imag.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_imag.c deleted file mode 100644 index d51252bbb79..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_imag.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double r_imag(z) complex *z; -#else -double r_imag(complex *z) -#endif -{ -return(z->i); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_int.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_int.c deleted file mode 100644 index 8378e775726..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_int.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double floor(); -double r_int(x) real *x; -#else -#undef abs -#include <math.h> -double r_int(real *x) -#endif -{ -return( (*x>0) ? floor(*x) : -floor(- *x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_lg10.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_lg10.c deleted file mode 100644 index 51f84201711..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_lg10.c +++ /dev/null @@ -1,15 +0,0 @@ -#include "f2c.h" - -#define log10e 0.43429448190325182765 - -#ifdef KR_headers -double log(); -double r_lg10(x) real *x; -#else -#undef abs -#include <math.h> -double r_lg10(real *x) -#endif -{ -return( log10e * log(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_log.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_log.c deleted file mode 100644 index 4873fb418e8..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_log.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double log(); -double r_log(x) real *x; -#else -#undef abs -#include <math.h> -double r_log(real *x) -#endif -{ -return( log(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_mod.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_mod.c deleted file mode 100644 index faea344a7b7..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_mod.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -#ifdef IEEE_drem -double drem(); -#else -double floor(); -#endif -double r_mod(x,y) real *x, *y; -#else -#ifdef IEEE_drem -double drem(double, double); -#else -#undef abs -#include <math.h> -#endif -double r_mod(real *x, real *y) -#endif -{ -#ifdef IEEE_drem - double xa, ya, z; - if ((ya = *y) < 0.) - ya = -ya; - z = drem(xa = *x, ya); - if (xa > 0) { - if (z < 0) - z += ya; - } - else if (z > 0) - z -= ya; - return z; -#else - double quotient; - if( (quotient = (double)*x / *y) >= 0) - quotient = floor(quotient); - else - quotient = -floor(-quotient); - return(*x - (*y) * quotient ); -#endif -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_nint.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_nint.c deleted file mode 100644 index f5382af660a..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_nint.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double floor(); -double r_nint(x) real *x; -#else -#undef abs -#include <math.h> -double r_nint(real *x) -#endif -{ -return( (*x)>=0 ? - floor(*x + .5) : -floor(.5 - *x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_sign.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_sign.c deleted file mode 100644 index df6d02af00a..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_sign.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double r_sign(a,b) real *a, *b; -#else -double r_sign(real *a, real *b) -#endif -{ -double x; -x = (*a >= 0 ? *a : - *a); -return( *b >= 0 ? x : -x); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_sin.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_sin.c deleted file mode 100644 index 095b9510de9..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_sin.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sin(); -double r_sin(x) real *x; -#else -#undef abs -#include <math.h> -double r_sin(real *x) -#endif -{ -return( sin(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_sinh.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_sinh.c deleted file mode 100644 index 3bf4bb138be..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_sinh.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sinh(); -double r_sinh(x) real *x; -#else -#undef abs -#include <math.h> -double r_sinh(real *x) -#endif -{ -return( sinh(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_sqrt.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_sqrt.c deleted file mode 100644 index d0203d3d19b..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_sqrt.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sqrt(); -double r_sqrt(x) real *x; -#else -#undef abs -#include <math.h> -double r_sqrt(real *x) -#endif -{ -return( sqrt(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_tan.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_tan.c deleted file mode 100644 index fc0009e4774..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_tan.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double tan(); -double r_tan(x) real *x; -#else -#undef abs -#include <math.h> -double r_tan(real *x) -#endif -{ -return( tan(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/r_tanh.c b/gnu/usr.bin/gcc/f/runtime/libF77/r_tanh.c deleted file mode 100644 index 818c6a8451b..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/r_tanh.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double tanh(); -double r_tanh(x) real *x; -#else -#undef abs -#include <math.h> -double r_tanh(real *x) -#endif -{ -return( tanh(*x) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/s_cat.c b/gnu/usr.bin/gcc/f/runtime/libF77/s_cat.c deleted file mode 100644 index 7bfb11eb881..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/s_cat.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Unless compiled with -DNO_OVERWRITE, this variant of s_cat allows the - * target of a concatenation to appear on its right-hand side (contrary - * to the Fortran 77 Standard, but in accordance with Fortran 90). - */ - -#include "f2c.h" -#ifndef NO_OVERWRITE -#include <stdio.h> -#undef abs -#ifdef KR_headers - extern char *F77_aloc(); - extern void free(); - extern void exit_(); -#else -#include <stdlib.h> - extern char *F77_aloc(ftnlen, char*); -#endif -#include <string.h> -#endif /* NO_OVERWRITE */ - - VOID -#ifdef KR_headers -s_cat(lp, rpp, rnp, np, ll) char *lp, *rpp[]; ftnlen rnp[], *np, ll; -#else -s_cat(char *lp, char *rpp[], ftnlen rnp[], ftnlen *np, ftnlen ll) -#endif -{ - ftnlen i, nc; - char *rp; - ftnlen n = *np; -#ifndef NO_OVERWRITE - ftnlen L, m; - char *lp0, *lp1; - - lp0 = 0; - lp1 = lp; - L = ll; - i = 0; - while(i < n) { - rp = rpp[i]; - m = rnp[i++]; - if (rp >= lp1 || rp + m <= lp) { - if ((L -= m) <= 0) { - n = i; - break; - } - lp1 += m; - continue; - } - lp0 = lp; - lp = lp1 = F77_aloc(L = ll, "s_cat"); - break; - } - lp1 = lp; -#endif /* NO_OVERWRITE */ - for(i = 0 ; i < n ; ++i) { - nc = ll; - if(rnp[i] < nc) - nc = rnp[i]; - ll -= nc; - rp = rpp[i]; - while(--nc >= 0) - *lp++ = *rp++; - } - while(--ll >= 0) - *lp++ = ' '; -#ifndef NO_OVERWRITE - if (lp0) { - memcpy(lp0, lp1, L); - free(lp1); - } -#endif - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/s_cmp.c b/gnu/usr.bin/gcc/f/runtime/libF77/s_cmp.c deleted file mode 100644 index 1e052f28642..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/s_cmp.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "f2c.h" - -/* compare two strings */ - -#ifdef KR_headers -integer s_cmp(a0, b0, la, lb) char *a0, *b0; ftnlen la, lb; -#else -integer s_cmp(char *a0, char *b0, ftnlen la, ftnlen lb) -#endif -{ -register unsigned char *a, *aend, *b, *bend; -a = (unsigned char *)a0; -b = (unsigned char *)b0; -aend = a + la; -bend = b + lb; - -if(la <= lb) - { - while(a < aend) - if(*a != *b) - return( *a - *b ); - else - { ++a; ++b; } - - while(b < bend) - if(*b != ' ') - return( ' ' - *b ); - else ++b; - } - -else - { - while(b < bend) - if(*a == *b) - { ++a; ++b; } - else - return( *a - *b ); - while(a < aend) - if(*a != ' ') - return(*a - ' '); - else ++a; - } -return(0); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/s_copy.c b/gnu/usr.bin/gcc/f/runtime/libF77/s_copy.c deleted file mode 100644 index d1673510c62..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/s_copy.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Unless compiled with -DNO_OVERWRITE, this variant of s_copy allows the - * target of an assignment to appear on its right-hand side (contrary - * to the Fortran 77 Standard, but in accordance with Fortran 90), - * as in a(2:5) = a(4:7) . - */ - -#include "f2c.h" - -/* assign strings: a = b */ - -#ifdef KR_headers -VOID s_copy(a, b, la, lb) register char *a, *b; ftnlen la, lb; -#else -void s_copy(register char *a, register char *b, ftnlen la, ftnlen lb) -#endif -{ - register char *aend, *bend; - - aend = a + la; - - if(la <= lb) -#ifndef NO_OVERWRITE - if (a <= b || a >= b + la) -#endif - while(a < aend) - *a++ = *b++; -#ifndef NO_OVERWRITE - else - for(b += la; a < aend; ) - *--aend = *--b; -#endif - - else { - bend = b + lb; -#ifndef NO_OVERWRITE - if (a <= b || a >= bend) -#endif - while(b < bend) - *a++ = *b++; -#ifndef NO_OVERWRITE - else { - a += lb; - while(b < bend) - *--a = *--bend; - a += lb; - } -#endif - while(a < aend) - *a++ = ' '; - } - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/s_paus.c b/gnu/usr.bin/gcc/f/runtime/libF77/s_paus.c deleted file mode 100644 index 6a2e86e1262..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/s_paus.c +++ /dev/null @@ -1,88 +0,0 @@ -#include <stdio.h> -#include "f2c.h" -#define PAUSESIG 15 - -#ifdef KR_headers -#define Void /* void */ -#define Int /* int */ -#else -#define Void void -#define Int int -#undef abs -#undef min -#undef max -#include <stdlib.h> -#include <signal.h> -#ifdef __cplusplus -extern "C" { -#endif -extern int getpid(void), isatty(int), pause(void); -#endif - -extern VOID f_exit(Void); - - static VOID -waitpause(Int n) -{ n = n; /* shut up compiler warning */ - return; - } - - static VOID -#ifdef KR_headers -s_1paus(fin) FILE *fin; -#else -s_1paus(FILE *fin) -#endif -{ - fprintf(stderr, - "To resume execution, type go. Other input will terminate the job.\n"); - fflush(stderr); - if( getc(fin)!='g' || getc(fin)!='o' || getc(fin)!='\n' ) { - fprintf(stderr, "STOP\n"); -#ifdef NO_ONEXIT - f_exit(); -#endif - exit(0); - } - } - - int -#ifdef KR_headers -s_paus(s, n) char *s; ftnlen n; -#else -s_paus(char *s, ftnlen n) -#endif -{ - fprintf(stderr, "PAUSE "); - if(n > 0) - fprintf(stderr, " %.*s", (int)n, s); - fprintf(stderr, " statement executed\n"); - if( isatty(fileno(stdin)) ) - s_1paus(stdin); - else { -#if defined (MSDOS) && !defined (GO32) - FILE *fin; - fin = fopen("con", "r"); - if (!fin) { - fprintf(stderr, "s_paus: can't open con!\n"); - fflush(stderr); - exit(1); - } - s_1paus(fin); - fclose(fin); -#else - fprintf(stderr, - "To resume execution, execute a kill -%d %d command\n", - PAUSESIG, getpid() ); - signal(PAUSESIG, waitpause); - fflush(stderr); - pause(); -#endif - } - fprintf(stderr, "Execution resumes after PAUSE.\n"); - fflush(stderr); - return 0; /* NOT REACHED */ -#ifdef __cplusplus - } -#endif -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/s_rnge.c b/gnu/usr.bin/gcc/f/runtime/libF77/s_rnge.c deleted file mode 100644 index 189b5247ced..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/s_rnge.c +++ /dev/null @@ -1,26 +0,0 @@ -#include <stdio.h> -#include "f2c.h" - -/* called when a subscript is out of range */ - -#ifdef KR_headers -extern VOID sig_die(); -integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line; -#else -extern VOID sig_die(char*,int); -integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line) -#endif -{ -register int i; - -fprintf(stderr, "Subscript out of range on file line %ld, procedure ", line); -while((i = *procn) && i != '_' && i != ' ') - putc(*procn++, stderr); -fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ", offset+1); -while((i = *varn) && i != ' ') - putc(*varn++, stderr); -sig_die(".", 1); -#ifdef __cplusplus -return 0; -#endif -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/s_stop.c b/gnu/usr.bin/gcc/f/runtime/libF77/s_stop.c deleted file mode 100644 index 2e3f1035b30..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/s_stop.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <stdio.h> -#include "f2c.h" - -#ifdef KR_headers -extern void f_exit(); -VOID s_stop(s, n) char *s; ftnlen n; -#else -#undef abs -#undef min -#undef max -#include <stdlib.h> -#ifdef __cplusplus -extern "C" { -#endif -void f_exit(void); - -int s_stop(char *s, ftnlen n) -#endif -{ -int i; - -if(n > 0) - { - fprintf(stderr, "STOP "); - for(i = 0; i<n ; ++i) - putc(*s++, stderr); - fprintf(stderr, " statement executed\n"); - } -#ifdef NO_ONEXIT -f_exit(); -#endif -exit(0); -#ifdef __cplusplus -return 0; /* NOT REACHED */ -} -#endif -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/sig_die.c b/gnu/usr.bin/gcc/f/runtime/libF77/sig_die.c deleted file mode 100644 index bebb1e7b8f7..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/sig_die.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <stdio.h> -#include <signal.h> - -#ifndef SIGIOT -#ifdef SIGABRT -#define SIGIOT SIGABRT -#endif -#endif - -#ifdef KR_headers -void sig_die(s, kill) register char *s; int kill; -#else -#include <stdlib.h> -#ifdef __cplusplus -extern "C" { -#endif - extern void f_exit(void); - -void sig_die(register char *s, int kill) -#endif -{ - /* print error message, then clear buffers */ - fprintf(stderr, "%s\n", s); - - if(kill) - { - fflush(stderr); - f_exit(); - fflush(stderr); - /* now get a core */ -#ifdef SIGIOT - signal(SIGIOT, SIG_DFL); -#endif - abort(); - } - else { -#ifdef NO_ONEXIT - f_exit(); -#endif - exit(1); - } - } -#ifdef __cplusplus -} -#endif diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/signal_.c b/gnu/usr.bin/gcc/f/runtime/libF77/signal_.c deleted file mode 100644 index d848bf564d6..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/signal_.c +++ /dev/null @@ -1,29 +0,0 @@ -#include "f2c.h" - -#ifndef RETSIGTYPE -/* we shouldn't rely on this... */ -#ifdef KR_headers -#define RETSIGTYPE int -#else -#define RETSIGTYPE void -#endif -#endif -typedef RETSIGTYPE (*sig_type)(); - -#ifdef KR_headers -extern sig_type signal(); - -ftnint signal_(sigp, proc) integer *sigp; sig_type proc; -#else -#include <signal.h> -typedef int (*sig_proc)(int); - -ftnint signal_(integer *sigp, sig_proc proc) -#endif -{ - int sig; - sig = (int)*sigp; - - return (ftnint)signal(sig, (sig_type)proc); - return 0; - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/system_.c b/gnu/usr.bin/gcc/f/runtime/libF77/system_.c deleted file mode 100644 index 71884166e94..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/system_.c +++ /dev/null @@ -1,36 +0,0 @@ -/* f77 interface to system routine */ - -#include "f2c.h" - -#ifdef KR_headers -extern char *F77_aloc(); - - integer -system_(s, n) register char *s; ftnlen n; -#else -#undef abs -#undef min -#undef max -#include <stdlib.h> -extern char *F77_aloc(ftnlen, char*); - - integer -system_(register char *s, ftnlen n) -#endif -{ - char buff0[256], *buff; - register char *bp, *blast; - integer rv; - - buff = bp = n < sizeof(buff0) - ? buff0 : F77_aloc(n+1, "system_"); - blast = bp + n; - - while(bp < blast && *s) - *bp++ = *s++; - *bp = 0; - rv = system(buff); - if (buff != buff0) - free(buff); - return rv; - } diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/z_abs.c b/gnu/usr.bin/gcc/f/runtime/libF77/z_abs.c deleted file mode 100644 index 7e67ad2957f..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/z_abs.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double f__cabs(); -double z_abs(z) doublecomplex *z; -#else -double f__cabs(double, double); -double z_abs(doublecomplex *z) -#endif -{ -return( f__cabs( z->r, z->i ) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/z_cos.c b/gnu/usr.bin/gcc/f/runtime/libF77/z_cos.c deleted file mode 100644 index ef02be4c38c..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/z_cos.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sin(), cos(), sinh(), cosh(); -VOID z_cos(r, z) doublecomplex *r, *z; -#else -#undef abs -#include <math.h> -void z_cos(doublecomplex *r, doublecomplex *z) -#endif -{ -r->r = cos(z->r) * cosh(z->i); -r->i = - sin(z->r) * sinh(z->i); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/z_div.c b/gnu/usr.bin/gcc/f/runtime/libF77/z_div.c deleted file mode 100644 index fd53733e882..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/z_div.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -extern void sig_die(); -VOID z_div(c, a, b) doublecomplex *a, *b, *c; -#else -extern void sig_die(char*, int); -void z_div(doublecomplex *c, doublecomplex *a, doublecomplex *b) -#endif -{ -double ratio, den; -double abr, abi; - -if( (abr = b->r) < 0.) - abr = - abr; -if( (abi = b->i) < 0.) - abi = - abi; -if( abr <= abi ) - { - if(abi == 0) - sig_die("complex division by zero", 1); - ratio = b->r / b->i ; - den = b->i * (1 + ratio*ratio); - c->r = (a->r*ratio + a->i) / den; - c->i = (a->i*ratio - a->r) / den; - } - -else - { - ratio = b->i / b->r ; - den = b->r * (1 + ratio*ratio); - c->r = (a->r + a->i*ratio) / den; - c->i = (a->i - a->r*ratio) / den; - } - -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/z_exp.c b/gnu/usr.bin/gcc/f/runtime/libF77/z_exp.c deleted file mode 100644 index 4e94a14b4cc..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/z_exp.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double exp(), cos(), sin(); -VOID z_exp(r, z) doublecomplex *r, *z; -#else -#undef abs -#include <math.h> -void z_exp(doublecomplex *r, doublecomplex *z) -#endif -{ -double expx; - -expx = exp(z->r); -r->r = expx * cos(z->i); -r->i = expx * sin(z->i); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/z_log.c b/gnu/usr.bin/gcc/f/runtime/libF77/z_log.c deleted file mode 100644 index 097c0a1b120..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/z_log.c +++ /dev/null @@ -1,16 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double log(), f__cabs(), atan2(); -VOID z_log(r, z) doublecomplex *r, *z; -#else -#undef abs -#include <math.h> -extern double f__cabs(double, double); -void z_log(doublecomplex *r, doublecomplex *z) -#endif -{ - -r->i = atan2(z->i, z->r); -r->r = log( f__cabs( z->r, z->i ) ); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/z_sin.c b/gnu/usr.bin/gcc/f/runtime/libF77/z_sin.c deleted file mode 100644 index dece95e5c60..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/z_sin.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sin(), cos(), sinh(), cosh(); -VOID z_sin(r, z) doublecomplex *r, *z; -#else -#undef abs -#include <math.h> -void z_sin(doublecomplex *r, doublecomplex *z) -#endif -{ -r->r = sin(z->r) * cosh(z->i); -r->i = cos(z->r) * sinh(z->i); -} diff --git a/gnu/usr.bin/gcc/f/runtime/libF77/z_sqrt.c b/gnu/usr.bin/gcc/f/runtime/libF77/z_sqrt.c deleted file mode 100644 index a469703129b..00000000000 --- a/gnu/usr.bin/gcc/f/runtime/libF77/z_sqrt.c +++ /dev/null @@ -1,29 +0,0 @@ -#include "f2c.h" - -#ifdef KR_headers -double sqrt(), f__cabs(); -VOID z_sqrt(r, z) doublecomplex *r, *z; -#else -#undef abs -#include <math.h> -extern double f__cabs(double, double); -void z_sqrt(doublecomplex *r, doublecomplex *z) -#endif -{ -double mag; - -if( (mag = f__cabs(z->r, z->i)) == 0.) - r->r = r->i = 0.; -else if(z->r > 0) - { - r->r = sqrt(0.5 * (mag + z->r) ); - r->i = z->i / r->r / 2; - } -else - { - r->i = sqrt(0.5 * (mag - z->r) ); - if(z->i < 0) - r->i = - r->i; - r->r = z->i / r->i / 2; - } -} |