diff options
author | David Walter Seikel | 2014-08-14 08:32:50 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-08-14 08:32:50 +1000 |
commit | 9e8f8dbd9c52d1da132d618573d87650e0a0f7f9 (patch) | |
tree | c9d76f4a95b3ed6b0d8174be2d981ec04cc570a9 /src/LuaSL/LuaSL_main.c | |
parent | Considerable cleanup of the top level compiling code. (diff) | |
download | SledjHamr-9e8f8dbd9c52d1da132d618573d87650e0a0f7f9.zip SledjHamr-9e8f8dbd9c52d1da132d618573d87650e0a0f7f9.tar.gz SledjHamr-9e8f8dbd9c52d1da132d618573d87650e0a0f7f9.tar.bz2 SledjHamr-9e8f8dbd9c52d1da132d618573d87650e0a0f7f9.tar.xz |
Only collect the errors and warnings during a compile, output them in a batch at the end.
Diffstat (limited to '')
-rw-r--r-- | src/LuaSL/LuaSL_main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/LuaSL/LuaSL_main.c b/src/LuaSL/LuaSL_main.c index f316fdb..1eaa43a 100644 --- a/src/LuaSL/LuaSL_main.c +++ b/src/LuaSL/LuaSL_main.c | |||
@@ -182,6 +182,18 @@ static Eina_Bool _add(void *data, int type __UNUSED__, Ecore_Con_Event_Client_Ad | |||
182 | 182 | ||
183 | static void _compileCb(LuaCompiler *compiler) | 183 | static void _compileCb(LuaCompiler *compiler) |
184 | { | 184 | { |
185 | compileMessage *message = NULL, *safe = NULL; | ||
186 | |||
187 | EINA_CLIST_FOR_EACH_ENTRY_SAFE(message, safe, &(compiler->messages), compileMessage, node) | ||
188 | { | ||
189 | if (message->type) | ||
190 | sendBack(compiler->client, compiler->SID, "compilerError(%d,%d,%s)", message->line, message->column, message->message); | ||
191 | else | ||
192 | sendBack(compiler->client, compiler->SID, "compilerWarning(%d,%d,%s)", message->line, message->column, message->message); | ||
193 | eina_clist_remove(&(message->node)); | ||
194 | free(message); | ||
195 | } | ||
196 | |||
185 | if (0 == compiler->bugCount) | 197 | if (0 == compiler->bugCount) |
186 | sendBack(compiler->client, compiler->SID, "compiled(true)"); | 198 | sendBack(compiler->client, compiler->SID, "compiled(true)"); |
187 | else | 199 | else |
@@ -223,6 +235,7 @@ static Eina_Bool _data(void *data, int type __UNUSED__, Ecore_Con_Event_Client_D | |||
223 | temp++; | 235 | temp++; |
224 | temp[0] = '\0'; | 236 | temp[0] = '\0'; |
225 | 237 | ||
238 | eina_clist_init(&(compiler->messages)); | ||
226 | compiler->file = strdup(file); | 239 | compiler->file = strdup(file); |
227 | compiler->SID = strdup(SID); | 240 | compiler->SID = strdup(SID); |
228 | compiler->client = ev->client; | 241 | compiler->client = ev->client; |
@@ -304,6 +317,7 @@ int main(int argc, char **argv) | |||
304 | ourGlobals.names = eina_hash_string_superfast_new(NULL); | 317 | ourGlobals.names = eina_hash_string_superfast_new(NULL); |
305 | if (ecore_init()) | 318 | if (ecore_init()) |
306 | { | 319 | { |
320 | // ecore_thread_max_set(4); | ||
307 | if (ecore_con_init()) | 321 | if (ecore_con_init()) |
308 | { | 322 | { |
309 | if ((ourGlobals.server = ecore_con_server_add(ECORE_CON_REMOTE_TCP, ourGlobals.address, ourGlobals.port, &ourGlobals))) | 323 | if ((ourGlobals.server = ecore_con_server_add(ECORE_CON_REMOTE_TCP, ourGlobals.address, ourGlobals.port, &ourGlobals))) |