FreeCalypso > hg > themwi-interim
diff mtctest/setup.c @ 6:33d8b3177540
mtctest compiles in the new environment
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 09 Jun 2024 01:55:28 +0000 |
parents | e7b192a5dee5 |
children | 44c1d4d787e9 |
line wrap: on
line diff
--- a/mtctest/setup.c Sun Jun 09 00:58:38 2024 +0000 +++ b/mtctest/setup.c Sun Jun 09 01:55:28 2024 +0000 @@ -8,13 +8,17 @@ #include <ctype.h> #include <stdio.h> #include <stdint.h> +#include <stdbool.h> #include <stdlib.h> #include <string.h> #include <strings.h> + +#include <themwi/nanp/number_db_v2.h> +#include <themwi/nanp/number_lookup.h> +#include <themwi/nanp/number_utils.h> + #include "../include/mncc.h" #include "../include/gsm48_const.h" -#include "../include/number_db_v2.h" -#include "../libnumdb2/lookup_func.h" struct gsm_mncc setup_msg; @@ -24,7 +28,7 @@ { int rc, ndig; char short_num[5], long_num[12]; - struct short_number_rec *snum; + const struct short_number_rec *snum; if (!strncmp(arg, "imsi:", 5)) { rc = grok_imsi_user_arg(arg, setup_msg.imsi); @@ -42,7 +46,7 @@ "error: plus-format call destination number must begin with 1\n"); exit(1); } - if (grok_number_string(arg+1, 1) != 11) { + if (grok_number_string(arg+1, true) != 11) { bad_plus1: fprintf(stderr, "error: malformed +1 call destination number\n"); exit(1); @@ -55,7 +59,7 @@ setup_msg.fields |= MNCC_F_CALLED; return; } - ndig = grok_number_string(arg, 1); + ndig = grok_number_string(arg, true); switch (ndig) { case 4: dehyphen_number_string(arg, short_num);