[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.12 and 1.13

version 1.12, 2000/06/23 16:41:53 version 1.13, 2000/07/17 22:57:37
Line 97 
Line 97 
  */   */
 char **  char **
 brk_string(str, store_argc, expand, buffer)  brk_string(str, store_argc, expand, buffer)
         register char *str;          const char *str;
         int *store_argc;          int *store_argc;
         Boolean expand;          Boolean expand;
         char **buffer;          char **buffer;
 {  {
         register int argc, ch;          register int argc, ch;
         register char inquote, *p, *start, *t;          char inquote;
         int len;          const char *p;
         int argmax = 50, curlen = 0;          char *start, *t;
           size_t len;
           int argmax = 50;
           size_t curlen = 0;
         char **argv = (char **)emalloc((argmax + 1) * sizeof(char *));          char **argv = (char **)emalloc((argmax + 1) * sizeof(char *));
   
         /* skip leading space chars. */          /* skip leading space chars. */
Line 228 
Line 231 
  */   */
 int  int
 Str_Match(string, pattern)  Str_Match(string, pattern)
         register char *string;          /* String */          const char *string;             /* String */
         register char *pattern;         /* Pattern */          const char *pattern;            /* Pattern */
 {  {
         char c2;          char c2;
   
Line 325 
Line 328 
  * Results:   * Results:
  *      Returns the beginning position of a match or null. The number   *      Returns the beginning position of a match or null. The number
  *      of characters matched is returned in len.   *      of characters matched is returned in len.
  *  
  * Side Effects:  
  *      None  
  *  
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  */   */
 char *  const char *
 Str_SYSVMatch(word, pattern, len)  Str_SYSVMatch(word, pattern, len)
     char        *word;          /* Word to examine */      const char  *word;          /* Word to examine */
     char        *pattern;       /* Pattern to examine against */      const char  *pattern;       /* Pattern to examine against */
     int         *len;           /* Number of characters to substitute */      size_t      *len;           /* Number of characters to substitute */
 {  {
     char *p = pattern;      const char *p = pattern;
     char *w = word;      const char *w = word;
     char *m;      const char *m;
   
     if (*p == '\0') {      if (*p == '\0') {
         /* Null pattern is the whole string */          /* Null pattern is the whole string */
Line 383 
Line 382 
  *      If the pattern does not contain a '%' prepend len characters   *      If the pattern does not contain a '%' prepend len characters
  *      from src.   *      from src.
  *   *
  * Results:  
  *      None  
  *  
  * Side Effects:   * Side Effects:
  *      Places result on buf   *      Places result on buf
  *  
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
  */   */
 void  void
 Str_SYSVSubst(buf, pat, src, len)  Str_SYSVSubst(buf, pat, src, len)
     Buffer buf;      Buffer buf;
     char *pat;      const char *pat;
     char *src;      const char *src;
     int   len;      size_t   len;
 {  {
     char *m;      const char *m;
   
     if ((m = strchr(pat, '%')) != NULL) {      if ((m = strchr(pat, '%')) != NULL) {
         /* Copy the prefix */          /* Copy the prefix */

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13