if (!len)
return 1;
- *val = strtoul(str, NULL, 10);
- if (*val == ULONG_MAX && errno == ERANGE)
+ *val = strtol(str, NULL, 10);
+ if (*val == LONG_MAX && errno == ERANGE)
return 1;
if (kilo)
while (o->name) {
if (!strcmp(o->name, opt))
return o;
+ else if (o->alias && !strcmp(o->alias, opt))
+ return o;
o++;
}