X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgenconf%2Fmain.c;h=95d0b7897179e7796ebbdcf9e6c680da37e3ad4c;hb=0c0e81f94cfed584ea3b4baeb5735f4dd0366187;hp=37487102ba1eb560c3059db796eff4a6eb730338;hpb=6f32a68393e01b4179592b9f48255179e8ad55f7;p=libcmdline.git diff --git a/src/genconf/main.c b/src/genconf/main.c index 3748710..95d0b78 100644 --- a/src/genconf/main.c +++ b/src/genconf/main.c @@ -59,22 +59,6 @@ struct cmdline *cl; /*** main */ -void basic_char_loop(void) -{ - char c; - - c = -1; - /* XXX */ - while (1) { - read(cl->s_in, &c, 1); - if (cmdline_in(cl, &c, 1) < 0) { - break; - } - } - cmdline_free(cl); - printf("\n"); -} - int main(void) { struct termios oldterm, term; @@ -92,7 +76,8 @@ int main(void) setbuf(stdin, NULL); cl = cmdline_stdin_new(main_ctx, "root> "); - basic_char_loop(); + cmdline_interact(cl); + cmdline_free(cl); tcsetattr(fileno(stdin), TCSANOW, &oldterm); return 0;