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

Diff for /src/usr.bin/bgplg/bgplg.c between version 1.11 and 1.12

version 1.11, 2013/06/02 14:11:38 version 1.12, 2013/11/25 18:02:50
Line 64 
Line 64 
                 i = c = 0;                  i = c = 0;
                 while (i < len) {                  while (i < len) {
                         if (str[i] == '%' && i <= (len - 2)) {                          if (str[i] == '%' && i <= (len - 2)) {
                                 if (isxdigit(str[i + 1]) &&                                  if (isxdigit((unsigned char)str[i + 1]) &&
                                     isxdigit(str[i + 2])) {                                      isxdigit((unsigned char)str[i + 2])) {
                                         code[0] = str[i + 1];                                          code[0] = str[i + 1];
                                         code[1] = str[i + 2];                                          code[1] = str[i + 2];
                                         code[2] = 0;                                          code[2] = 0;
Line 111 
Line 111 
                 *lenp = len;                  *lenp = len;
   
 #define allowed_in_string(_x)                                           \  #define allowed_in_string(_x)                                           \
         (isalnum(_x) || strchr("-_.:/= ", _x))          (isalnum((unsigned char)_x) || strchr("-_.:/= ", _x))
   
         for (i = 0; i < len; i++) {          for (i = 0; i < len; i++) {
                 if (ptr[i] == '&')                  if (ptr[i] == '&')
Line 123 
Line 123 
         }          }
   
         return (ptr);          return (ptr);
   #undef allowed_in_string
 }  }
   
 char *  char *
Line 159 
Line 160 
   
         /* Count elements */          /* Count elements */
         for (i = 0; i < (len - 1); i++) {          for (i = 0; i < (len - 1); i++) {
                 if (isspace(arg[i])) {                  if (isspace((unsigned char)arg[i])) {
                         /* filter out additional options */                          /* filter out additional options */
                         if (arg[i + 1] == '-') {                          if (arg[i + 1] == '-') {
                                 printf("invalid input\n");                                  printf("invalid input\n");

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12