diff options
Diffstat (limited to 'lib/libF77/system_.c')
| -rw-r--r-- | lib/libF77/system_.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/libF77/system_.c b/lib/libF77/system_.c new file mode 100644 index 000000000000..181850b51b13 --- /dev/null +++ b/lib/libF77/system_.c @@ -0,0 +1,22 @@ +/* f77 interface to system routine */ + +#include "f2c.h" + +#ifdef KR_headers +system_(s, n) register char *s; ftnlen n; +#else +#undef abs +#include "stdlib.h" +system_(register char *s, ftnlen n) +#endif +{ +char buff[1000]; +register char *bp, *blast; + +blast = buff + (n < 1000 ? n : 1000); + +for(bp = buff ; bp<blast && *s!='\0' ; ) + *bp++ = *s++; +*bp = '\0'; +return system(buff); +} |
