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

Diff for /src/usr.bin/ssh/Attic/aux.c between version 1.3 and 1.4

version 1.3, 2000/06/18 17:13:41 version 1.4, 2000/07/13 22:53:21
Line 39 
Line 39 
         if (fcntl(fd, F_SETFL, val) == -1)          if (fcntl(fd, F_SETFL, val) == -1)
                 error("fcntl(%d, F_SETFL, O_NONBLOCK): %s", fd, strerror(errno));                  error("fcntl(%d, F_SETFL, O_NONBLOCK): %s", fd, strerror(errno));
 }  }
   
   /* Characters considered whitespace in strsep calls. */
   #define WHITESPACE " \t\r\n"
   
   char *
   strdelim(char **s)
   {
           char *old;
           int wspace = 0;
   
           if (*s == NULL)
                   return NULL;
   
           old = *s;
   
           *s = strpbrk(*s, WHITESPACE "=");
           if (*s == NULL)
                   return (old);
   
           /* Allow only one '=' to be skipped */
           if (*s[0] == '=')
                   wspace = 1;
           *s[0] = '\0';
   
           *s += strspn(*s + 1, WHITESPACE) + 1;
           if (*s[0] == '=' && !wspace)
                   *s += strspn(*s + 1, WHITESPACE) + 1;
   
           return (old);
   }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4