summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Noble <nnoble@blizzard.com>2013-07-23 16:31:58 -0700
committerNicolas Noble <nnoble@blizzard.com>2013-07-23 16:31:58 -0700
commit9f4062f702a198c1cc9e1adfb4fb14570d8655ca (patch)
treeeaf0e452fbd8f9c905d08aaf42b4053f00a5f7c2
parent66d11fde580c218a927aac8e88b4f4cd982710a7 (diff)
Updating Balau for its StdIO module, and introducing Dalos-modules to hold non-low level stuff, such as readline support.
-rw-r--r--.gitmodules3
m---------Balau0
-rw-r--r--Makefile8
-rw-r--r--src/Dalos-cli.cc8
4 files changed, 12 insertions, 7 deletions
diff --git a/.gitmodules b/.gitmodules
index dba0ff9..c52bc37 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
[submodule "Balau"]
path = Balau
url = git.grumpycoder.net:/pub/repo.git/Balau
+[submodule "Dalos-modules"]
+ path = Dalos-modules
+ url = git.grumpycoder.net:/pub/repo.git/Dalos-modules
diff --git a/Balau b/Balau
-Subproject d35f4eb97c77438af67466be97516aef76bee9f
+Subproject 71b4710c4834d747e44451bd7806c5ac4effbcc
diff --git a/Makefile b/Makefile
index 1206cb4..6e59563 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ CPPFLAGS += -g -DDEBUG
LDFLAGS += -g
endif
-INCLUDES = includes Balau/includes Balau/libcoro Balau/libeio Balau/libev Balau/LuaJIT/src
+INCLUDES = includes Balau/includes Balau/libcoro Balau/libeio Balau/libev Balau/LuaJIT/src Dalos-modules/includes
LIBS = z readline
ifeq ($(SYSTEM),Darwin)
@@ -27,10 +27,12 @@ CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS)
LDFLAGS += $(ARCH_FLAGS)
LDLIBS = $(addprefix -l, $(LIBS))
-vpath %.cc src
+vpath %.cc src Dalos-modules/src
DALOS_CLI_SOURCES = \
-Dalos-cli.cc
+Dalos-cli.cc \
+\
+Readline.cc \
ALL_OBJECTS = $(addsuffix .o, $(notdir $(basename $(DALOS_CLI_SOURCES))))
ALL_DEPS = $(addsuffix .dep, $(notdir $(basename $(DALOS_CLI_SOURCES))))
diff --git a/src/Dalos-cli.cc b/src/Dalos-cli.cc
index ab15256..fedec88 100644
--- a/src/Dalos-cli.cc
+++ b/src/Dalos-cli.cc
@@ -105,12 +105,12 @@ void MainTask::Do() {
break;
}
- if (*line_read)
- add_history(line_read);
+ if (!*line_read)
+ continue;
- String line = line_read;
+ add_history(line_read);
- LuaExecString luaExecString(line);
+ LuaExecString luaExecString(line_read);
luaExecString.exec(luaMainTask);
}
}