Skip to content
Permalink
Browse files

LuaFAR: добавлена функция win.system.

  • Loading branch information...
shmuz committed Jan 28, 2015
1 parent 8940490 commit 0f2d892f7aaa6a3811b289c9d540fecd580df763
Showing with 40 additions and 3 deletions.
  1. +26 −1 enc/enc_lua/luafar_manual.tsi
  2. +5 −1 plugins/luamacro/changelog
  3. +8 −0 plugins/luamacro/luafar/ustring.c
  4. +1 −1 plugins/luamacro/luamacro.rc
@@ -86,7 +86,7 @@ lv=1
dt=Text
nm=Unicode support
ctime=3480525243
mtime=3568137943
mtime=3631634304
<article>
#_<markdown>
#_
@@ -133,6 +133,7 @@ mtime=3568137943
#_* [`win.SetFileAttr`](434.html)
#_* [`win.ShellExecute`](428.html)
#_* [`win.SHGetFolderPath`](440.html)
#_* [`win.system`](508.html)
#_
</article>
</node>
@@ -10436,6 +10437,30 @@ mtime=3602449058
</article>
</node>
<node>
id=508
lv=2
dt=Text
nm=win.system
ctime=3631633791
mtime=3631634238
<article>
#_result = win.system ([command])
#_
#_**Parameters:**
#_ command: string
#_
#_**Returns:**
#_ result: integer
#_
#_**Description:**
#_ Executes a command.
#_
#_**Windows API used:**
#_ _wsystem
#_
</article>
</node>
<node>
id=216
lv=2
dt=Text
@@ -1,4 +1,8 @@
shmuel 21.01.2015 23:59:12 +0200 - build 477
shmuel 28.01.2015 19:19:30 +0200 - build 478

1. LuaFAR: добавлена функция win.system.

shmuel 21.01.2015 23:59:12 +0200 - build 477

1. Рефакторинг.

@@ -725,6 +725,13 @@ static int ustring_OutputDebugString(lua_State *L)
return 0;
}

static int ustring_system(lua_State *L)
{
const wchar_t *str = opt_utf8_string(L, 1, NULL);
lua_pushinteger(L, _wsystem(str));
return 1;
}

const luaL_Reg ustring_funcs[] =
{
{"EnumSystemCodePages", ustring_EnumSystemCodePages},
@@ -748,6 +755,7 @@ const luaL_Reg ustring_funcs[] =
{"Uuid", ustring_Uuid},
{"WideCharToMultiByte", ustring_WideCharToMultiByte},
{"subW", ustring_sub},
{"system", ustring_system},
{"lenW", ustring_len},

{NULL, NULL}
@@ -1,6 +1,6 @@
#include <farversion.hpp>

#define PLUGIN_BUILD 477
#define PLUGIN_BUILD 478
#define PLUGIN_DESC "Lua Macros for Far Manager"
#define PLUGIN_NAME "LuaMacro"
#define PLUGIN_FILENAME "luamacro.dll"

0 comments on commit 0f2d892

Please sign in to comment.
You can’t perform that action at this time.