-int i;
-
- T((T_CALLED("tigetnum(%s)"), str));
-
- if (cur_term != 0) {
- TERMTYPE *tp = &(cur_term->type);
- for_each_number(i, tp) {
- const char *capname = ExtNumname(tp, i, numnames);
- if (!strcmp(str, capname)) {
- if (!VALID_NUMERIC(tp->Numbers[i]))
- return -1;
- returnCode(tp->Numbers[i]);
- }
+ unsigned i;
+
+ T((T_CALLED("tigetnum(%s)"), str));
+
+ if (cur_term != 0) {
+ TERMTYPE *tp = &(cur_term->type);
+ for_each_number(i, tp) {
+ const char *capname = ExtNumname(tp, i, numnames);
+ if (!strcmp(str, capname)) {
+ if (!VALID_NUMERIC(tp->Numbers[i]))
+ returnCode(ABSENT_NUMERIC);
+ returnCode(tp->Numbers[i]);