Skip to content

Commit

Permalink
LuaFAR (generic plugin): ExitFARW экспортируется всегда (убраны дирек…
Browse files Browse the repository at this point in the history
…тивы условной компиляции).
  • Loading branch information
shmuz committed Jun 14, 2016
1 parent 43f47af commit de92e8b
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 14 deletions.
7 changes: 4 additions & 3 deletions enc/enc_lua/luafar_manual.tsi
Expand Up @@ -167,7 +167,7 @@ lv=2
dt=Text
nm=Customizing the generic plugin
ctime=3612528153
mtime=3639821503
mtime=3675075603
<article>
#_<markdown>
#_
Expand All @@ -177,9 +177,9 @@ mtime=3639821503
#_- **`TARGET`** - name of the resulting DLL, e.g.: "`TARGET = helloworld.dll`".
#_
#_- **`FAR_EXPORTS`** - list of functions that should be exported by the plugin (in uppercase, whitespace-separated, final letter `W` removed), e.g.:<br>
#_ "`FAR_EXPORTS = OPEN EXITFAR`".<br>
#_ "`FAR_EXPORTS = OPEN PROCESSEDITORINPUT`".<br>
#_The following functions are always exported, so there's no need to include them in the list:
#_`GetGlobalInfoW`, `SetStartupInfoW`, `GetPluginInfoW` and `ProcessSynchroEventW`.
#_`GetGlobalInfoW`, `SetStartupInfoW`, `GetPluginInfoW`, `ExitFARW` and `ProcessSynchroEventW`.
#_
#_- **`FARDIR`** - the root directory of Far Manager source tree, e.g. "`FARDIR = C:\farmanager`".
#_
Expand All @@ -188,6 +188,7 @@ mtime=3639821503
#_- **`MYLDFLAGS`** - list of additional linking-stage flags
#_
#_@@@
#_{exitfarw}: http://api.farmanager.com/ru/exported_functions/exitfarw.html
#_{getglobalinfow}: http://api.farmanager.com/ru/exported_functions/getglobalinfow.html
#_{getplugininfow}: http://api.farmanager.com/ru/exported_functions/getplugininfow.html
#_{processsynchroeventw}: http://api.farmanager.com/ru/exported_functions/processsynchroeventw.html
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/_globalinfo.lua
@@ -1,6 +1,6 @@
function export.GetGlobalInfo()
return {
Version = { 1, 0, 0, 574 },
Version = { 1, 0, 0, 575 },
MinFarVersion = { 3, 0, 0, 4582 },
Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"),
Title = "LuaMacro",
Expand Down
6 changes: 5 additions & 1 deletion plugins/luamacro/changelog
@@ -1,4 +1,8 @@
shmuel 14.06.2016 12:35:08 +0200 - build 574
shmuel 14.06.2016 14:26:10 +0200 - build 575

1. LuaFAR (generic plugin): ExitFARW экспортируется всегда (убраны директивы условной компиляции).

shmuel 14.06.2016 12:35:08 +0200 - build 574

1. LuaFAR: LF_ExitFAR(), после вызова export.ExitFAR(), удаляет все незакрытые таймеры (если таковые
имеются), что предотвращает падения: (1) на выходе из Far и (2) при пересоздании lua_State
Expand Down
2 changes: 0 additions & 2 deletions plugins/luamacro/luafar/luaplug.c
Expand Up @@ -308,7 +308,6 @@ void LUAPLUG GetOpenPanelInfoW(struct OpenPanelInfo *Info)
#endif
//---------------------------------------------------------------------------

#ifdef EXPORT_EXITFAR
void LUAPLUG ExitFARW(const struct ExitInfo *Info)
{
if (IS_PLUGIN_READY(G))
Expand All @@ -320,7 +319,6 @@ void LUAPLUG ExitFARW(const struct ExitInfo *Info)
LEAVE_CS(G);
}
}
#endif
//---------------------------------------------------------------------------

#ifdef EXPORT_COMPARE
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/luamacro.rc
@@ -1,6 +1,6 @@
#include <farversion.hpp>

