system_.c File Reference

#include "f2c.h"
#include "stdlib.h"

Include dependency graph for system_.c:

Go to the source code of this file.

Functions

char * F77_aloc (ftnlen, char *)
integer system_ (register char *s, ftnlen n)


Function Documentation

char* F77_aloc ( ftnlen  ,
char *   
)

Definition at line 29 of file F77_aloc.c.

References exit_(), int, malloc(), and memfailure.

Referenced by getenv_(), s_cat(), and system_().

00031 {
00032         char *rv;
00033         unsigned int uLen = (unsigned int) Len; /* for K&R C */
00034 
00035         if (!(rv = (char*)malloc(uLen))) {
00036                 fprintf(stderr, "malloc(%u) failure in %s\n",
00037                         uLen, whence);
00038                 exit_(&memfailure);
00039                 }
00040         return rv;
00041         }

Here is the call graph for this function:

Here is the caller graph for this function:

integer system_ ( register char *  s,
ftnlen  n 
)

Definition at line 21 of file system_.c.

References F77_aloc(), and free().

00023 {
00024         char buff0[256], *buff;
00025         register char *bp, *blast;
00026         integer rv;
00027 
00028         buff = bp = n < sizeof(buff0)
00029                         ? buff0 : F77_aloc(n+1, "system_");
00030         blast = bp + n;
00031 
00032         while(bp < blast && *s)
00033                 *bp++ = *s++;
00034         *bp = 0;
00035         rv = system(buff);
00036         if (buff != buff0)
00037                 free(buff);
00038         return rv;
00039         }

Here is the call graph for this function:


Generated on Sun Mar 4 15:05:49 2007 for Scilab [trunk] by  doxygen 1.5.1