# HG changeset patch # User Mychaela Falconia # Date 1702438431 0 # Node ID dc1554b7dfb828eccb423811111a5d4db1fdfcdf # Parent 1e548c7a24a12991a74ee38b9439b42a310268f8 themwi-check-own compiles in the new model diff -r 1e548c7a24a1 -r dc1554b7dfb8 .hgignore --- a/.hgignore Wed Dec 13 03:14:35 2023 +0000 +++ b/.hgignore Wed Dec 13 03:33:51 2023 +0000 @@ -2,5 +2,6 @@ \.[oa]$ +^utils/themwi-check-own$ ^utils/themwi-dump-numdb$ ^utils/themwi-update-numdb$ diff -r 1e548c7a24a1 -r dc1554b7dfb8 utils/Makefile --- a/utils/Makefile Wed Dec 13 03:14:35 2023 +0000 +++ b/utils/Makefile Wed Dec 13 03:33:51 2023 +0000 @@ -1,11 +1,14 @@ CC= gcc CFLAGS= -O2 -I../build-inc -PROGS= themwi-dump-numdb themwi-update-numdb +PROGS= themwi-check-own themwi-dump-numdb themwi-update-numdb LIBNUMDB=../libnumdb/libnumdb.a LIBUTIL=../libnumutil/libnumutil.a all: ${PROGS} +themwi-check-own: themwi-check-own.o ${LIBNUMDB} ${LIBUTIL} + ${CC} -o $@ $@.o ${LIBNUMDB} ${LIBUTIL} + themwi-dump-numdb: themwi-dump-numdb.c ${CC} ${CFLAGS} -o $@ $@.c diff -r 1e548c7a24a1 -r dc1554b7dfb8 utils/themwi-check-own.c --- a/utils/themwi-check-own.c Wed Dec 13 03:14:35 2023 +0000 +++ b/utils/themwi-check-own.c Wed Dec 13 03:33:51 2023 +0000 @@ -7,14 +7,15 @@ #include #include #include -#include "../include/number_db_v2.h" -#include "../libnumdb2/lookup_func.h" -main(argc, argv) - char **argv; +#include +#include +#include + +int main(int argc, char **argv) { char nanp[11]; - struct owned_number_rec *rec; + const struct owned_number_rec *rec; if (argc != 2) { usage: fprintf(stderr, "usage: %s 10-digit-number\n", argv[0]); @@ -27,7 +28,7 @@ fprintf(stderr, "error: number violates NANP rules\n"); exit(1); } - openlog("themwi-check-own", 0, LOG_LOCAL5); + openlog("themwi-check-own", LOG_PERROR, LOG_USER); if (read_number_db() < 0) { fprintf(stderr, "error reading number database\n"); exit(1);