[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.15 and 1.16

version 1.15, 2001/05/03 13:41:01 version 1.16, 2001/05/23 12:34:40
Line 71 
Line 71 
  *      Functions for automatically-expanded buffers.   *      Functions for automatically-expanded buffers.
  */   */
   
 #include    "sprite.h"  #include <ctype.h>
 #include    "make.h"  #include <stddef.h>
 #include    "buf.h"  #include "config.h"
 #include    "stats.h"  #include "defines.h"
   #include "buf.h"
   #include "stats.h"
   #include "memory.h"
   
 #ifndef lint  
 #if 0  
 static char sccsid[] = "@(#)buf.c       8.1 (Berkeley) 6/6/93";  
 #else  
 UNUSED  
 static char rcsid[] = "$OpenBSD$";  
 #endif  
 #endif /* not lint */  
   
   
 #ifdef STATS_BUF  #ifdef STATS_BUF
 #define DO_STAT_BUF(bp, nb)                                     \  #define DO_STAT_BUF(bp, nb)                                     \
         STAT_BUFS_EXPANSION++;                  \          STAT_BUFS_EXPANSION++;                  \
Line 95 
Line 88 
 #define DO_STAT_BUF(a, b)  #define DO_STAT_BUF(a, b)
 #endif  #endif
   
 /* BufExpand --  /* BufExpand(bp, nb)
  *      Expand the given buffer to hold the given number of additional   *      Expand buffer bp to hold upto nb additional
  *      chars.  Makes sure there's room for an extra '\0' char at   *      chars.  Makes sure there's room for an extra '\0' char at
  *      the end of the buffer to terminate the string.  */   *      the end of the buffer to terminate the string.  */
 #define BufExpand(bp,nb)                                \  #define BufExpand(bp,nb)                                \
Line 117 
Line 110 
 #define BUF_DEF_SIZE    256     /* Default buffer size */  #define BUF_DEF_SIZE    256     /* Default buffer size */
 #define BUF_MARGIN      256     /* Make sure we are comfortable */  #define BUF_MARGIN      256     /* Make sure we are comfortable */
   
 /* Buf_AddChar hard case: buffer must be expanded to accommodate  /* the hard case for Buf_AddChar: buffer must be expanded to accommodate
  * one more char.  */   * one more char.  */
 void  void
 BufOverflow(bp)  BufOverflow(bp)
Line 144 
Line 137 
   
 void  void
 Buf_Init(bp, size)  Buf_Init(bp, size)
     Buffer bp;          /* New Buffer to initialize */      Buffer bp;
     size_t    size;     /* Initial size for the buffer */      size_t    size;
 {  {
 #ifdef STATS_BUF  #ifdef STATS_BUF
     STAT_TOTAL_BUFS++;      STAT_TOTAL_BUFS++;

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16