1 /* Copyright (C) 1997 Free Software Foundation, Inc.
2 This file is part of GNU Fortran run-time library.
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 GNU Fortran is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with GNU Fortran; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 #include <math.h> /* for j0 et al */
21 typedef void *sig_proc; /* For now, this will have to do. */
25 extern int G77_abort_0 (void);
26 return G77_abort_0 ();
31 double derf_ (doublereal *x) {
32 extern double G77_derf_0 (doublereal *x);
33 return G77_derf_0 (x);
38 double derfc_ (doublereal *x) {
39 extern double G77_derfc_0 (doublereal *x);
40 return G77_derfc_0 (x);
45 int ef1asc_ (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb) {
46 extern int G77_ef1asc_0 (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb);
47 return G77_ef1asc_0 (a, la, b, lb);
52 integer ef1cmc_ (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb) {
53 extern integer G77_ef1cmc_0 (ftnint *a, ftnlen *la, ftnint *b, ftnlen *lb);
54 return G77_ef1cmc_0 (a, la, b, lb);
59 double erf_ (real *x) {
60 extern double G77_erf_0 (real *x);
66 double erfc_ (real *x) {
67 extern double G77_erfc_0 (real *x);
68 return G77_erfc_0 (x);
73 void exit_ (integer *rc) {
74 extern void G77_exit_0 (integer *rc);
80 void getarg_ (ftnint *n, char *s, ftnlen ls) {
81 extern void G77_getarg_0 (ftnint *n, char *s, ftnlen ls);
82 G77_getarg_0 (n, s, ls);
87 void getenv_ (char *fname, char *value, ftnlen flen, ftnlen vlen) {
88 extern void G77_getenv_0 (char *fname, char *value, ftnlen flen, ftnlen vlen);
89 G77_getenv_0 (fname, value, flen, vlen);
94 ftnint iargc_ (void) {
95 extern ftnint G77_iargc_0 (void);
96 return G77_iargc_0 ();
101 void *signal_ (integer *sigp, sig_proc proc) {
102 extern void *G77_signal_0 (integer *sigp, sig_proc proc);
103 return G77_signal_0 (sigp, proc);
108 integer system_ (char *s, ftnlen n) {
109 extern integer G77_system_0 (char *s, ftnlen n);
110 return G77_system_0 (s, n);
116 extern int G77_flush_0 (void);
117 return G77_flush_0 ();
122 integer ftell_ (integer *Unit) {
123 extern integer G77_ftell_0 (integer *Unit);
124 return G77_ftell_0 (Unit);
129 integer fseek_ (integer *Unit, integer *offset, integer *xwhence) {
130 extern integer G77_fseek_0 (integer *Unit, integer *offset, integer *xwhence);
131 return G77_fseek_0 (Unit, offset, xwhence);
136 integer access_ (const char *name, const char *mode, ftnlen Lname, ftnlen Lmode) {
137 extern integer G77_access_0 (const char *name, const char *mode, ftnlen Lname, ftnlen Lmode);
138 return G77_access_0 (name, mode, Lname, Lmode);
143 integer alarm_ (integer *seconds, sig_proc proc, integer *status) {
144 extern integer G77_alarm_0 (integer *seconds, sig_proc proc);
145 return G77_alarm_0 (seconds, proc);
150 double besj0_ (const real *x) {
156 double besj1_ (const real *x) {
162 double besjn_ (const integer *n, real *x) {
168 double besy0_ (const real *x) {
174 double besy1_ (const real *x) {
180 double besyn_ (const integer *n, real *x) {
186 integer chdir_ (const char *name, const ftnlen Lname) {
187 extern integer G77_chdir_0 (const char *name, const ftnlen Lname);
188 return G77_chdir_0 (name, Lname);
193 integer chmod_ (const char *name, const char *mode, const ftnlen Lname, const ftnlen Lmode) {
194 extern integer G77_chmod_0 (const char *name, const char *mode, const ftnlen Lname, const ftnlen Lmode);
195 return G77_chmod_0 (name, mode, Lname, Lmode);
200 void ctime_ (char *chtime, const ftnlen Lchtime, longint *xstime) {
201 extern void G77_ctime_0 (char *chtime, const ftnlen Lchtime, longint *xstime);
202 G77_ctime_0 (chtime, Lchtime, xstime);
206 #ifdef Ldate_y2kbuggy
207 int date_ (char *buf, ftnlen buf_len) {
208 /* Fail to link, so user sees attempt to invoke non-Y2K-compliant
210 extern int G77_date_y2kbuggy_0 (char *buf, ftnlen buf_len);
211 return G77_date_y2kbuggy_0 (buf, buf_len);
216 int date_y2kbug__ (char *buf, ftnlen buf_len) {
217 /* If user wants to invoke the non-Y2K-compliant routine via
218 an `EXTERNAL' interface, avoiding the warning via g77's
219 `INTRINSIC' interface, force coding of "y2kbug" string in
221 extern int G77_date_y2kbug_0 (char *buf, ftnlen buf_len);
222 return G77_date_y2kbug_0 (buf, buf_len);
227 double dbesj0_ (const double *x) {
233 double dbesj1_ (const double *x) {
239 double dbesjn_ (const integer *n, double *x) {
245 double dbesy0_ (const double *x) {
251 double dbesy1_ (const double *x) {
257 double dbesyn_ (const integer *n, double *x) {
263 double dtime_ (real tarray[2]) {
264 extern double G77_dtime_0 (real tarray[2]);
265 return G77_dtime_0 (tarray);
270 double etime_ (real tarray[2]) {
271 extern double G77_etime_0 (real tarray[2]);
272 return G77_etime_0 (tarray);
277 void fdate_ (char *ret_val, ftnlen ret_val_len) {
278 extern void G77_fdate_0 (char *ret_val, ftnlen ret_val_len);
279 G77_fdate_0 (ret_val, ret_val_len);
284 integer fgetc_ (const integer *lunit, char *c, ftnlen Lc) {
285 extern integer G77_fgetc_0 (const integer *lunit, char *c, ftnlen Lc);
286 return G77_fgetc_0 (lunit, c, Lc);
291 integer fget_ (char *c, const ftnlen Lc) {
292 extern integer G77_fget_0 (char *c, const ftnlen Lc);
293 return G77_fget_0 (c, Lc);
298 int flush1_ (const integer *lunit) {
299 extern int G77_flush1_0 (const integer *lunit);
300 return G77_flush1_0 (lunit);
305 integer fnum_ (integer *lunit) {
306 extern integer G77_fnum_0 (integer *lunit);
307 return G77_fnum_0 (lunit);
312 integer fputc_ (const integer *lunit, const char *c, const ftnlen Lc) {
313 extern integer G77_fputc_0 (const integer *lunit, const char *c, const ftnlen Lc);
314 return G77_fputc_0 (lunit, c, Lc);
319 integer fput_ (const char *c, const ftnlen Lc) {
320 extern integer G77_fput_0 (const char *c, const ftnlen Lc);
321 return G77_fput_0 (c, Lc);
326 integer fstat_ (const integer *lunit, integer statb[13]) {
327 extern integer G77_fstat_0 (const integer *lunit, integer statb[13]);
328 return G77_fstat_0 (lunit, statb);
333 int gerror_ (char *str, ftnlen Lstr) {
334 extern int G77_gerror_0 (char *str, ftnlen Lstr);
335 return G77_gerror_0 (str, Lstr);
340 integer getcwd_ (char *str, const ftnlen Lstr) {
341 extern integer G77_getcwd_0 (char *str, const ftnlen Lstr);
342 return G77_getcwd_0 (str, Lstr);
347 integer getgid_ (void) {
348 extern integer G77_getgid_0 (void);
349 return G77_getgid_0 ();
354 int getlog_ (char *str, const ftnlen Lstr) {
355 extern int G77_getlog_0 (char *str, const ftnlen Lstr);
356 return G77_getlog_0 (str, Lstr);
361 integer getpid_ (void) {
362 extern integer G77_getpid_0 (void);
363 return G77_getpid_0 ();
368 integer getuid_ (void) {
369 extern integer G77_getuid_0 (void);
370 return G77_getuid_0 ();
375 int gmtime_ (const integer *stime, integer tarray[9]) {
376 extern int G77_gmtime_0 (const integer *stime, integer tarray[9]);
377 return G77_gmtime_0 (stime, tarray);
382 integer hostnm_ (char *name, ftnlen Lname) {
383 extern integer G77_hostnm_0 (char *name, ftnlen Lname);
384 return G77_hostnm_0 (name, Lname);
389 int idate_ (int iarray[3]) {
390 extern int G77_idate_0 (int iarray[3]);
391 return G77_idate_0 (iarray);
396 integer ierrno_ (void) {
397 extern integer G77_ierrno_0 (void);
398 return G77_ierrno_0 ();
403 integer irand_ (integer *flag) {
404 extern integer G77_irand_0 (integer *flag);
405 return G77_irand_0 (flag);
410 logical isatty_ (integer *lunit) {
411 extern logical G77_isatty_0 (integer *lunit);
412 return G77_isatty_0 (lunit);
417 int itime_ (integer tarray[3]) {
418 extern int G77_itime_0 (integer tarray[3]);
419 return G77_itime_0 (tarray);
424 integer kill_ (const integer *pid, const integer *signum) {
425 extern integer G77_kill_0 (const integer *pid, const integer *signum);
426 return G77_kill_0 (pid, signum);
431 integer link_ (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2) {
432 extern integer G77_link_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2);
433 return G77_link_0 (path1, path2, Lpath1, Lpath2);
438 integer lnblnk_ (char *str, ftnlen str_len) {
439 extern integer G77_lnblnk_0 (char *str, ftnlen str_len);
440 return G77_lnblnk_0 (str, str_len);
445 integer lstat_ (const char *name, integer statb[13], const ftnlen Lname) {
446 extern integer G77_lstat_0 (const char *name, integer statb[13], const ftnlen Lname);
447 return G77_lstat_0 (name, statb, Lname);
452 int ltime_ (const integer *stime, integer tarray[9]) {
453 extern int G77_ltime_0 (const integer *stime, integer tarray[9]);
454 return G77_ltime_0 (stime, tarray);
459 longint mclock_ (void) {
460 extern longint G77_mclock_0 (void);
461 return G77_mclock_0 ();
466 int perror_ (const char *str, const ftnlen Lstr) {
467 extern int G77_perror_0 (const char *str, const ftnlen Lstr);
468 return G77_perror_0 (str, Lstr);
473 double rand_ (integer *flag) {
474 extern double G77_rand_0 (integer *flag);
475 return G77_rand_0 (flag);
480 integer rename_ (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2) {
481 extern integer G77_rename_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2);
482 return G77_rename_0 (path1, path2, Lpath1, Lpath2);
487 double secnds_ (real *r) {
488 extern double G77_secnds_0 (real *r);
489 return G77_secnds_0 (r);
495 extern double G77_second_0 ();
496 return G77_second_0 ();
501 int sleep_ (const integer *seconds) {
502 extern int G77_sleep_0 (const integer *seconds);
503 return G77_sleep_0 (seconds);
508 int srand_ (const integer *seed) {
509 extern int G77_srand_0 (const integer *seed);
510 return G77_srand_0 (seed);
515 integer stat_ (const char *name, integer statb[13], const ftnlen Lname) {
516 extern integer G77_stat_0 (const char *name, integer statb[13], const ftnlen Lname);
517 return G77_stat_0 (name, statb, Lname);
522 integer symlnk_ (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2) {
523 extern integer G77_symlnk_0 (const char *path1, const char *path2, const ftnlen Lpath1, const ftnlen Lpath2);
524 return G77_symlnk_0 (path1, path2, Lpath1, Lpath2);
529 longint time_ (void) {
530 extern longint G77_time_0 (void);
531 return G77_time_0 ();
536 void ttynam_ (char *ret_val, ftnlen ret_val_len, integer *lunit) {
537 extern void G77_ttynam_0 (char *ret_val, ftnlen ret_val_len, integer *lunit);
538 G77_ttynam_0 (ret_val, ret_val_len, lunit);
543 integer umask_ (integer *mask) {
544 extern integer G77_umask_0 (integer *mask);
545 return G77_umask_0 (mask);
550 integer unlink_ (const char *str, const ftnlen Lstr) {
551 extern integer G77_unlink_0 (const char *str, const ftnlen Lstr);
552 return G77_unlink_0 (str, Lstr);
556 #ifdef Lvxtidt_y2kbuggy
557 int vxtidate_ (integer *m, integer *d, integer *y) {
558 /* Fail to link, so user sees attempt to invoke non-Y2K-compliant
560 extern int G77_vxtidate_y2kbuggy_0 (integer *m, integer *d, integer *y);
561 return G77_vxtidate_y2kbuggy_0 (m, d, y);
565 #ifdef Lvxtidt_y2kbug
566 int vxtidate_y2kbug__ (integer *m, integer *d, integer *y) {
567 /* If user wants to invoke the non-Y2K-compliant routine via
568 an `EXTERNAL' interface, avoiding the warning via g77's
569 `INTRINSIC' interface, force coding of "y2kbug" string in
571 extern int G77_vxtidate_y2kbug_0 (integer *m, integer *d, integer *y);
572 return G77_vxtidate_y2kbug_0 (m, d, y);
577 void vxttime_ (char chtime[8], const ftnlen Lchtime) {
578 extern void G77_vxttime_0 (char chtime[8], const ftnlen Lchtime);
579 G77_vxttime_0 (chtime, Lchtime);