#define PLUGIN_BUILD 574
#define PLUGIN_BUILD 575
#define PLUGIN_DESC "Lua Macros for Far Manager"
#define PLUGIN_NAME "LuaMacro"
#define PLUGIN_FILENAME "luamacro.dll"
Expand Down
8 changes: 4 additions & 4 deletions plugins/luamacro/luamacro.vcxproj
Expand Up @@ -104,7 +104,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>EXPORT_OPEN;EXPORT_EXITFAR;EXPORT_PROCESSEDITOREVENT;EXPORT_PROCESSEDITORINPUT;EXPORT_PROCESSCONSOLEINPUT;EXPORT_PROCESSVIEWEREVENT;EXPORT_PROCESSDIALOGEVENT;EXPORT_CONFIGURE;RUN_LUAFAR_INIT;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>EXPORT_OPEN;EXPORT_PROCESSEDITOREVENT;EXPORT_PROCESSEDITORINPUT;EXPORT_PROCESSCONSOLEINPUT;EXPORT_PROCESSVIEWEREVENT;EXPORT_PROCESSDIALOGEVENT;EXPORT_CONFIGURE;RUN_LUAFAR_INIT;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../common/unicode;luasdk/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand Down Expand Up @@ -141,7 +141,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>EXPORT_OPEN;EXPORT_EXITFAR;EXPORT_PROCESSEDITOREVENT;EXPORT_PROCESSEDITORINPUT;EXPORT_PROCESSCONSOLEINPUT;EXPORT_PROCESSVIEWEREVENT;EXPORT_PROCESSDIALOGEVENT;EXPORT_CONFIGURE;RUN_LUAFAR_INIT;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>EXPORT_OPEN;EXPORT_PROCESSEDITOREVENT;EXPORT_PROCESSEDITORINPUT;EXPORT_PROCESSCONSOLEINPUT;EXPORT_PROCESSVIEWEREVENT;EXPORT_PROCESSDIALOGEVENT;EXPORT_CONFIGURE;RUN_LUAFAR_INIT;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../common/unicode;luasdk/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand Down Expand Up @@ -179,7 +179,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>EXPORT_OPEN;EXPORT_EXITFAR;EXPORT_PROCESSEDITOREVENT;EXPORT_PROCESSEDITORINPUT;EXPORT_PROCESSCONSOLEINPUT;EXPORT_PROCESSVIEWEREVENT;EXPORT_PROCESSDIALOGEVENT;EXPORT_CONFIGURE;RUN_LUAFAR_INIT;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>EXPORT_OPEN;EXPORT_PROCESSEDITOREVENT;EXPORT_PROCESSEDITORINPUT;EXPORT_PROCESSCONSOLEINPUT;EXPORT_PROCESSVIEWEREVENT;EXPORT_PROCESSDIALOGEVENT;EXPORT_CONFIGURE;RUN_LUAFAR_INIT;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../common/unicode;luasdk/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
Expand Down Expand Up @@ -220,7 +220,7 @@
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>EXPORT_OPEN;EXPORT_EXITFAR;EXPORT_PROCESSEDITOREVENT;EXPORT_PROCESSEDITORINPUT;EXPORT_PROCESSCONSOLEINPUT;EXPORT_PROCESSVIEWEREVENT;EXPORT_PROCESSDIALOGEVENT;EXPORT_CONFIGURE;RUN_LUAFAR_INIT;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>EXPORT_OPEN;EXPORT_PROCESSEDITOREVENT;EXPORT_PROCESSEDITORINPUT;EXPORT_PROCESSCONSOLEINPUT;EXPORT_PROCESSVIEWEREVENT;EXPORT_PROCESSDIALOGEVENT;EXPORT_CONFIGURE;RUN_LUAFAR_INIT;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>../common/unicode;luasdk/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/makefile_gcc
Expand Up @@ -13,7 +13,7 @@ DOCS = _globalinfo.lua api.lua luamacro.lua macrotest.lua utils.lua \
keymacro.lua lm_eng.lng lm_rus.lng lm_sky.lng lm_spa.lng \
luamacro.example.ini
SRCS = luafar/luaplug.c
USERCPP = -Iluasdk/include -DEXPORT_OPEN -DEXPORT_EXITFAR -DEXPORT_CONFIGURE \
USERCPP = -Iluasdk/include -DEXPORT_OPEN -DEXPORT_CONFIGURE \
-DEXPORT_PROCESSEDITOREVENT -DEXPORT_PROCESSVIEWEREVENT \
-DEXPORT_PROCESSDIALOGEVENT -DEXPORT_PROCESSEDITORINPUT -DEXPORT_PROCESSCONSOLEINPUT \
-DRUN_LUAFAR_INIT
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/makefile_vc
@@ -1,7 +1,7 @@
!include ../makefile_vc_base

NAME=LuaMacro
USERCPP=/Iluasdk/include /DEXPORT_OPEN /DEXPORT_EXITFAR /DEXPORT_CONFIGURE \
USERCPP=/Iluasdk/include /DEXPORT_OPEN /DEXPORT_CONFIGURE \
/DEXPORT_PROCESSEDITOREVENT /DEXPORT_PROCESSVIEWEREVENT \
/DEXPORT_PROCESSDIALOGEVENT /DEXPORT_PROCESSEDITORINPUT /DEXPORT_PROCESSCONSOLEINPUT \
/DRUN_LUAFAR_INIT
Expand Down

0 comments on commit de92e8b

Please sign in to comment.