SCCS-vsn: usr.bin/f77/libU77/system_.c 1.3
-char id_system[] = "@(#)system_.c 1.2";
+char id_system[] = "@(#)system_.c 1.3";
*
* execute a unix command
*
*
* execute a unix command
*
*/
#include "../libI77/fiodefs.h"
*/
#include "../libI77/fiodefs.h"
+#include "../libI77/f_errno.h"
long system_(s, n)
char *s;
long n;
{
long system_(s, n)
char *s;
long n;
{
+ if (n >= sizeof buf)
+ return(-(long)(errno=F_ERARG));
for (i = 0; i < MXUNIT; flush(i++)) ;
for (i = 0; i < MXUNIT; flush(i++)) ;
- return((long)system(s));
+ g_char(s, n, buf);
+ return((long)system(buf));