2019-07-28 10:31:56 +08:00
|
|
|
|
// 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();
|
|
|
|
|
|
2022-01-01 11:28:01 +08:00
|
|
|
|
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));
|
2022-01-01 11:28:01 +08:00
|
|
|
|
if (n == ACL_VSTREAM_EOF) {
|
2014-11-19 00:25:21 +08:00
|
|
|
|
break;
|
2022-01-01 11:28:01 +08:00
|
|
|
|
} else if (strcasecmp(buf, "m") == 0) {
|
2014-11-19 00:25:21 +08:00
|
|
|
|
master_creator();
|
2022-01-01 11:28:01 +08:00
|
|
|
|
} else if (strcasecmp(buf, "d") == 0) {
|
2014-11-19 00:25:21 +08:00
|
|
|
|
create_db();
|
2022-01-01 11:28:01 +08:00
|
|
|
|
} else if (strcasecmp(buf, "h") == 0) {
|
2014-11-19 00:25:21 +08:00
|
|
|
|
http_creator();
|
2022-01-01 11:28:01 +08:00
|
|
|
|
} else if (strcasecmp(buf, "q") == 0) {
|
2014-11-19 00:25:21 +08:00
|
|
|
|
break;
|
2022-01-01 11:28:01 +08:00
|
|
|
|
} else {
|
2014-11-19 00:25:21 +08:00
|
|
|
|
printf("unknown %s\r\n", buf);
|
2022-01-01 11:28:01 +08:00
|
|
|
|
}
|
2014-11-19 00:25:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
printf("Bye!\r\n");
|
|
|
|
|
return 0;
|
|
|
|
|
}
|