[BACK]Return to str.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / make

Diff for /src/usr.bin/make/str.c between version 1.1 and 1.2

version 1.1, 1995/10/18 08:45:43 version 1.2, 1995/11/01 17:16:32
Line 1 
Line 1 
 /*      $NetBSD: str.c,v 1.10 1995/06/14 15:19:56 christos Exp $        */  /*      $NetBSD: str.c,v 1.10.2.1 1995/10/30 22:55:14 jtc Exp $ */
   
 /*-  /*-
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.   * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
Line 42 
Line 42 
 #if 0  #if 0
 static char     sccsid[] = "@(#)str.c   5.8 (Berkeley) 6/1/90";  static char     sccsid[] = "@(#)str.c   5.8 (Berkeley) 6/1/90";
 #else  #else
 static char rcsid[] = "$NetBSD: str.c,v 1.10 1995/06/14 15:19:56 christos Exp $";  static char rcsid[] = "$NetBSD: str.c,v 1.10.2.1 1995/10/30 22:55:14 jtc Exp $";
 #endif  #endif
 #endif                          /* not lint */  #endif                          /* not lint */
   
Line 60 
Line 60 
 str_init()  str_init()
 {  {
     char *p1;      char *p1;
     argv = (char **)emalloc((argmax = 50) * sizeof(char *));      argv = (char **)emalloc(((argmax = 50) + 1) * sizeof(char *));
     argv[0] = Var_Value(".MAKE", VAR_GLOBAL, &p1);      argv[0] = Var_Value(".MAKE", VAR_GLOBAL, &p1);
 }  }
   
Line 207 
Line 207 
                         if (argc == argmax) {                          if (argc == argmax) {
                                 argmax *= 2;            /* ramp up fast */                                  argmax *= 2;            /* ramp up fast */
                                 if (!(argv = (char **)realloc(argv,                                  if (!(argv = (char **)realloc(argv,
                                     argmax * sizeof(char *))))                                      (argmax + 1) * sizeof(char *))))
                                 enomem();                                  enomem();
                         }                          }
                         argv[argc++] = start;                          argv[argc++] = start;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2