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

Diff for /src/usr.bin/rdist/docmd.c between version 1.6 and 1.7

version 1.6, 1997/07/22 06:59:38 version 1.7, 1998/06/26 21:21:09
Line 34 
Line 34 
  */   */
   
 #ifndef lint  #ifndef lint
   #if 0
 static char RCSid[] =  static char RCSid[] =
   "$From: docmd.c,v 6.86 1996/01/30 02:29:43 mcooper Exp $";
   #else
   static char RCSid[] =
 "$OpenBSD$";  "$OpenBSD$";
   #endif
   
 static char sccsid[] = "@(#)docmd.c     5.1 (Berkeley) 6/6/85";  static char sccsid[] = "@(#)docmd.c     5.1 (Berkeley) 6/6/85";
   
Line 435 
Line 440 
         char *rhost;          char *rhost;
         int didupdate = 0;          int didupdate = 0;
   
   #ifdef __GNUC__
           (void)&didupdate;
           (void)&opts;
   #endif
   
         if (setjmp_ok) {          if (setjmp_ok) {
                 error("reentrant call to doarrow");                  error("reentrant call to doarrow");
                 abort();                  abort();
Line 597 
Line 607 
         setjmp_ok = FALSE;          setjmp_ok = FALSE;
 }  }
   
   int
 okname(name)  okname(name)
         register char *name;          register char *name;
 {  {
Line 637 
Line 648 
         }          }
         optarget = ptarget;          optarget = ptarget;
         len = ptarget - target;          len = ptarget - target;
         while (dp = readdir(d)) {          while ((dp = readdir(d))) {
                 if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))                  if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
                         continue;                          continue;
                 if (len + 1 + (int)strlen(dp->d_name) >= BUFSIZ - 1) {                  if (len + 1 + (int)strlen(dp->d_name) >= BUFSIZ - 1) {
Line 647 
Line 658 
                 ptarget = optarget;                  ptarget = optarget;
                 *ptarget++ = '/';                  *ptarget++ = '/';
                 cp = dp->d_name;                  cp = dp->d_name;
                 while (*ptarget++ = *cp++)                  while ((*ptarget++ = *cp++))
                         ;                          ;
                 ptarget--;                  ptarget--;
                 cmptime(target, sbcmds, env);                  cmptime(target, sbcmds, env);
Line 791 
Line 802 
   
         for (sc = sbcmds; sc != NULL; sc = sc->sc_next) {          for (sc = sbcmds; sc != NULL; sc = sc->sc_next) {
                 if (sc->sc_type == NOTIFY)                  if (sc->sc_type == NOTIFY)
                         notify((char *)NULL, sc->sc_args, (time_t)lastmod);                          notify(NULL, sc->sc_args, (time_t)lastmod);
                 else if (sc->sc_type == CMDSPECIAL && env) {                  else if (sc->sc_type == CMDSPECIAL && env) {
                         char *p;                          char *p;
                         int len = strlen(env);                          int len = strlen(env);
Line 889 
Line 900 
   
         if (!nflag) {          if (!nflag) {
                 currenthost = (cmd->c_name) ? cmd->c_name : "<unknown>";                  currenthost = (cmd->c_name) ? cmd->c_name : "<unknown>";
 #if     defined(SETARGS)  #if     defined(SETARGS) || defined(HAVE_SETPROCTITLE)
                 setproctitle("update %s", currenthost);                  setproctitle("update %s", currenthost);
 #endif  /* SETARGS */  #endif  /* SETARGS || HAVE_SETPROCTITLE */
         }          }
   
         switch (cmd->c_type) {          switch (cmd->c_type) {
Line 921 
Line 932 
                 for (i = 0; i < argc; i++) {                  for (i = 0; i < argc; i++) {
                         if (cmd->c_label != NULL &&                          if (cmd->c_label != NULL &&
                             strcmp(cmd->c_label, argv[i]) == 0) {                              strcmp(cmd->c_label, argv[i]) == 0) {
                                 docmdhost(cmd, (char **) NULL);                                  docmdhost(cmd, NULL);
                                 return;                                  return;
                         }                          }
                         for (f = cmd->c_files; f != NULL; f = f->n_next)                          for (f = cmd->c_files; f != NULL; f = f->n_next)
Line 931 
Line 942 
                                 }                                  }
                 }                  }
         } else          } else
                 docmdhost(cmd, (char **) NULL);                  docmdhost(cmd, NULL);
 }  }
   
 /*  /*

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