Strings starting with '-' (or other punctuation) were classified as a
single-character text parameter, making entry of negative numbers
impossible. A parameter described by 'j' in the command list now indicates
a '-' followed by digits should be interpreted as a negative number.
break;
case 'i':
+ case 'j':
case 'n': /* optional or required word or integer */
parameters = eatwhite(parameters);
if (!*parameters)
} else {
(params)[i].type = TYPE_INT;
}
- if (ispunct(*parameters)) {
+ if (ispunct(*parameters) && (c != 'j' || (params)[i].type != TYPE_INT)) {
punc[0] = *parameters;
(params)[i].val.word = punc;
(params)[i].type = TYPE_WORD;