FreeCalypso > hg > themwi-system-sw
comparison libutil/nanp_valid.c @ 267:81958b35f74d
NANP validation: allow made-up area codes of N9X form
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 13 Nov 2023 15:28:09 -0800 |
parents | b1c364729a93 |
children |
comparison
equal
deleted
inserted
replaced
266:556cd78f750a | 267:81958b35f74d |
---|---|
8 /* validate NPA part */ | 8 /* validate NPA part */ |
9 if (s[0] < '2') | 9 if (s[0] < '2') |
10 return(0); | 10 return(0); |
11 if (s[1] == '1' && s[2] == '1') | 11 if (s[1] == '1' && s[2] == '1') |
12 return(0); | 12 return(0); |
13 if (s[1] == '9') | |
14 return(0); | |
15 /* validate exchange part */ | 13 /* validate exchange part */ |
16 if (s[3] < '2') | 14 if (s[3] < '2') |
17 return(0); | 15 return(0); |
18 if (s[4] == '1' && s[5] == '1') | 16 if (s[4] == '1' && s[5] == '1') |
19 return(0); | 17 return(0); |