acl/app/wizard/wizard.cpp

44 lines
889 B
C++
Raw Normal View History

// wizard.cpp : <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̨Ӧ<CCA8>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ㡣
2014-11-19 00:25:21 +08:00
//
#include "stdafx.h"
#include <stdio.h>
#include "master_creator.h"
#include "http_creator.h"
static void create_db()
{
}
int main(int argc, char* argv[])
{
(void) argc, (void) argv;
acl::acl_cpp_init();
while (true) {
2014-11-19 00:25:21 +08:00
printf("select one below:\r\n");
printf("m: master_service; d: db; h: http; q: exit\r\n");
printf(">"); fflush(stdout);
char buf[256];
int n = acl_vstream_gets_nonl(ACL_VSTREAM_IN, buf, sizeof(buf));
if (n == ACL_VSTREAM_EOF) {
2014-11-19 00:25:21 +08:00
break;
} else if (strcasecmp(buf, "m") == 0) {
2014-11-19 00:25:21 +08:00
master_creator();
} else if (strcasecmp(buf, "d") == 0) {
2014-11-19 00:25:21 +08:00
create_db();
} else if (strcasecmp(buf, "h") == 0) {
2014-11-19 00:25:21 +08:00
http_creator();
} else if (strcasecmp(buf, "q") == 0) {
2014-11-19 00:25:21 +08:00
break;
} else {
2014-11-19 00:25:21 +08:00
printf("unknown %s\r\n", buf);
}
2014-11-19 00:25:21 +08:00
}
printf("Bye!\r\n");
return 0;
}