|
Last change
on this file since 3103 was 1392, checked in by bird, 22 years ago |
|
This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.
|
-
Property cvs2svn:cvs-rev
set to
1.1.1.2
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
504 bytes
|
| Line | |
|---|
| 1 | /* f77 interface to system routine */
|
|---|
| 2 |
|
|---|
| 3 | #include "f2c.h"
|
|---|
| 4 |
|
|---|
| 5 | #undef abs
|
|---|
| 6 | #undef min
|
|---|
| 7 | #undef max
|
|---|
| 8 | #include <stdlib.h>
|
|---|
| 9 | extern char *F77_aloc (ftnlen, char *);
|
|---|
| 10 |
|
|---|
| 11 | integer
|
|---|
| 12 | G77_system_0 (register char *s, ftnlen n)
|
|---|
| 13 | {
|
|---|
| 14 | char buff0[256], *buff;
|
|---|
| 15 | register char *bp, *blast;
|
|---|
| 16 | integer rv;
|
|---|
| 17 |
|
|---|
| 18 | buff = bp = n < (ftnlen) sizeof (buff0) ? buff0 : F77_aloc (n + 1, "system_");
|
|---|
| 19 | blast = bp + n;
|
|---|
| 20 |
|
|---|
| 21 | while (bp < blast && *s)
|
|---|
| 22 | *bp++ = *s++;
|
|---|
| 23 | *bp = 0;
|
|---|
| 24 | rv = system (buff);
|
|---|
| 25 | if (buff != buff0)
|
|---|
| 26 | free (buff);
|
|---|
| 27 | return rv;
|
|---|
| 28 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.