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

Diff for /src/usr.bin/cvs/modules.c between version 1.8 and 1.9

version 1.8, 2008/02/04 22:36:40 version 1.9, 2008/02/06 10:37:10
Line 19 
Line 19 
 #include <sys/dirent.h>  #include <sys/dirent.h>
 #include <sys/resource.h>  #include <sys/resource.h>
   
   #include <ctype.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   
Line 49 
Line 50 
   
         flags = 0;          flags = 0;
         p = val = line;          p = val = line;
         while (*p != ' ' && *p != '\t' && *p != '\0')          while (!isspace(*p) && *p != '\0')
                 p++;                  p++;
   
         if (*p == '\0')          if (*p == '\0')
Line 58 
Line 59 
         *(p++) = '\0';          *(p++) = '\0';
         module = val;          module = val;
   
         while ((*p == ' ' || *p == '\t') && *p != '\0')          while (isspace(*p))
                 p++;                  p++;
   
         if (*p == '\0')          if (*p == '\0')
                 goto bad;                  goto bad;
   
         val = p;          val = p;
         while (*p != ' ' && *p != '\t')          while (!isspace(*p) && *p != '\0')
                 p++;                  p++;
   
         prog = NULL;          prog = NULL;
         while (val[0] == '-') {          while (val[0] == '-') {
                 p = val;                  p = val;
                 while (*p != ' ' && *p != '\t' && *p != '\0')                  while (!isspace(*p) && *p != '\0')
                         p++;                          p++;
   
                 if (*p == '\0')                  if (*p == '\0')
Line 104 
Line 105 
                                 return;                                  return;
                         }                          }
   
                         if ((val = strchr(p, ' ' )) == NULL)                          val = p;
                           while (!isspace(*val) && *val != '\0')
                                   val++;
                           if (*val == '\0')
                                 goto bad;                                  goto bad;
   
                         *(val++) = '\0';                          *(val++) = '\0';
Line 143 
Line 147 
         dirname = NULL;          dirname = NULL;
         TAILQ_INIT(&(mi->mi_modules));          TAILQ_INIT(&(mi->mi_modules));
         TAILQ_INIT(&(mi->mi_ignores));          TAILQ_INIT(&(mi->mi_ignores));
         for (sp = val; sp != NULL; sp = dp) {          for (sp = val; *sp != '\0'; sp = dp) {
                 dp = strchr(sp, ' ');                  dp = sp;
                 if (dp != NULL)                  while (!isspace(*dp) && *dp != '\0')
                           dp++;
                   if (*dp != '\0')
                         *(dp++) = '\0';                          *(dp++) = '\0';
   
                 if (mi->mi_flags & MODULE_ALIAS) {                  if (mi->mi_flags & MODULE_ALIAS) {

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