Skip to content

Commit

Permalink
Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Nov 22, 2023
1 parent abfbefb commit 7d23fa0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 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, 789 },
Version = { 3, 0, 0, 790 },
MinFarVersion = { 3, 0, 0, 5171 },
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-11-22 23:56:58+02:00 - build 790

1. LuaFAR: warnings.

shmuel 2023-11-21 20:39:31+02:00 - build 789

1. Far.GetConfig() is implemented entirely in Far.exe (was: Far + LuaMacro).
Expand Down
16 changes: 8 additions & 8 deletions plugins/luamacro/luafar/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ static int _EditorGetString(lua_State *L, int is_wide)
intptr_t line_num = luaL_optinteger(L, 2, 0) - 1;
intptr_t mode = luaL_optinteger(L, 3, 0);
BOOL res = 0;
struct EditorGetString egs;
struct EditorGetString egs = {};
egs.StructSize = sizeof(egs);

if(mode == 0 || mode == 3)
Expand Down Expand Up @@ -4381,12 +4381,12 @@ static int far_LStrnicmp(lua_State *L)
// @Flags: PN_SKIPPATH, PN_SHOWERRORMESSAGE
// @Size: integer 0...0xFFFF
// @Result: boolean
static int _ProcessName (lua_State *L, int Op)
static int _ProcessName (lua_State *L, UINT64 Op)
{
struct FarStandardFunctions *FSF = GetPluginData(L)->FSF;

int pos2=2, pos3=3, pos4=4;
if (Op == -1)
if (Op == 0xFFFFFFFF)
Op = CheckFlags(L, 1);
else {
--pos2, --pos3, --pos4;
Expand All @@ -4398,8 +4398,8 @@ static int _ProcessName (lua_State *L, int Op)
int Flags = Op | OptFlags(L, pos4, 0);

if(Op == PN_CMPNAME || Op == PN_CMPNAMELIST || Op == PN_CHECKMASK) {
int result = FSF->ProcessName(Mask, (wchar_t*)Name, 0, Flags);
lua_pushboolean(L, result);
size_t result = FSF->ProcessName(Mask, (wchar_t*)Name, 0, Flags);
lua_pushboolean(L, (int)result);
}
else if (Op == PN_GENERATENAME) {
UINT64 Size = luaL_optinteger(L, pos4+1, 0) & 0xFFFF;
Expand All @@ -4408,19 +4408,19 @@ static int _ProcessName (lua_State *L, int Op)
wcsncpy(buf, Mask, BUFSIZE-1);
buf[BUFSIZE-1] = 0;

int result = FSF->ProcessName(Name, buf, BUFSIZE, Flags|Size);
size_t result = FSF->ProcessName(Name, buf, BUFSIZE, Flags|Size);
if (result)
push_utf8_string(L, buf, -1);
else
lua_pushboolean(L, result);
lua_pushboolean(L, (int)result);
}
else
luaL_argerror(L, 1, "command not supported");

return 1;
}

static int far_ProcessName (lua_State *L) { return _ProcessName(L, -1); }
static int far_ProcessName (lua_State *L) { return _ProcessName(L, 0xFFFFFFFF); }
static int far_CmpName (lua_State *L) { return _ProcessName(L, PN_CMPNAME); }
static int far_CmpNameList (lua_State *L) { return _ProcessName(L, PN_CMPNAMELIST); }
static int far_CheckMask (lua_State *L) { return _ProcessName(L, PN_CHECKMASK); }
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 789
#define PLUGIN_BUILD 790

0 comments on commit 7d23fa0

Please sign in to comment.