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

Diff for /src/usr.bin/ssh/misc.c between version 1.45 and 1.46

version 1.45, 2006/02/10 00:27:13 version 1.46, 2006/03/13 10:14:29
Line 126 
Line 126 
   
 /* Characters considered whitespace in strsep calls. */  /* Characters considered whitespace in strsep calls. */
 #define WHITESPACE " \t\r\n"  #define WHITESPACE " \t\r\n"
   #define QUOTE   "\""
   
 /* return next token in configuration line */  /* return next token in configuration line */
 char *  char *
Line 139 
Line 140 
   
         old = *s;          old = *s;
   
         *s = strpbrk(*s, WHITESPACE "=");          *s = strpbrk(*s, WHITESPACE QUOTE "=");
         if (*s == NULL)          if (*s == NULL)
                 return (old);                  return (old);
   
           if (*s[0] == '\"') {
                   memmove(*s, *s + 1, strlen(*s)); /* move nul too */
                   /* Find matching quote */
                   if ((*s = strpbrk(*s, QUOTE)) == NULL) {
                           return (NULL);          /* no matching quote */
                   } else {
                           *s[0] = '\0';
                           return (old);
                   }
           }
   
         /* Allow only one '=' to be skipped */          /* Allow only one '=' to be skipped */
         if (*s[0] == '=')          if (*s[0] == '=')
                 wspace = 1;                  wspace = 1;
         *s[0] = '\0';          *s[0] = '\0';
   
           /* Skip any extra whitespace after first token */
         *s += strspn(*s + 1, WHITESPACE) + 1;          *s += strspn(*s + 1, WHITESPACE) + 1;
         if (*s[0] == '=' && !wspace)          if (*s[0] == '=' && !wspace)
                 *s += strspn(*s + 1, WHITESPACE) + 1;                  *s += strspn(*s + 1, WHITESPACE) + 1;

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46