summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorruki <[email protected]>2015-05-15 11:57:59 +0800
committerruki <[email protected]>2015-05-15 11:57:59 +0800
commit62456790b7c23a4f471d45d69f65bf4dbdc5aab2 (patch)
treea8f48299c738065567e23f9607e0423c3e852236 /core/src
parent418ef668596cb107b75dddee0c4562e4502613cc (diff)
modify xconf format
Diffstat (limited to 'core/src')
-rwxr-xr-xcore/src/xmake/machine.c4
-rwxr-xr-xcore/src/xmake/makefile2
-rwxr-xr-xcore/src/xmake/preprocessor/loadx.c (renamed from core/src/xmake/preprocessor/load_xproj.c)18
3 files changed, 12 insertions, 12 deletions
diff --git a/core/src/xmake/machine.c b/core/src/xmake/machine.c
index 50b8984a4..375f12bd8 100755
--- a/core/src/xmake/machine.c
+++ b/core/src/xmake/machine.c
@@ -58,7 +58,7 @@ tb_int_t xm_path_is_absolute(lua_State* lua);
tb_int_t xm_string_startswith(lua_State* lua);
// the preprocessor functions
-tb_int_t xm_preprocessor_load_xproj(lua_State* lua);
+tb_int_t xm_preprocessor_loadx(lua_State* lua);
/* //////////////////////////////////////////////////////////////////////////////////////
* globals
@@ -83,7 +83,7 @@ static luaL_Reg const g_string_functions[] =
// the preprocessor functions
static luaL_Reg const g_preprocessor_functions[] =
{
- { "load_xproj", xm_preprocessor_load_xproj }
+ { "loadx", xm_preprocessor_loadx }
, { tb_null, tb_null }
};
diff --git a/core/src/xmake/makefile b/core/src/xmake/makefile
index 20b4706e3..e0b530bb1 100755
--- a/core/src/xmake/makefile
+++ b/core/src/xmake/makefile
@@ -18,7 +18,7 @@ xmake_C_FILES += \
path/translate \
path/is_absolute \
string/startswith \
- preprocessor/load_xproj
+ preprocessor/loadx
# flags
diff --git a/core/src/xmake/preprocessor/load_xproj.c b/core/src/xmake/preprocessor/loadx.c
index a13fb0dc6..81763aa4c 100755
--- a/core/src/xmake/preprocessor/load_xproj.c
+++ b/core/src/xmake/preprocessor/loadx.c
@@ -17,14 +17,14 @@
* Copyright (C) 2009 - 2015, ruki All rights reserved.
*
* @author ruki
- * @file load_xproj.c
+ * @file loadx.c
*
*/
/* //////////////////////////////////////////////////////////////////////////////////////
* trace
*/
-#define TB_TRACE_MODULE_NAME "load_xproj"
+#define TB_TRACE_MODULE_NAME "loadx"
#define TB_TRACE_MODULE_DEBUG (0)
/* //////////////////////////////////////////////////////////////////////////////////////
@@ -35,7 +35,7 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* private implementation
*/
-static tb_char_t const* xm_preprocessor_load_xproj_to_string(tb_stream_ref_t stream, tb_string_ref_t string)
+static tb_char_t const* xm_preprocessor_loadx_to_string(tb_stream_ref_t stream, tb_string_ref_t string)
{
// check
tb_assert_and_check_return_val(stream && string, tb_null);
@@ -141,8 +141,8 @@ static tb_char_t const* xm_preprocessor_load_xproj_to_string(tb_stream_ref_t str
// not values now
is_values = tb_false;
- // append ')' and replace '}' to scopend
- tb_string_cstrcat(string, ")\nscopend()");
+ // append ')' and replace '}' to _end
+ tb_string_cstrcat(string, ")\n_end()");
}
// skip newline
else if (ch == '\r' || ch == '\n') ;
@@ -167,8 +167,8 @@ static tb_char_t const* xm_preprocessor_load_xproj_to_string(tb_stream_ref_t str
// replace ':' to '('
tb_string_chrcat(string, '(');
}
- // replace '}' and newline to scopend
- else if (ch == '}') tb_string_cstrcat(string, "\nscopend()");
+ // replace '}' and newline to _end
+ else if (ch == '}') tb_string_cstrcat(string, "\n_end()");
// append it
else tb_string_chrcat(string, ch);
}
@@ -192,7 +192,7 @@ static tb_char_t const* xm_preprocessor_load_xproj_to_string(tb_stream_ref_t str
/* //////////////////////////////////////////////////////////////////////////////////////
* implementation
*/
-tb_int_t xm_preprocessor_load_xproj(lua_State* lua)
+tb_int_t xm_preprocessor_loadx(lua_State* lua)
{
// check
tb_assert_and_check_return_val(lua, 0);
@@ -218,7 +218,7 @@ tb_int_t xm_preprocessor_load_xproj(lua_State* lua)
if (!tb_stream_open(stream)) break;
// load xmake.xproj to the string and preprocess it
- tb_char_t const* xproj = xm_preprocessor_load_xproj_to_string(stream, &string);
+ tb_char_t const* xproj = xm_preprocessor_loadx_to_string(stream, &string);
tb_assert_and_check_break(xproj);
// trace