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

Diff for /src/usr.bin/make/varmodifiers.c between version 1.5 and 1.6

version 1.5, 2000/09/14 13:35:38 version 1.6, 2000/09/14 13:36:46
Line 138 
Line 138 
  */   */
 static Boolean  static Boolean
 VarUppercase(word, addSpace, buf, dummy)  VarUppercase(word, addSpace, buf, dummy)
     const char    *word;        /* Word to Upper Case */      const char  *word;          /* Word to Upper Case */
     Boolean       addSpace;     /* True if need to add a space to the buffer      Boolean     addSpace;       /* True if need to add a space to the buffer
                                  * before sticking in the head */                                   * before sticking in the head */
     Buffer        buf;          /* Buffer in which to store it */      Buffer      buf;            /* Buffer in which to store it */
     void *dummy;      void        *dummy          UNUSED;
 {  {
     size_t len = strlen(word);      size_t len = strlen(word);
   
Line 169 
Line 169 
  */   */
 static Boolean  static Boolean
 VarLowercase(word, addSpace, buf, dummy)  VarLowercase(word, addSpace, buf, dummy)
     const char    *word;        /* Word to Lower Case */      const char  *word;          /* Word to Lower Case */
     Boolean       addSpace;     /* True if need to add a space to the buffer      Boolean     addSpace;       /* True if need to add a space to the buffer
                                  * before sticking in the head */                                   * before sticking in the head */
     Buffer        buf;          /* Buffer in which to store it */      Buffer      buf;            /* Buffer in which to store it */
     void *dummy;      void        *dummy          UNUSED;
 {  {
     size_t len = strlen(word);      size_t len = strlen(word);
   
Line 201 
Line 201 
  */   */
 static Boolean  static Boolean
 VarHead(word, addSpace, buf, dummy)  VarHead(word, addSpace, buf, dummy)
     const char    *word;        /* Word to trim */      const char  *word;          /* Word to trim */
     Boolean       addSpace;     /* True if need to add a space to the buffer      Boolean     addSpace;       /* True if need to add a space to the buffer
                                  * before sticking in the head */                                   * before sticking in the head */
     Buffer        buf;          /* Buffer in which to store it */      Buffer      buf;            /* Buffer in which to store it */
     void          *dummy;      void        *dummy          UNUSED;
 {  {
     const char    *slash;      const char  *slash;
   
     slash = strrchr(word, '/');      slash = strrchr(word, '/');
     if (slash != NULL) {      if (slash != NULL) {
Line 222 
Line 222 
         else          else
             Buf_AddChar(buf, '.');              Buf_AddChar(buf, '.');
     }      }
     return(dummy ? TRUE : TRUE);      return TRUE;
 }  }
   
 /*-  /*-
Line 242 
Line 242 
  */   */
 static Boolean  static Boolean
 VarTail(word, addSpace, buf, dummy)  VarTail(word, addSpace, buf, dummy)
     const char    *word;        /* Word to trim */      const char  *word;          /* Word to trim */
     Boolean       addSpace;     /* TRUE if need to stick a space in the      Boolean     addSpace;       /* TRUE if need to stick a space in the
                                  * buffer before adding the tail */                                   * buffer before adding the tail */
     Buffer        buf;          /* Buffer in which to store it */      Buffer      buf;            /* Buffer in which to store it */
     void          *dummy;      void        *dummy          UNUSED;
 {  {
     const char *slash;      const char  *slash;
   
     if (addSpace)      if (addSpace)
         Buf_AddSpace(buf);          Buf_AddSpace(buf);
Line 257 
Line 257 
         Buf_AddString(buf, slash+1);          Buf_AddString(buf, slash+1);
     else      else
         Buf_AddString(buf, word);          Buf_AddString(buf, word);
     return (dummy ? TRUE : TRUE);      return TRUE;
 }  }
   
 /*-  /*-
Line 276 
Line 276 
  */   */
 static Boolean  static Boolean
 VarSuffix(word, addSpace, buf, dummy)  VarSuffix(word, addSpace, buf, dummy)
     const char    *word;        /* Word to trim */      const char  *word;          /* Word to trim */
     Boolean       addSpace;     /* TRUE if need to add a space before placing      Boolean     addSpace;       /* TRUE if need to add a space before placing
                                  * the suffix in the buffer */                                   * the suffix in the buffer */
     Buffer        buf;          /* Buffer in which to store it */      Buffer      buf;            /* Buffer in which to store it */
     void          *dummy;      void        *dummy          UNUSED;
 {  {
     const char *dot;      const char  *dot;
   
     dot = strrchr(word, '.');      dot = strrchr(word, '.');
     if (dot != NULL) {      if (dot != NULL) {
Line 291 
Line 291 
         Buf_AddString(buf, dot+1);          Buf_AddString(buf, dot+1);
         addSpace = TRUE;          addSpace = TRUE;
     }      }
     return (dummy ? addSpace : addSpace);      return addSpace;
 }  }
   
 /*-  /*-
Line 311 
Line 311 
  */   */
 static Boolean  static Boolean
 VarRoot(word, addSpace, buf, dummy)  VarRoot(word, addSpace, buf, dummy)
     const char    *word;        /* Word to trim */      const char  *word;          /* Word to trim */
     Boolean       addSpace;     /* TRUE if need to add a space to the buffer      Boolean     addSpace;       /* TRUE if need to add a space to the buffer
                                  * before placing the root in it */                                   * before placing the root in it */
     Buffer        buf;          /* Buffer in which to store it */      Buffer      buf;            /* Buffer in which to store it */
     void          *dummy;      void        *dummy          UNUSED;
 {  {
     const char *dot;      const char  *dot;
   
     if (addSpace)      if (addSpace)
         Buf_AddSpace(buf);          Buf_AddSpace(buf);
Line 327 
Line 327 
         Buf_AddInterval(buf, word, dot);          Buf_AddInterval(buf, word, dot);
     else      else
         Buf_AddString(buf, word);          Buf_AddString(buf, word);
     return (dummy ? TRUE : TRUE);      return TRUE;
 }  }
   
 /*-  /*-

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6