Code

sysdb: Hide implementation details in the "input" module.
[sysdb.git] / src / tools / sysdb / main.c
index 06f4de2f0fb858152a74849300173627281de1cb..bc34a480f74ef7ebc9100a91a877aea97f6f2163 100644 (file)
@@ -78,8 +78,6 @@
 #      define DEFAULT_SOCKET "unix:"LOCALSTATEDIR"/run/sysdbd.sock"
 #endif
 
-extern int yylex(void);
-
 static void
 exit_usage(char *name, int status)
 {
@@ -241,8 +239,8 @@ main(int argc, char **argv)
        }
 
        input.input = sdb_strbuf_create(2048);
-       sdb_input_set(&input);
-       yylex();
+       sdb_input_init(&input);
+       sdb_input_mainloop();
 
        if (hist_file[0] != '\0') {
                errno = 0;