diff options
| author | ruki <[email protected]> | 2017-05-08 16:41:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-08 16:41:02 +0800 |
| commit | cd28c287fbbcc4901a864623d6c1ef92f1487234 (patch) | |
| tree | 30bf6b8ea740ab517ba761a847f1a6b059dc52ab /core/src/xmake/os | |
| parent | 5da5e37eed97e96247ff198c411793f32e5c9916 (diff) | |
format versioninfo code style
Diffstat (limited to 'core/src/xmake/os')
| -rw-r--r-- | core/src/xmake/os/versioninfo.c | 59 |
1 files changed, 33 insertions, 26 deletions
diff --git a/core/src/xmake/os/versioninfo.c b/core/src/xmake/os/versioninfo.c index f9e3fe890..ea75049c3 100644 --- a/core/src/xmake/os/versioninfo.c +++ b/core/src/xmake/os/versioninfo.c @@ -35,10 +35,10 @@ #include "prefix.h" /* ////////////////////////////////////////////////////////////////////////////////////// - * implementation + * private implementation */ -static void xm_os_insert_set(lua_State* lua, const char** p) +static tb_void_t xm_os_insert_set(lua_State* lua, tb_char_t const** p) { for (; *p; ++p) { @@ -48,15 +48,20 @@ static void xm_os_insert_set(lua_State* lua, const char** p) } } +/* ////////////////////////////////////////////////////////////////////////////////////// + * implementation + */ + // get versioninfo tb_int_t xm_os_versioninfo(lua_State* lua) { // features - const char* features_table[] = { -# ifdef XM_CONFIG_API_HAVE_READLINE - "readline", -# endif - tb_null + static tb_char_t const* features_table[] = + { +#ifdef XM_CONFIG_API_HAVE_READLINE + "readline", +#endif + tb_null }; // configuration table @@ -177,14 +182,15 @@ tb_int_t xm_os_versioninfo(lua_State* lua) lua_settable(lua, -3); // mode table - const char* mode_table[] = { -# ifdef __xm_small__ - "small", -# endif -# ifdef __xm_debug__ - "debug", -# endif - tb_null + static tb_char_t const* mode_table[] = + { +#ifdef __xm_small__ + "small", +#endif +#ifdef __xm_debug__ + "debug", +#endif + tb_null }; // table for mode @@ -198,17 +204,18 @@ tb_int_t xm_os_versioninfo(lua_State* lua) lua_settable(lua, -3); // packages table - const char* packages_table[] = { -# ifdef XM_CONFIG_PACKAGE_HAVE_TBOX - "tbox", -# endif -# ifdef XM_CONFIG_PACKAGE_HAVE_LUAJIT - "luajit", -# endif -# ifdef XM_CONFIG_PACKAGE_HAVE_BASE - "base", -# endif - tb_null + tb_char_t const* packages_table[] = + { +#ifdef XM_CONFIG_PACKAGE_HAVE_TBOX + "tbox", +#endif +#ifdef XM_CONFIG_PACKAGE_HAVE_LUAJIT + "luajit", +#endif +#ifdef XM_CONFIG_PACKAGE_HAVE_BASE + "base", +#endif + tb_null }; // table for packages |
