@@ -20,7 +20,7 @@ such as as NOR / NAND flashes, UBI volumes, SD / eMMC, and can
be easy extended to introduce project specific update
procedures.
-Pre- and postinstall scripts are supported, and a LUA
+Pre- and postinstall scripts are supported, and a Lua
interpreter helps to customize the update process.
An update package is described by the sw-description file,
@@ -168,9 +168,9 @@ int run_lua_script(char *script, char *function, char *parms)
}
/**
- * @brief convert a image description struct to a lua table
+ * @brief convert a image description struct to a Lua table
*
- * @param L [inout] the lua stack
+ * @param L [inout] the Lua stack
* @param software [in] the software struct
*/
@@ -311,12 +311,12 @@ static void table2image(lua_State* L, struct img_type *img) {
}
/**
- * @brief function to send notifications to the recovery from lua
+ * @brief function to send notifications to the recovery from Lua
*
- * This function is exported to the lua stack and can be called
- * from any lua script in the same context (Stack)
+ * This function is exported to the Lua stack and can be called
+ * from any Lua script in the same context (Stack)
*
- * @param [in] the lua Stack
+ * @param [in] the Lua Stack
* @return This function returns 0 if successfull and -1 if unsuccessfull.
*/
static int l_notify (lua_State *L) {
@@ -362,7 +362,7 @@ static int l_info(lua_State *L) {
}
/**
- * @brief array with the function which are exported to lua
+ * @brief array with the function which are exported to Lua
*/
static const luaL_Reg l_swupdate[] = {
#ifdef CONFIG_HANDLER_IN_LUA
@@ -383,9 +383,9 @@ static void lua_push_enum(lua_State *L, const char *name, int value)
}
/**
- * @brief function to register the swupdate package in the lua Stack
+ * @brief function to register the swupdate package in the Lua Stack
*
- * @param [in] the lua Stack
+ * @param [in] the Lua Stack
* @return 1 (nr. of results on stack, the 'swupdate' module table)
*/
static int luaopen_swupdate(lua_State *L) {
@@ -424,17 +424,17 @@ static int luaopen_swupdate(lua_State *L) {
static lua_State *gL = NULL;
/**
- * @brief wrapper to call the lua function
+ * @brief wrapper to call the Lua function
*
- * The reference to the lua function is stored in the registry table.
+ * The reference to the Lua function is stored in the registry table.
* To access the reference the index into this table is required. The
* index is stored in the void* data pointer. This is due to the fact
- * that c can not store a direct reference to a lua object.
+ * that c can not store a direct reference to a Lua object.
*
* @param sw [in] software struct which contains all installable images
* @param index [in] defines which image have to be installed
* @param unused [in] unused in this context
- * @param data [in] pointer to the index in the lua registry for the function
+ * @param data [in] pointer to the index in the Lua registry for the function
* @return This function returns 0 if successfull and -1 if unsuccessfull.
*/
static int l_handler_wrapper(struct img_type *img, void *data) {
@@ -467,7 +467,7 @@ static int l_handler_wrapper(struct img_type *img, void *data) {
image2table(gL, img);
if (LUA_OK != (res = lua_pcall(gL, 1, 1, 0))) {
- ERROR("error while executing the lua callback: %d\n",res);
+ ERROR("error while executing the Lua callback: %d\n",res);
puts(lua_tostring(gL, -1));
return -1;
}
@@ -479,24 +479,24 @@ static int l_handler_wrapper(struct img_type *img, void *data) {
}
result = lua_tonumber(gL, -1);
- TRACE("[lua handler] returned: %d\n",(int)result);
+ TRACE("[Lua handler] returned: %d\n",(int)result);
return (int) result;
}
/**
- * @brief function to register a callback from lua
+ * @brief function to register a callback from Lua
*
- * This function is exported to the lua stack and can be called
- * from any lua script in the same context (Stack)
+ * This function is exported to the Lua stack and can be called
+ * from any Lua script in the same context (Stack)
*
- * @param [in] the lua Stack
+ * @param [in] the Lua Stack
* @return This function returns 0 values back to Lua.
*/
static int l_register_handler( lua_State *L ) {
int *l_func_ref = malloc(sizeof(int));
if(!l_func_ref) {
- ERROR("lua handler: unable to allocate memory\n");
+ ERROR("Lua handler: unable to allocate memory\n");
lua_pop(L, 2);
return 0;
} else {
@@ -527,7 +527,7 @@ int lua_handlers_init(void)
luaL_openlibs(gL);
luaL_requiref( gL, "swupdate", luaopen_swupdate, 1 );
lua_pop(gL, 1); /* remove unused copy left on stack */
- /* try to load lua handlers for the swupdate system */
+ /* try to load Lua handlers for the swupdate system */
#if defined(CONFIG_EMBEDDED_LUA_HANDLER)
if ((ret = luaL_dostring(gL, EMBEDDED_LUA_SRC)) != 0) {
INFO("No compiled-in Lua handler(s) found.");
@@ -79,7 +79,7 @@ Some ideas for new handlers:
- Package handler to install packages (ipk, deb)
Packages can be inserted into the SWU and the atomicity is
guaranteed by SWUpdate.
- - LUA handlers should be added if possible to the project
+ - Lua handlers should be added if possible to the project
to show how to solve custom install.
There are custom specific solutions - I will be glad if these additional
@@ -1,5 +1,5 @@
----------------------------------------------
+-- Test XML parsing with Lua
----------------------------------------------
lxp = require "lxp"
@@ -88,7 +88,7 @@ config RAW
into the destination.
config LUASCRIPTHANDLER
- bool "luascript"
+ bool "Lua Script"
depends on LUA
default n
help
@@ -104,7 +104,7 @@ config SHELLSCRIPTHANDLER
is called.
config HANDLER_IN_LUA
- bool "Handlers in LUA"
+ bool "Handlers in Lua"
depends on LUASCRIPTHANDLER
default n
help
@@ -30,7 +30,7 @@ typedef enum {
} script_fn ;
/*
- * Use enum for mask to easy transfer to LUA
+ * Use enum for mask to easy transfer to Lua
* scripts
*/
typedef enum {
@@ -18,7 +18,7 @@ menu "Mongoose Feature"
depends on MONGOOSE
config MONGOOSELUA
- bool "lua interpreter"
+ bool "Lua interpreter"
depends on LUA
default y
help
@@ -150,7 +150,7 @@ int parse_external(struct swupdate_cfg *software, const char *filename)
if (lua_pcall(L, 3, 4, 0)) {
LUAstackDump(L);
- ERROR("ERROR Calling XML Parser in LUA");
+ ERROR("ERROR Calling XML Parser in Lua");
lua_close(L);
return 1;
}
According to Lua's about page (https://www.lua.org/about.html), section "What's in a name?", Lua should be spelled "Lua". Commit 5810b5e has fixed the documentation, this commit fixes occurrences in other places. Signed-off-by: Christian Storm <christian.storm@siemens.com> --- README.md | 2 +- corelib/lua_interface.c | 42 +++++++++++++++++++++--------------------- doc/source/roadmap.rst | 2 +- examples/lua-xml/xmlparser.lua | 2 +- handlers/Config.in | 4 ++-- include/handler.h | 2 +- mongoose/Config.in | 2 +- parser/parse_external.c | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-)