[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.19 and 1.20

version 1.19, 2003/06/03 02:56:11 version 1.20, 2004/04/07 13:11:35
Line 64 
Line 64 
   
 /*-  /*-
  * buf.c --   * buf.c --
  *      Functions for automatically-expanded buffers.   *      Functions for automatically expanded buffers.
  */   */
   
 #include <ctype.h>  #include <ctype.h>
Line 110 
Line 110 
 /* the hard case for Buf_AddChar: 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(Buffer bp)
     Buffer bp;  
 {  {
     BufExpand(bp, 1);      BufExpand(bp, 1);
 }  }
   
   
 void  void
 Buf_AddChars(bp, numBytes, bytesPtr)  Buf_AddChars(Buffer bp, size_t numBytes, const char *bytesPtr)
     Buffer      bp;  
     size_t      numBytes;  
     const char  *bytesPtr;  
 {  {
   
     if ((size_t)(bp->endPtr - bp->inPtr) < numBytes+1)      if ((size_t)(bp->endPtr - bp->inPtr) < numBytes+1)
Line 133 
Line 129 
   
   
 void  void
 Buf_Init(bp, size)  Buf_Init(Buffer bp, size_t size)
     Buffer bp;  
     size_t    size;  
 {  {
 #ifdef STATS_BUF  #ifdef STATS_BUF
     STAT_TOTAL_BUFS++;      STAT_TOTAL_BUFS++;
Line 151 
Line 145 
 }  }
   
 void  void
 Buf_KillTrailingSpaces(bp)  Buf_KillTrailingSpaces(Buffer bp)
     Buffer bp;  
 {  {
     while (bp->inPtr > bp->buffer + 1 && isspace(bp->inPtr[-1])) {      while (bp->inPtr > bp->buffer + 1 && isspace(bp->inPtr[-1])) {
         if (bp->inPtr[-2] == '\\')          if (bp->inPtr[-2] == '\\')

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20