# HG changeset patch # User Mychaela Falconia # Date 1702436007 0 # Node ID 2729f94f38fb99c18857334bb74cde0ff50c6be9 # Parent b280d93e8bc1bcfe32cabe0fe8baa1b7723e0ffe themwi-dump-numdb compiles in the new model diff -r b280d93e8bc1 -r 2729f94f38fb .hgignore --- a/.hgignore Wed Dec 13 02:18:07 2023 +0000 +++ b/.hgignore Wed Dec 13 02:53:27 2023 +0000 @@ -2,4 +2,5 @@ \.[oa]$ +^utils/themwi-dump-numdb$ ^utils/themwi-update-numdb$ diff -r b280d93e8bc1 -r 2729f94f38fb utils/Makefile --- a/utils/Makefile Wed Dec 13 02:18:07 2023 +0000 +++ b/utils/Makefile Wed Dec 13 02:53:27 2023 +0000 @@ -1,11 +1,14 @@ CC= gcc CFLAGS= -O2 -I../build-inc -PROGS= themwi-update-numdb +PROGS= themwi-dump-numdb themwi-update-numdb LIBNUMDB=../libnumdb/libnumdb.a LIBUTIL=../libnumutil/libnumutil.a all: ${PROGS} +themwi-dump-numdb: themwi-dump-numdb.c + ${CC} ${CFLAGS} -o $@ $@.c + themwi-update-numdb: themwi-update-numdb.o ${LIBUTIL} ${CC} -o $@ $@.o ${LIBUTIL} diff -r b280d93e8bc1 -r 2729f94f38fb utils/themwi-dump-numdb.c --- a/utils/themwi-dump-numdb.c Wed Dec 13 02:18:07 2023 +0000 +++ b/utils/themwi-dump-numdb.c Wed Dec 13 02:53:27 2023 +0000 @@ -6,15 +6,15 @@ #include #include #include -#include "../include/number_db_v2.h" + +#include -static char binfile_default_pathname[] = "/var/gsm/number-db2.bin"; -static char *binfile_pathname; +static const char binfile_default_pathname[] = "/var/gsm/number-db2.bin"; +static const char *binfile_pathname; static FILE *inf; static struct numdb_file_hdr hdr; -static void -dump_owned_numbers() +static void dump_owned_numbers(void) { unsigned count; struct owned_number_rec rec; @@ -38,8 +38,7 @@ } } -static void -dump_short_numbers() +static void dump_short_numbers(void) { unsigned count; struct short_number_rec rec; @@ -61,8 +60,7 @@ } } -main(argc, argv) - char **argv; +int main(int argc, char **argv) { if (argc > 2) { fprintf(stderr, "usage: %s [binfile]\n", argv[0]);