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

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

version 1.1, 1995/10/18 08:45:41 version 1.2, 1996/04/21 23:43:17
Line 1 
Line 1 
 /*      $NetBSD: buf.c,v 1.6 1995/06/14 15:18:51 christos Exp $ */  /*      $NetBSD: buf.c,v 1.7 1996/03/29 02:17:13 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[] = "@(#)buf.c       5.5 (Berkeley) 12/28/90";  static char sccsid[] = "@(#)buf.c       5.5 (Berkeley) 12/28/90";
 #else  #else
 static char rcsid[] = "$NetBSD: buf.c,v 1.6 1995/06/14 15:18:51 christos Exp $";  static char rcsid[] = "$NetBSD: buf.c,v 1.7 1996/03/29 02:17:13 jtc Exp $";
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 69 
Line 69 
 #define BufExpand(bp,nb) \  #define BufExpand(bp,nb) \
         if (bp->left < (nb)+1) {\          if (bp->left < (nb)+1) {\
             int newSize = (bp)->size + max((nb)+1,BUF_ADD_INC); \              int newSize = (bp)->size + max((nb)+1,BUF_ADD_INC); \
             Byte  *newBuf = (Byte *) realloc((bp)->buffer, newSize); \              Byte  *newBuf = (Byte *) erealloc((bp)->buffer, newSize); \
             \              \
             (bp)->inPtr = newBuf + ((bp)->inPtr - (bp)->buffer); \              (bp)->inPtr = newBuf + ((bp)->inPtr - (bp)->buffer); \
             (bp)->outPtr = newBuf + ((bp)->outPtr - (bp)->buffer);\              (bp)->outPtr = newBuf + ((bp)->outPtr - (bp)->buffer);\

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