Skip to content

Commit d83f1ea

Browse files
committed
ahkxdll mingw
1 parent 0a3a601 commit d83f1ea

File tree

4 files changed

+45
-6
lines changed

4 files changed

+45
-6
lines changed

AutoHotkey.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414
GNU General Public License for more details.
1515
*/
16-
16+
#ifndef DLLN
1717
#include "stdafx.h" // pre-compiled headers
1818
#include "globaldata.h" // for access to many global vars
1919
#include "application.h" // for MsgSleep()
@@ -327,3 +327,4 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
327327
MsgSleep(SLEEP_INTERVAL, WAIT_FOR_MESSAGES);
328328
return 0; // Never executed; avoids compiler warning.
329329
}
330+
#endif

script.cpp

+39-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ GNU General Public License for more details.
2121
#include "mt19937ar-cok.h" // for random number generator
2222
#include "window.h" // for a lot of things
2323
#include "application.h" // for MsgSleep()
24-
24+
#include "exports.h" // Naveen v8
2525
// Globals that are for only this module:
2626
#define MAX_COMMENT_FLAG_LENGTH 15
2727
static char g_CommentFlag[MAX_COMMENT_FLAG_LENGTH + 1] = ";"; // Adjust the below for any changes.
@@ -6914,6 +6914,44 @@ Func *Script::FindFunc(char *aFuncName, size_t aFuncNameLength)
69146914
bif = BIF_SubStr;
69156915
min_params = 2;
69166916
max_params = 3;
6917+
}
6918+
else if (!stricmp(func_name, "Import")) // addFile() Naveen v8.
6919+
{
6920+
bif = BIF_Import;
6921+
min_params = 1;
6922+
max_params = 3;
6923+
}
6924+
else if (!stricmp(func_name, "Static")) // lowlevel() Naveen v9.
6925+
{
6926+
bif = BIF_Static;
6927+
min_params = 1;
6928+
max_params = 1;
6929+
}
6930+
else if (!stricmp(func_name, "Alias")) // lowlevel() Naveen v9.
6931+
{
6932+
bif = BIF_Alias;
6933+
min_params = 1;
6934+
max_params = 2;
6935+
}
6936+
else if (!stricmp(func_name, "GetTokenValue")) // lowlevel() Naveen v9.
6937+
{
6938+
bif = BIF_GetTokenValue;
6939+
min_params = 1;
6940+
max_params = 1;
6941+
}
6942+
6943+
else if (!stricmp(func_name, "CacheEnable")) // lowlevel() Naveen v9.
6944+
{
6945+
bif = BIF_CacheEnable;
6946+
min_params = 1;
6947+
max_params = 1;
6948+
}
6949+
6950+
else if (!stricmp(func_name, "Getvar")) // lowlevel() Naveen v9.
6951+
{
6952+
bif = BIF_Getvar;
6953+
min_params = 1;
6954+
max_params = 1;
69176955
}
69186956
else if (!stricmp(func_name, "InStr"))
69196957
{

script.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ GNU General Public License for more details.
2828
#ifdef AUTOHOTKEYSC
2929
#include "lib/exearc_read.h"
3030
#endif
31-
31+
#include "exports.h" // Naveen for addfile in script2.cpp
3232
#include "os_version.h" // For the global OS_Version object
3333
EXTERN_OSVER; // For the access to the g_os version object without having to include globaldata.h
3434
EXTERN_G;
@@ -2322,6 +2322,8 @@ class Script
23222322
{
23232323
private:
23242324
friend class Hotkey;
2325+
2326+
public: // Naveen made bunch of stuff public
23252327
Line *mFirstLine, *mLastLine; // The first and last lines in the linked list.
23262328
UINT mLineCount; // The number of lines.
23272329
Label *mFirstLabel, *mLastLabel; // The first and last labels in the linked list.
@@ -2376,7 +2378,6 @@ class Script
23762378
, AttributeType aLoopTypeReg = ATTR_NONE, AttributeType aLoopTypeRead = ATTR_NONE
23772379
, AttributeType aLoopTypeParse = ATTR_NONE);
23782380

2379-
public:
23802381
Line *mCurrLine; // Seems better to make this public than make Line our friend.
23812382
Label *mPlaceholderLabel; // Used in place of a NULL label to simplify code.
23822383
char mThisMenuItemName[MAX_MENU_NAME_LENGTH + 1];

var.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ struct VarBkp // This should be kept in sync with any changes to the Var class.
7676
typedef VarSizeType (* BuiltInVarType)(char *aBuf, char *aVarName);
7777
class Var
7878
{
79-
private:
79+
public: // Naveen
8080
// Keep VarBkp (above) in sync with any changes made to the members here.
8181
char *mContents;
8282
union
@@ -101,7 +101,6 @@ class Var
101101
// but even if it's not a fluke, it doesn't seem worth the increase in memory for scripts with many
102102
// thousands of variables.
103103

104-
public:
105104
// Testing shows that due to data alignment, keeping mType adjacent to the other less-than-4-size member
106105
// above it reduces size of each object by 4 bytes.
107106
char *mName; // The name of the var.

0 commit comments

Comments
 (0)