Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Dec 6, 2023
1 parent 13307d8 commit e5ebcd7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion plugins/luamacro/_globalinfo.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function export.GetGlobalInfo()
return {
Version = { 3, 0, 0, 795 },
Version = { 3, 0, 0, 796 },
MinFarVersion = { 3, 0, 0, 6214 },
Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"),
Title = "LuaMacro",
Expand Down
4 changes: 4 additions & 0 deletions plugins/luamacro/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
shmuel 2023-12-07 00:45:57+02:00 - build 796

1. LuaFAR: refactoring.

shmuel 2023-12-06 10:03:44+02:00 - build 795

1. LuaFAR: refactoring.
Expand Down
23 changes: 17 additions & 6 deletions plugins/luamacro/luafar/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -3867,12 +3867,23 @@ static int far_DialogInit(lua_State *L)
FARAPIDEFDLGPROC Proc;
void *Param;
TPluginData *pd = GetPluginData(L);
GUID Id = *(GUID*)luaL_checkstring(L, 1);
intptr_t X1 = luaL_checkinteger(L, 2);
intptr_t Y1 = luaL_checkinteger(L, 3);
intptr_t X2 = luaL_checkinteger(L, 4);
intptr_t Y2 = luaL_checkinteger(L, 5);
const wchar_t *HelpTopic = opt_utf8_string(L, 6, NULL);
GUID Id;
intptr_t X1, Y1, X2, Y2;
const wchar_t *HelpTopic;

memset(&Id, 0, sizeof(Id));
if (lua_type(L,1) == LUA_TSTRING) {
if (lua_objlen(L,1) >= sizeof(GUID))
Id = *(const GUID*)lua_tostring(L, 1);
}
else if (!lua_isnoneornil(L,1))
return luaL_typerror(L, 1, "optional string");

X1 = luaL_checkinteger(L, 2);
Y1 = luaL_checkinteger(L, 3);
X2 = luaL_checkinteger(L, 4);
Y2 = luaL_checkinteger(L, 5);
HelpTopic = opt_utf8_string(L, 6, NULL);

luaL_checktype(L, 7, LUA_TTABLE);
lua_newtable(L); // create a "histories" table, to prevent history strings
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/luafar/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include <farversion.hpp>

#define PLUGIN_BUILD 795
#define PLUGIN_BUILD 796

0 comments on commit e5ebcd7

Please sign in to comment.