added call to "symbols_init", and fixed problem with argument
[unix-history] / usr / src / old / make / dosys.c
index df5dc3a..77f39ee 100644 (file)
@@ -1,4 +1,4 @@
-static char *sccsid = "@(#)dosys.c     4.3 (Berkeley) 82/04/20";
+static char *sccsid = "@(#)dosys.c     4.7 (Berkeley) 83/06/22";
 #include "defs"
 #include <signal.h>
 
 #include "defs"
 #include <signal.h>
 
@@ -91,13 +91,13 @@ for (od = firstod; od; od = od->nxtopendir)
 \f
 
 
 \f
 
 
-
+#define MAXARGV        400
 
 doexec(str)
 register char *str;
 {
 register char *t;
 
 doexec(str)
 register char *str;
 {
 register char *t;
-char *argv[200];
+char *argv[MAXARGV];
 register char **p;
 
 while( *str==' ' || *str=='\t' )
 register char **p;
 
 while( *str==' ' || *str=='\t' )
@@ -108,6 +108,8 @@ if( *str == '\0' )
 p = argv;
 for(t = str ; *t ; )
        {
 p = argv;
 for(t = str ; *t ; )
        {
+       if (p >= argv + MAXARGV)
+               fatal1("%s: Too many arguments.", str);
        *p++ = t;
        while(*t!=' ' && *t!='\t' && *t!='\0')
                ++t;
        *p++ = t;
        while(*t!=' ' && *t!='\t' && *t!='\0')
                ++t;
@@ -118,7 +120,7 @@ for(t = str ; *t ; )
 
 *p = NULL;
 
 
 *p = NULL;
 
-if((waitpid = vfork()) == 0)
+if((waitpid = fork()) == 0)
        {
        enbint(SIG_DFL);
        doclose();
        {
        enbint(SIG_DFL);
        doclose();
@@ -136,7 +138,6 @@ return( await() );
 
 
 
 
 
 
-
 touch(force, name)
 int force;
 char *name;
 touch(force, name)
 int force;
 char *name;
@@ -145,11 +146,7 @@ struct stat stbuff;
 char junk[1];
 int fd;
 
 char junk[1];
 int fd;
 
-#if vax
-if (lstat(name, &stbuff) < 0)
-#else
 if( stat(name,&stbuff) < 0)
 if( stat(name,&stbuff) < 0)
-#endif
        if(force)
                goto create;
        else
        if(force)
                goto create;
        else