diff utils/themwi-short-dial.c @ 9:0b4d54289ef3

themwi-short-dial compiles in the new model
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 13 Dec 2023 03:51:57 +0000
parents db3c657efafa
children
line wrap: on
line diff
--- 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 <stdint.h>
 #include <stdlib.h>
 #include <syslog.h>
-#include "../include/number_db_v2.h"
-#include "../libnumdb2/lookup_func.h"
 
-main(argc, argv)
-	char **argv;
+#include <themwi/nanp/number_db_v2.h>
+#include <themwi/nanp/number_lookup.h>
+#include <themwi/nanp/number_utils.h>
+
+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);