Doxygen Source Code Documentation
system_.c File Reference
#include "stdlib.h"#include "f2c.h"Go to the source code of this file.
Functions | |
| char * | F77_aloc (ftnlen, char *) |
| integer | system_ (register char *s, ftnlen n) |
Function Documentation
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 19 of file system_.c. References F77_aloc(), and free.
00021 {
00022 char buff0[256], *buff;
00023 register char *bp, *blast;
00024 integer rv;
00025
00026 buff = bp = n < sizeof(buff0)
00027 ? buff0 : F77_aloc(n+1, "system_");
00028 blast = bp + n;
00029
00030 while(bp < blast && *s)
00031 *bp++ = *s++;
00032 *bp = 0;
00033 rv = system(buff);
00034 if (buff != buff0)
00035 free(buff);
00036 return rv;
00037 }
|