Diff for /libaitcfg/src/Attic/tools.c between versions 1.2.4.1 and 1.2.4.2

version 1.2.4.1, 2009/11/11 13:52:30 version 1.2.4.2, 2009/11/11 14:46:36
Line 63  inline int trim(u_char *psLine) Line 63  inline int trim(u_char *psLine)
   
         return ret;          return ret;
 }  }
   
   // unquot() Unquoted string
   inline int unquot(u_char *psLine)
   {
           char *pos, *str = NULL;
           int flg;
   
           if (!psLine)
                   return 0;
   
           switch (*psLine) {
                   case '`':
                   case '"':
                   case '\'':
                           str = strdup((char*) psLine + 1);
                           for (pos = str, flg = 0; *pos; flg = ('\\' == *pos), pos++) {
                                   if (!flg && *pos == *psLine) {
                                           *pos = 0;
                                           strlcpy((char*) psLine, str, strlen((char*) psLine) + 1);
                                           break;
                                   }
                           }
                           free(str);
                           return 1;
           }
   
           return 0;
   }

Removed from v.1.2.4.1  
changed lines
  Added in v.1.2.4.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>