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

Diff for /src/usr.bin/rdist/expand.c between version 1.8 and 1.9

version 1.8, 2003/04/05 20:31:58 version 1.9, 2003/04/19 17:22:29
Line 144 
Line 144 
         which = wh;          which = wh;
         path = tpathp = pathp = pathbuf;          path = tpathp = pathp = pathbuf;
         *pathp = CNULL;          *pathp = CNULL;
         lastpathp = &path[sizeof pathbuf - 2];          lastpathp = &pathbuf[sizeof pathbuf - 2];
         tilde = "";          tilde = "";
         eargc = 0;          eargc = 0;
         eargv = sortbase = argvbuf;          eargv = sortbase = argvbuf;
Line 292 
Line 292 
                         if (pw == NULL || strcmp(pw->pw_name,                          if (pw == NULL || strcmp(pw->pw_name,
                                                  (char *)ebuf+1) != 0) {                                                   (char *)ebuf+1) != 0) {
                                 if ((pw = getpwnam((char *)ebuf+1)) == NULL) {                                  if ((pw = getpwnam((char *)ebuf+1)) == NULL) {
                                         strcat((char *)ebuf,                                          strlcat((char *)ebuf,
                                                ": unknown user name");                                              ": unknown user name",
                                               sizeof(ebuf));
                                         yyerror((char *)ebuf+1);                                          yyerror((char *)ebuf+1);
                                         return;                                          return;
                                 }                                  }
Line 399 
Line 400 
                         if (which & E_TILDE)                          if (which & E_TILDE)
                                 Cat((u_char *)path, (u_char *)dp->d_name);                                  Cat((u_char *)path, (u_char *)dp->d_name);
                         else {                          else {
                                 (void) strcpy(pathp, dp->d_name);                                  (void) strlcpy(pathp, dp->d_name,
                                       lastpathp - pathp + 2);
                                 Cat((u_char *)tilde, (u_char *)tpathp);                                  Cat((u_char *)tilde, (u_char *)tpathp);
                                 *pathp = CNULL;                                  *pathp = CNULL;
                         }                          }
Line 410 
Line 412 
 patherr1:  patherr1:
         closedir(dirp);          closedir(dirp);
 patherr2:  patherr2:
         (void) strcat(path, ": ");          (void) strlcat(path, ": ", lastpathp - path + 2);
         (void) strcat(path, SYSERR);          (void) strlcat(path, SYSERR, lastpathp - path + 2);
         yyerror(path);          yyerror(path);
 }  }
   
Line 478 
Line 480 
 doit:  doit:
                         savec = *pm;                          savec = *pm;
                         *pm = 0;                          *pm = 0;
                         (void) strcpy((char *)lm, (char *)pl);                          *lm = 0;
                           (void) strlcat((char *)restbuf, (char *)pl,
                               sizeof restbuf);
                         (void) strlcat((char *)restbuf, (char *)pe + 1,                          (void) strlcat((char *)restbuf, (char *)pe + 1,
                             sizeof restbuf);                              sizeof restbuf);
                         *pm = savec;                          *pm = savec;

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9