summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-11 17:21:55 -0700
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2014-08-11 17:21:55 -0700
commitc989da318c62fa0e2d88cfaae313cc00ee337eba (patch)
tree878ac62acd05167cf261a86fdab88caf9467f6aa /src
parentf95886fd75d6af7d7e959d08bd960006172b7f9f (diff)
MSVC project for Dalos-cli.
Diffstat (limited to 'src')
-rw-r--r--src/Dalos-cli.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc
index b331f15..f01a8de 100644
--- a/src/Dalos-cli.cc
+++ b/src/Dalos-cli.cc
@@ -11,16 +11,6 @@
using namespace Balau;
-int getopt_flag = 0;
-
-struct option long_options[] = {
- { "help", 0, NULL, 'h' },
- { "verbose", 0, NULL, 'v' },
- { "exec", 1, NULL, 'e' },
- { "interactive", 0, NULL, 'i' },
- { NULL, 0, NULL, 0 },
-};
-
static void showhelp(const char * binname, bool longhelp) {
Printer::print(
"Usage:\n"
@@ -62,7 +52,7 @@ void MainTask::Do() {
LuaMainTask * luaMainTask = TaskMan::registerTask(new LuaMainTask);
- while ((c = getopt_long(argc, argv, "Hhve:i", long_options, NULL)) != EOF) {
+ while ((c = getopt(argc, argv, "Hhve:i")) != EOF) {
switch (c) {
case 'h':
case 'H':
@@ -113,7 +103,11 @@ void MainTask::Do() {
return;
String line_read;
+#ifdef _WIN32
+ Readline rl("Dalos-cli", new Buffer());
+#else
Readline rl("Dalos-cli", new StdIN());
+#endif
for (;;) {
line_read = rl.gets();