[BACK]Return to magic-load.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / file

Diff for /src/usr.bin/file/magic-load.c between version 1.7 and 1.8

version 1.7, 2015/08/11 21:42:16 version 1.8, 2015/08/11 21:52:14
Line 262 
Line 262 
                         break;                          break;
                 case MAGIC_TYPE_BESTRING16:                  case MAGIC_TYPE_BESTRING16:
                 case MAGIC_TYPE_LESTRING16:                  case MAGIC_TYPE_LESTRING16:
                         magic_warn(ml, "unsupported type %s", ml->type_string);                          magic_warn(ml, "unsupported type: %s", ml->type_string);
                         return (-1);                          return (-1);
                 }                  }
         }          }
Line 540 
Line 540 
   
         endptr = magic_strtoll(s, &ml->indirect_offset);          endptr = magic_strtoll(s, &ml->indirect_offset);
         if (endptr == NULL) {          if (endptr == NULL) {
                 magic_warn(ml, "can't parse offset");                  magic_warn(ml, "can't parse offset: %s", s);
                 goto fail;                  goto fail;
         }          }
         s = endptr;          s = endptr;
Line 550 
Line 550 
         if (*s == '.') {          if (*s == '.') {
                 s++;                  s++;
                 if (*s == '\0' || strchr("bslBSL", *s) == NULL) {                  if (*s == '\0' || strchr("bslBSL", *s) == NULL) {
                         magic_warn(ml, "unknown offset type");                          magic_warn(ml, "unknown offset type: %c", *s);
                         goto fail;                          goto fail;
                 }                  }
                 ml->indirect_type = *s;                  ml->indirect_type = *s;
Line 560 
Line 560 
         }          }
   
         if (*s == '\0' || strchr("+-*", *s) == NULL) {          if (*s == '\0' || strchr("+-*", *s) == NULL) {
                 magic_warn(ml, "unknown offset operator");                  magic_warn(ml, "unknown offset operator: %c", *s);
                 goto fail;                  goto fail;
         }          }
         ml->indirect_operator = *s;          ml->indirect_operator = *s;
Line 633 
Line 633 
                 ml->type_operator = *cp;                  ml->type_operator = *cp;
                 endptr = magic_strtoull(cp + 1, &ml->type_operand);                  endptr = magic_strtoull(cp + 1, &ml->type_operand);
                 if (endptr == NULL || *endptr != '\0') {                  if (endptr == NULL || *endptr != '\0') {
                         magic_warn(ml, "can't parse operand");                          magic_warn(ml, "can't parse operand: %s", cp + 1);
                         goto fail;                          goto fail;
                 }                  }
                 *cp = '\0';                  *cp = '\0';
Line 754 
Line 754 
         else if (strcmp(s, "default") == 0)          else if (strcmp(s, "default") == 0)
                 ml->type = MAGIC_TYPE_DEFAULT;                  ml->type = MAGIC_TYPE_DEFAULT;
         else {          else {
                 magic_warn(ml, "unknown type");                  magic_warn(ml, "unknown type: %s", s);
                 goto fail;                  goto fail;
         }          }
         magic_mark_text(ml, 0);          magic_mark_text(ml, 0);
Line 850 
Line 850 
         else          else
                 endptr = magic_strtoll(s, &ml->test_signed);                  endptr = magic_strtoll(s, &ml->test_signed);
         if (endptr == NULL || *endptr != '\0') {          if (endptr == NULL || *endptr != '\0') {
                 magic_warn(ml, "can't parse number");                  magic_warn(ml, "can't parse number: %s", s);
                 goto fail;                  goto fail;
         }          }
   

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