version 1.41, 2015/10/27 15:58:43 |
version 1.42, 2015/11/18 13:06:54 |
|
|
if (!tty_term_has(term, code)) |
if (!tty_term_has(term, code)) |
return (""); |
return (""); |
if (term->codes[code].type != TTYCODE_STRING) |
if (term->codes[code].type != TTYCODE_STRING) |
log_fatalx("not a string: %d", code); |
fatalx("not a string: %d", code); |
return (term->codes[code].value.string); |
return (term->codes[code].value.string); |
} |
} |
|
|
|
|
if (!tty_term_has(term, code)) |
if (!tty_term_has(term, code)) |
return (0); |
return (0); |
if (term->codes[code].type != TTYCODE_NUMBER) |
if (term->codes[code].type != TTYCODE_NUMBER) |
log_fatalx("not a number: %d", code); |
fatalx("not a number: %d", code); |
return (term->codes[code].value.number); |
return (term->codes[code].value.number); |
} |
} |
|
|
|
|
if (!tty_term_has(term, code)) |
if (!tty_term_has(term, code)) |
return (0); |
return (0); |
if (term->codes[code].type != TTYCODE_FLAG) |
if (term->codes[code].type != TTYCODE_FLAG) |
log_fatalx("not a flag: %d", code); |
fatalx("not a flag: %d", code); |
return (term->codes[code].value.flag); |
return (term->codes[code].value.flag); |
} |
} |
|
|