From 6adc39c848b16493c28076ecdc8f245811dfc5f1 Mon Sep 17 00:00:00 2001 From: anders_k Date: Thu, 23 Oct 2014 16:02:16 +0000 Subject: [PATCH] Math plugin needs tchar.h git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6561 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Math/Source/Math.h | 1 + Contrib/Math/Source/MyMath.h | 1 + Contrib/StartMenu/StartMenu.c | 2 +- Source/exehead/api.h | 2 +- Source/exehead/util.c | 2 +- Source/exehead/util.h | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Contrib/Math/Source/Math.h b/Contrib/Math/Source/Math.h index 60c4049c..9824f871 100644 --- a/Contrib/Math/Source/Math.h +++ b/Contrib/Math/Source/Math.h @@ -3,6 +3,7 @@ #pragma once #include // nsis plugin +#include #ifdef _DEBUG //#define _DEBUG_LEAKS diff --git a/Contrib/Math/Source/MyMath.h b/Contrib/Math/Source/MyMath.h index 74936d0c..03c35d05 100644 --- a/Contrib/Math/Source/MyMath.h +++ b/Contrib/Math/Source/MyMath.h @@ -4,6 +4,7 @@ #include #include +#include #define DEFAULT_ARRAY_SIZE 1024 diff --git a/Contrib/StartMenu/StartMenu.c b/Contrib/StartMenu/StartMenu.c index 2506c3fe..fd3b7382 100644 --- a/Contrib/StartMenu/StartMenu.c +++ b/Contrib/StartMenu/StartMenu.c @@ -23,7 +23,7 @@ int rtl; WNDPROC lpWndProcOld; -void (__stdcall *validate_filename)(TCHAR *); +void (__stdcall *validate_filename)(LPTSTR); INT_PTR CALLBACK dlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK ParentWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); diff --git a/Source/exehead/api.h b/Source/exehead/api.h index 4ca7e128..5c225441 100644 --- a/Source/exehead/api.h +++ b/Source/exehead/api.h @@ -64,7 +64,7 @@ typedef struct typedef struct { exec_flags_t *exec_flags; int (NSISCALL *ExecuteCodeSegment)(int, HWND); - void (NSISCALL *validate_filename)(TCHAR *); + void (NSISCALL *validate_filename)(LPTSTR); int (NSISCALL *RegisterPluginCallback)(HMODULE, NSISPLUGINCALLBACK); // returns 0 on success, 1 if already registered and < 0 on errors } extra_parameters; diff --git a/Source/exehead/util.c b/Source/exehead/util.c index 01b16955..ec5d94c5 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -855,7 +855,7 @@ TCHAR * NSISCALL GetNSISString(TCHAR *outbuf, int strtab) return ps_tmpbuf; } -void NSISCALL validate_filename(TCHAR *in) { +void NSISCALL validate_filename(LPTSTR in) { TCHAR *nono = _T("*?|<>/\":"); TCHAR *out; TCHAR *out_save; diff --git a/Source/exehead/util.h b/Source/exehead/util.h index 7578bfb1..f7817b25 100644 --- a/Source/exehead/util.h +++ b/Source/exehead/util.h @@ -98,7 +98,7 @@ TCHAR * NSISCALL findchar(TCHAR *str, TCHAR c); TCHAR * NSISCALL trimslashtoend(TCHAR *buf); TCHAR * NSISCALL skip_root(TCHAR *path); int NSISCALL is_valid_instpath(TCHAR *s); -void NSISCALL validate_filename(TCHAR *fn); +void NSISCALL validate_filename(LPTSTR fn); /** * MoveFileOnReboot tries to move a file by the name of pszExisting to the