terminal-util: modernize vtnr_from_tty() a bit

This commit is contained in:
Lennart Poettering
2025-01-03 21:05:58 +01:00
parent 496639d02c
commit 57e55f93bb
3 changed files with 13 additions and 11 deletions
+4
View File
@@ -172,3 +172,7 @@ static inline bool osc_char_is_valid(char c) {
* ECMA-48 5th edition, section 8.3.89 */
return (unsigned char) c >= 32U && (unsigned char) c < 127;
}
static inline bool vtnr_is_valid(unsigned n) {
return n >= 1 && n <= 63;
}