FreeCalypso > hg > themwi-interim
comparison libutil/extdigits.c @ 1:b161dbfffdaa
include, libutil: port from old ThemWi
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 08 Jun 2024 23:06:53 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:214716b13c61 | 1:b161dbfffdaa |
---|---|
1 /* | |
2 * The library function implemented in this module checks "extended" | |
3 * number digits, i.e., checks whether or not a given character | |
4 * makes a valid "extended" number digit. | |
5 */ | |
6 | |
7 is_valid_ext_digit(c) | |
8 { | |
9 switch (c) { | |
10 case '0': | |
11 case '1': | |
12 case '2': | |
13 case '3': | |
14 case '4': | |
15 case '5': | |
16 case '6': | |
17 case '7': | |
18 case '8': | |
19 case '9': | |
20 case '*': | |
21 case '#': | |
22 case 'a': | |
23 case 'b': | |
24 case 'c': | |
25 return(1); | |
26 default: | |
27 return(0); | |
28 } | |
29 } |