diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2021-10-07 19:35:56 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2021-11-07 20:00:42 +0100 |
commit | 423bc4242908a4b2082a23bf817e62db2e28c58e (patch) | |
tree | 93f8abbccc479cb582fa64435eade239a842cab4 /src/tacs | |
parent | 3a73f31d7e95cb825c4166e2156fa8e5c39c76e7 (diff) |
Refactoring validity check and prefix processing of dialed number
Command line help shows how many digits and what prefixes can be dialed.
Giving a station ID via command line will be checked for being valid.
The number to call the mobile statione will be checked for being valid.
Prefixes that are defined for a nework will be removed from station ID
automatically.
Multiple station ID lengths are supported:
* C-Netz: 7 or 8 digits, depending on area code length
* A-Netz: 5 or 7 digits; number is truncated to last 5 digits.
* IMTS/MTS: 5 or 7 digits, depending on phone's selector switch.
Diffstat (limited to 'src/tacs')
-rw-r--r-- | src/tacs/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tacs/main.c b/src/tacs/main.c index df3e2cc..85333ad 100644 --- a/src/tacs/main.c +++ b/src/tacs/main.c @@ -1,3 +1,4 @@ +#include <stdio.h> #include "../amps/main.h" #include "../amps/tones.h" #include "../amps/outoforder.h" @@ -5,6 +6,12 @@ const int tacs = 1; const int jtacs = 0; +const char *number_prefixes[] = { + "0xxxxxxxxxx", + "+44xxxxxxxxxx", + NULL +}; + int main(int argc, char *argv[]) { /* init common tones */ |