# HG changeset patch # User Mychaela Falconia # Date 1702439517 0 # Node ID 0b4d54289ef3e34093f78ed49b23402f28d6a249 # Parent db3c657efafa6097d2480e4e361482f8443b82b4 themwi-short-dial compiles in the new model diff -r db3c657efafa -r 0b4d54289ef3 .hgignore --- a/.hgignore Wed Dec 13 03:39:48 2023 +0000 +++ b/.hgignore Wed Dec 13 03:51:57 2023 +0000 @@ -4,4 +4,5 @@ ^utils/themwi-check-own$ ^utils/themwi-dump-numdb$ +^utils/themwi-short-dial$ ^utils/themwi-update-numdb$ diff -r db3c657efafa -r 0b4d54289ef3 utils/Makefile --- a/utils/Makefile Wed Dec 13 03:39:48 2023 +0000 +++ b/utils/Makefile Wed Dec 13 03:51:57 2023 +0000 @@ -1,6 +1,6 @@ CC= gcc CFLAGS= -O2 -I../build-inc -PROGS= themwi-check-own themwi-dump-numdb themwi-update-numdb +PROGS= themwi-check-own themwi-dump-numdb themwi-short-dial themwi-update-numdb LIBNUMDB=../libnumdb/libnumdb.a LIBUTIL=../libnumutil/libnumutil.a @@ -12,6 +12,9 @@ themwi-dump-numdb: themwi-dump-numdb.c ${CC} ${CFLAGS} -o $@ $@.c +themwi-short-dial: themwi-short-dial.o ${LIBNUMDB} ${LIBUTIL} + ${CC} -o $@ $@.o ${LIBNUMDB} ${LIBUTIL} + themwi-update-numdb: themwi-update-numdb.o ${LIBUTIL} ${CC} -o $@ $@.o ${LIBUTIL} diff -r db3c657efafa -r 0b4d54289ef3 utils/themwi-short-dial.c --- a/utils/themwi-short-dial.c Wed Dec 13 03:39:48 2023 +0000 +++ b/utils/themwi-short-dial.c Wed Dec 13 03:51:57 2023 +0000 @@ -8,13 +8,14 @@ #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) { - struct short_number_rec *rec; + const struct short_number_rec *rec; if (argc != 2) { usage: fprintf(stderr, "usage: %s 4-digit-number\n", argv[0]); @@ -22,7 +23,7 @@ } if (grok_number_string(argv[1], 0) != 4) goto usage; - openlog("themwi-short-dial", 0, LOG_LOCAL5); + openlog("themwi-short-dial", LOG_PERROR, LOG_USER); if (read_number_db() < 0) { fprintf(stderr, "error reading number database\n"); exit(1);