Rename SysMsg->Common , force include in vc2003 and makefile.

Change default directory hidden option, tries to use newer API call.
Made compilable again with MinGW, exception handling disabled when compiled with makefile.
Change basic_string<TCHAR> to generic_string.
Fix bug with CPP lexer keyword list.
Add unicode Configurations to vc2003 project file.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@311 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
harrybharry 2008-09-09 22:35:19 +00:00
parent 2b44819492
commit d385390709
70 changed files with 627 additions and 743 deletions

View File

@ -22,3 +22,30 @@
#if (_WIN32_IE >= 0x0500)
#define RBN_CHEVRONPUSHED (RBN_FIRST - 10)
#endif // _WIN32_IE >= 0x0500
/*
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
*/
static inline int max(unsigned int a, unsigned int b) {
return (((a) > (b)) ? (a) : (b));
}
static inline int min(unsigned int a, unsigned int b) {
return (((a) < (b)) ? (a) : (b));
}
//__try and __except dont work in gcc, so heres some defines to take em out
#define __try
#define __except(x) if(false)
#define GetExceptionCode() 0
#define GetExceptionInformation() NULL
//Missing unicode CRT funcs
double _wtof(const wchar_t * string);

View File

@ -19,14 +19,15 @@
NPP_DIR = ../src
SCI_DIR = ../../scintilla/include
GCC_DIR = .
GCCINCLUDE_DIR = $(GCC_DIR)/include
#MISC:
MISC_DIR = $(NPP_DIR)/MISC
COMMON_DIR = $(MISC_DIR)/Common
EXCEPTION_DIR = $(MISC_DIR)/Exception
PLUGINS_DIR = $(MISC_DIR)/PluginsManager
PROCESS_DIR = $(MISC_DIR)/Process
REGEXT_DIR = $(MISC_DIR)/RegExt
SYSMSG_DIR = $(MISC_DIR)/SysMsg
#ScintillaComponent:
SCINT_DIR = $(NPP_DIR)/ScitillaComponent
@ -61,14 +62,15 @@ WIN_DIR = $(NPP_DIR)/WinControls
# Sources:
SRC_NPP = $(wildcard $(NPP_DIR)/*.cpp)
SRC_GCCINCLUDE = $(wildcard $(GCCINCLUDE_DIR)/*.cpp)
#MISC
SRC_MISC = $(wildcard $(MISC_DIR)/*.cpp)
SRC_COMMON = $(wildcard $(COMMON_DIR)/*.cpp)
SRC_EXCEPTION = $(wildcard $(EXCEPTION_DIR)/*.cpp)
SRC_PLUGINS = $(wildcard $(PLUGINS_DIR)/*.cpp)
SRC_PROCESS = $(wildcard $(PROCESS_DIR)/*.cpp)
SRC_REGEXT = $(wildcard $(REGEXT_DIR)/*.cpp)
SRC_SYSMSG = $(wildcard $(SYSMSG_DIR)/*.cpp)
#ScintillaComponent
SRC_SCINT = $(wildcard $(SCINT_DIR)/*.cpp)
@ -101,14 +103,15 @@ SRC_WIN = $(wildcard $(WIN_DIR)/*.cpp)
# Objects:
OBJ_NPP = $(patsubst %.cpp,%.o,$(SRC_NPP))
OBJ_GCCINCLUDE = $(patsubst %.cpp,%.o,$(SRC_GCCINCLUDE))
#MISC
OBJ_MISC = $(patsubst %.cpp,%.o,$(SRC_MISC))
OBJ_COMMON = $(patsubst %.cpp,%.o,$(SRC_COMMON))
OBJ_EXCEPTION = $(patsubst %.cpp,%.o,$(SRC_EXCEPTION))
OBJ_PLUGINS = $(patsubst %.cpp,%.o,$(SRC_PLUGINS))
OBJ_PROCESS = $(patsubst %.cpp,%.o,$(SRC_PROCESS))
OBJ_REGEXT = $(patsubst %.cpp,%.o,$(SRC_REGEXT))
OBJ_SYSMSG = $(patsubst %.cpp,%.o,$(SRC_SYSMSG))
#ScintillaComponent
OBJ_SCINT = $(patsubst %.cpp,%.o,$(SRC_SCINT))
@ -143,31 +146,33 @@ OBJ_WIN = $(patsubst %.cpp,%.o,$(SRC_WIN))
DIRS_WIN = $(WIN_DIR) $(ABOUT_DIR) $(CONTEXT_DIR) $(COLOUR_DIR) $(DOCKING_DIR) $(GRID_DIR) $(IMLIST_DIR) $(OPENSAVE_DIR) $(PREFERENCE_DIR) $(SHORTCUT_DIR) $(SPLITTER_DIR) $(STATICDLG_DIR) $(RUNDLG_DIR) $(STATUSBAR_DIR) $(TABBAR_DIR) $(TASKLIST_DIR) $(TOOLBAR_DIR) $(TOOLTIP_DIR) $(TRAYICON_DIR) $(TREEVIEW_DIR) $(WINDOWSDLG_DIR)
DIRS_TIXML = $(TIXML_DIR)
DIRS_SCINT = $(SCINT_DIR)
DIRS_MISC = $(MISC_DIR) $(EXCEPTION_DIR) $(PLUGINS_DIR) $(PROCESS_DIR) $(REGEXT_DIR) $(SYSMSG_DIR)
DIRS_MISC = $(MISC_DIR) $(COMMON_DIR) $(EXCEPTION_DIR) $(PLUGINS_DIR) $(PROCESS_DIR) $(REGEXT_DIR)
DIRS = $(NPP_DIR) $(DIRS_WIN) $(DIRS_TIXML) $(DIRS_SCINT) $(DIRS_MISC) $(SCI_DIR)
SRCS_WIN = $(SRC_WIN) $(SRC_ABOUT) $(SRC_CONTEXT) $(SRC_COLOUR) $(SRC_DOCKING) $(SRC_GRID) $(SRC_IMLIST) $(SRC_OPENSAVE) $(SRC_PREFERENCE) $(SRC_SHORTCUT) $(SRC_SPLITTER) $(SRC_STATICDLG) $(SRC_RUNDLG) $(SRC_STATUSBAR) $(SRC_TABBAR) $(SRC_TASKLIST) $(SRC_TOOLBAR) $(SRC_TOOLTIP) $(SRC_TRAYICON) $(SRC_TREEVIEW) $(SRC_WINDOWSDLG)
SRCS_TIXML = $(SRC_TIXML)
SRCS_SCINT = $(SRC_SCINT)
SRCS_MISC = $(SRC_MISC) $(SRC_EXCEPTION) $(SRC_PLUGINS) $(SRC_PROCESS) $(SRC_REGEXT) $(SRC_SYSMSG)
SRCS = $(SRC_NPP) $(SRCS_WIN) $(SRCS_TIXML) $(SRCS_SCINT) $(SRCS_MISC)
SRCS_MISC = $(SRC_MISC) $(SRC_COMMON) $(SRC_EXCEPTION) $(SRC_PLUGINS) $(SRC_PROCESS) $(SRC_REGEXT)
SRCS = $(SRC_NPP) $(SRCS_WIN) $(SRCS_TIXML) $(SRCS_SCINT) $(SRCS_MISC) $(SRC_GCCINCLUDE)
OBJS_WIN = $(OBJ_WIN) $(OBJ_ABOUT) $(OBJ_CONTEXT) $(OBJ_COLOUR) $(OBJ_DOCKING) $(OBJ_GRID) $(OBJ_IMLIST) $(OBJ_OPENSAVE) $(OBJ_PREFERENCE) $(OBJ_SHORTCUT) $(OBJ_SPLITTER) $(OBJ_STATICDLG) $(OBJ_RUNDLG) $(OBJ_STATUSBAR) $(OBJ_TABBAR) $(OBJ_TASKLIST) $(OBJ_TOOLBAR) $(OBJ_TOOLTIP) $(OBJ_TRAYICON) $(OBJ_TREEVIEW) $(OBJ_WINDOWSDLG)
OBJS_TIXML = $(OBJ_TIXML)
OBJS_SCINT = $(OBJ_SCINT)
OBJS_MISC = $(OBJ_MISC) $(OBJ_EXCEPTION) $(OBJ_PLUGINS) $(OBJ_PROCESS) $(OBJ_REGEXT) $(OBJ_SYSMSG)
OBJS = $(OBJ_NPP) $(OBJS_WIN) $(OBJS_TIXML) $(OBJS_SCINT) $(OBJS_MISC)
OBJS_MISC = $(OBJ_MISC) $(OBJ_COMMON) $(OBJ_EXCEPTION) $(OBJ_PLUGINS) $(OBJ_PROCESS) $(OBJ_REGEXT)
OBJS = $(OBJ_NPP) $(OBJS_WIN) $(OBJS_TIXML) $(OBJS_SCINT) $(OBJS_MISC) $(OBJ_GCCINCLUDE)
# Main resource file
SRC_RES = ./resources.rc
OBJ_RES = $(patsubst %.rc,%.res,$(SRC_RES))
# Parameters
INCLUDESPECIAL = -include./include/various.h
INCLUDESPECIAL = -include./include/various.h -includeCommon.h
# Comment this out for ANSI build
UNICODE = -DUNICODE -D_UNICODE
CXX = g++
#CXXFLAGS = -O2 $(INCLUDESPECIAL)
CXXFLAGS = $(INCLUDESPECIAL)
CXXFLAGS = $(INCLUDESPECIAL) -DTIXML_USE_STL $(UNICODE)
INCLUDES = $(patsubst %,-I%,$(DIRS)) -I./include
LDFLAGS = -Wl,--subsystem,windows
LIBS = -lcomdlg32 -lcomctl32 -lgdi32 -lole32 -loleacc -lshell32 -lshlwapi
@ -184,11 +189,14 @@ all: NotepadPP
NotepadPP: $(OBJS) $(OBJ_RES)
$(CXX) $(CXXFLAGS) $(INCLUDES) $(LDFLAGS) $(OBJS) $(OBJ_RES) -o $(EXEC) $(LIBS)
NotepadPPUnicode: $(OBJS) $(OBJ_RES)
$(CXX) $(CXXFLAGS) $(INCLUDES) $(LDFLAGS) $(OBJS) $(OBJ_RES) -o $(EXEC) $(LIBS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
%.res: %.rc
$(RC) $(INCLUDES) --input=$< --output=$@ --input-format=rc --output-format=coff
$(RC) $(INCLUDES) $(UNICODE) --input=$< --output=$@ --input-format=rc --output-format=coff
# Cleanup
clean:

View File

@ -1,5 +1,7 @@
#include "./include/various.h"
#define TEXT(quote) quote
#include "../src/ScitillaComponent/columnEditor.rc"
#include "../src/ScitillaComponent/FindReplaceDlg.rc"
#include "../src/ScitillaComponent/UserDefineDialog.rc"

View File

@ -18,7 +18,7 @@
#ifndef FILENAME_STRING_SPLITTER_H
#define FILENAME_STRING_SPLITTER_H
typedef std::vector<std::basic_string<TCHAR>> stringVector;
typedef std::vector<std::generic_string> stringVector;
class FileNameStringSplitter
{
@ -39,7 +39,7 @@ public :
{
str[i] = '\0';
if (str[0])
_fileNames.push_back(std::basic_string<TCHAR>(str));
_fileNames.push_back(std::generic_string(str));
i = 0;
}
isInsideQuotes = !isInsideQuotes;
@ -56,7 +56,7 @@ public :
{
str[i] = '\0';
if (str[0])
_fileNames.push_back(std::basic_string<TCHAR>(str));
_fileNames.push_back(std::generic_string(str));
i = 0;
}
pStr++;
@ -65,7 +65,7 @@ public :
case '\0' :
str[i] = *pStr;
if (str[0])
_fileNames.push_back(std::basic_string<TCHAR>(str));
_fileNames.push_back(std::generic_string(str));
fini = true;
break;

View File

@ -255,7 +255,7 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
// BOOL NPPM_GETXXXXXXXXXXXXXXXX(size_t strLen, TCHAR *str)
// where str is the allocated TCHAR array,
// strLen is the allocated array size
// The return value is TRUE when get basic_string<TCHAR> operation success
// The return value is TRUE when get generic_string operation success
// Otherwise (allocated array size is too small) FALSE
#define NPPM_GETCURRENTLINE (RUNCOMMAND_USER + CURRENT_LINE)

View File

@ -26,10 +26,10 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
if (_isDisabled)
return false;
vector<basic_string<TCHAR>> dllNames;
vector<generic_string> dllNames;
const TCHAR *pNppPath = (NppParameters::getInstance())->getNppPath();
basic_string<TCHAR> pluginsFullPathFilter = (dir && dir[0])?dir:pNppPath;
generic_string pluginsFullPathFilter = (dir && dir[0])?dir:pNppPath;
pluginsFullPathFilter += TEXT("\\plugins\\*.dll");
@ -37,14 +37,14 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
HANDLE hFindFile = ::FindFirstFile(pluginsFullPathFilter.c_str(), &foundData);
if (hFindFile != INVALID_HANDLE_VALUE)
{
basic_string<TCHAR> plugins1stFullPath = (dir && dir[0])?dir:pNppPath;
generic_string plugins1stFullPath = (dir && dir[0])?dir:pNppPath;
plugins1stFullPath += TEXT("\\plugins\\");
plugins1stFullPath += foundData.cFileName;
dllNames.push_back(plugins1stFullPath);
while (::FindNextFile(hFindFile, &foundData))
{
basic_string<TCHAR> fullPath = (dir && dir[0])?dir:pNppPath;
generic_string fullPath = (dir && dir[0])?dir:pNppPath;
fullPath += TEXT("\\plugins\\");
fullPath += foundData.cFileName;
dllNames.push_back(fullPath);
@ -63,44 +63,44 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
pi->_hLib = ::LoadLibrary(dllNames[i].c_str());
if (!pi->_hLib)
throw basic_string<TCHAR>(TEXT("Load Library is failed.\nMake \"Runtime Library\" setting of this project as \"Multi-threaded(/MT)\" may cure this problem."));
throw generic_string(TEXT("Load Library is failed.\nMake \"Runtime Library\" setting of this project as \"Multi-threaded(/MT)\" may cure this problem."));
pi->_pFuncIsUnicode = (PFUNCISUNICODE)GetProcAddress(pi->_hLib, "isUnicode");
#ifdef UNICODE
if (!pi->_pFuncIsUnicode || !pi->_pFuncIsUnicode())
throw basic_string<TCHAR>(TEXT("This ANSI plugin is not compatible with your Unicode Notepad++."));
throw generic_string(TEXT("This ANSI plugin is not compatible with your Unicode Notepad++."));
#else
if (pi->_pFuncIsUnicode)
throw basic_string<TCHAR>(TEXT("This UNICODE plugin is not compatible with your ANSI mode Notepad++."));
throw generic_string(TEXT("This Unicode plugin is not compatible with your ANSI mode Notepad++."));
#endif
pi->_pFuncSetInfo = (PFUNCSETINFO)GetProcAddress(pi->_hLib, "setInfo");
if (!pi->_pFuncSetInfo)
throw basic_string<TCHAR>(TEXT("Missing \"setInfo\" function"));
throw generic_string(TEXT("Missing \"setInfo\" function"));
pi->_pFuncGetName = (PFUNCGETNAME)GetProcAddress(pi->_hLib, "getName");
if (!pi->_pFuncGetName)
throw basic_string<TCHAR>(TEXT("Missing \"getName\" function"));
throw generic_string(TEXT("Missing \"getName\" function"));
pi->_pBeNotified = (PBENOTIFIED)GetProcAddress(pi->_hLib, "beNotified");
if (!pi->_pBeNotified)
throw basic_string<TCHAR>(TEXT("Missing \"beNotified\" function"));
throw generic_string(TEXT("Missing \"beNotified\" function"));
pi->_pMessageProc = (PMESSAGEPROC)GetProcAddress(pi->_hLib, "messageProc");
if (!pi->_pMessageProc)
throw basic_string<TCHAR>(TEXT("Missing \"messageProc\" function"));
throw generic_string(TEXT("Missing \"messageProc\" function"));
pi->_pFuncSetInfo(_nppData);
pi->_pFuncGetFuncsArray = (PFUNCGETFUNCSARRAY)GetProcAddress(pi->_hLib, "getFuncsArray");
if (!pi->_pFuncGetFuncsArray)
throw basic_string<TCHAR>(TEXT("Missing \"getFuncsArray\" function"));
throw generic_string(TEXT("Missing \"getFuncsArray\" function"));
pi->_funcItems = pi->_pFuncGetFuncsArray(&pi->_nbFuncItem);
if ((!pi->_funcItems) || (pi->_nbFuncItem <= 0))
throw basic_string<TCHAR>(TEXT("Missing \"FuncItems\" array, or the nb of Function Item is not set correctly"));
throw generic_string(TEXT("Missing \"FuncItems\" array, or the nb of Function Item is not set correctly"));
pi->_pluginMenu = ::CreateMenu();
@ -110,12 +110,12 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
{
GetLexerNameFn GetLexerName = (GetLexerNameFn)::GetProcAddress(pi->_hLib, "GetLexerName");
if (!GetLexerName)
throw basic_string<TCHAR>(TEXT("Loading GetLexerName function failed."));
throw generic_string(TEXT("Loading GetLexerName function failed."));
GetLexerStatusTextFn GetLexerStatusText = (GetLexerStatusTextFn)::GetProcAddress(pi->_hLib, "GetLexerStatusText");
if (!GetLexerStatusText)
throw basic_string<TCHAR>(TEXT("Loading GetLexerStatusText function failed."));
throw generic_string(TEXT("Loading GetLexerStatusText function failed."));
// Assign a buffer for the lexer name.
TCHAR lexName[MAX_EXTERNAL_LEXER_NAME_LEN];
@ -148,7 +148,7 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
if (!PathFileExists(xmlPath))
{
throw basic_string<TCHAR>(basic_string<TCHAR>(xmlPath) + TEXT(" is missing."));
throw generic_string(generic_string(xmlPath) + TEXT(" is missing."));
}
TiXmlDocument *_pXmlDoc = new TiXmlDocument(xmlPath);
@ -157,7 +157,7 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
{
delete _pXmlDoc;
_pXmlDoc = NULL;
throw basic_string<TCHAR>(basic_string<TCHAR>(xmlPath) + TEXT(" failed to load."));
throw generic_string(generic_string(xmlPath) + TEXT(" failed to load."));
}
for (int x = 0; x < numLexers; x++) // postpone adding in case the xml is missing/corrupt
@ -171,7 +171,7 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
}
_pluginInfos.push_back(pi);
}
catch(basic_string<TCHAR> s)
catch(generic_string s)
{
s += TEXT("\n\n");
s += USERMSG;
@ -180,7 +180,7 @@ bool PluginsManager::loadPlugins(const TCHAR *dir)
}
catch(...)
{
basic_string<TCHAR> msg = TEXT("Fail loaded");
generic_string msg = TEXT("Fail loaded");
msg += TEXT("\n\n");
msg += USERMSG;
::MessageBox(NULL, msg.c_str(), dllNames[i].c_str(), MB_OK);
@ -218,7 +218,7 @@ void PluginsManager::setMenu(HMENU hMenu, const TCHAR *menuName)
int cmdID = ID_PLUGINS_CMD + (_pluginsCommands.size() - 1);
_pluginInfos[i]->_funcItems[j]._cmdID = cmdID;
basic_string<TCHAR> itemName = _pluginInfos[i]->_funcItems[j]._itemName;
generic_string itemName = _pluginInfos[i]->_funcItems[j]._itemName;
if (_pluginInfos[i]->_funcItems[j]._pShKey)
{

View File

@ -16,7 +16,6 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "process.h"
#include "SysMsg.h"
BOOL Process::run()
{
@ -56,7 +55,7 @@ BOOL Process::run()
startup.hStdOutput = hPipeOutW;
startup.hStdError = hPipeErrW;
basic_string<TCHAR> cmd = TEXT("\"");
generic_string cmd = TEXT("\"");
cmd += _command;
cmd += TEXT("\"");
@ -65,8 +64,8 @@ BOOL Process::run()
cmd += TEXT(" ");
cmd += _args;
}
BOOL started = ::CreateProcess(NULL, // command is part of input basic_string<TCHAR>
(TCHAR *)cmd.c_str(), // (writeable) command basic_string<TCHAR>
BOOL started = ::CreateProcess(NULL, // command is part of input generic_string
(TCHAR *)cmd.c_str(), // (writeable) command generic_string
NULL, // process security
NULL, // thread security
TRUE, // inherit handles flag
@ -206,7 +205,7 @@ void Process::listenerStdOut()
}
//outbytesRead = lstrlen(bufferOut);
bufferOut[outbytesRead] = '\0';
basic_string<TCHAR> s;
generic_string s;
s.assign(bufferOut);
_stdoutStr += s;
@ -265,7 +264,7 @@ void Process::listenerStdErr()
}
//outbytesRead = lstrlen(bufferOut);
bufferErr[errbytesRead] = '\0';
basic_string<TCHAR> s;
generic_string s;
s.assign(bufferErr);
_stderrStr += s;

View File

@ -71,8 +71,8 @@ protected:
TCHAR _curDir[MAX_PATH];
// LES SORTIES
basic_string<TCHAR> _stdoutStr;
basic_string<TCHAR> _stderrStr;
generic_string _stdoutStr;
generic_string _stderrStr;
int _exitCode;
// LES HANDLES

View File

@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <windows.h>
#include "regExtDlg.h"
#include "resource.h"
#include "SysMsg.h"
const TCHAR *nppName = TEXT("Notepad++_file");
const TCHAR *nppBackup = TEXT("Notepad++_backup");

View File

@ -1,213 +0,0 @@
//this file is part of notepad++
//Copyright (C)2003 Don HO ( donho@altern.org )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "SysMsg.h"
#include <memory>
#include <algorithm>
WcharMbcsConvertor * WcharMbcsConvertor::_pSelf = new WcharMbcsConvertor;
void systemMessage(const TCHAR *title)
{
LPVOID lpMsgBuf;
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
::GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL );// Process any inserts in lpMsgBuf.
MessageBox( NULL, (LPTSTR)lpMsgBuf, title, MB_OK | MB_ICONSTOP);
::LocalFree(lpMsgBuf);
}
void printInt(int int2print)
{
TCHAR str[32];
wsprintf(str, TEXT("%d"), int2print);
::MessageBox(NULL, str, TEXT(""), MB_OK);
}
void printStr(const TCHAR *str2print)
{
::MessageBox(NULL, str2print, TEXT(""), MB_OK);
}
void writeLog(const TCHAR *logFileName, const TCHAR *log2write)
{
FILE *f = generic_fopen(logFileName, TEXT("a+"));
const TCHAR * ptr = log2write;
fwrite(log2write, sizeof(log2write[0]), lstrlen(log2write), f);
fputc('\n', f);
fflush(f);
fclose(f);
}
int filter(unsigned int code, struct _EXCEPTION_POINTERS *ep)
{
if (code == EXCEPTION_ACCESS_VIOLATION)
return EXCEPTION_EXECUTE_HANDLER;
return EXCEPTION_CONTINUE_SEARCH;
}
int getCpFromStringValue(const TCHAR * encodingStr)
{
if (!encodingStr)
return CP_ACP;
if (generic_stricmp(TEXT("windows-1250"), encodingStr) == 0)
return 1250;
if (generic_stricmp(TEXT("windows-1251"), encodingStr) == 0)
return 1251;
if (generic_stricmp(TEXT("windows-1252"), encodingStr) == 0)
return 1252;
if (generic_stricmp(TEXT("windows-1253"), encodingStr) == 0)
return 1253;
if (generic_stricmp(TEXT("windows-1254"), encodingStr) == 0)
return 1254;
if (generic_stricmp(TEXT("windows-1255"), encodingStr) == 0)
return 1255;
if (generic_stricmp(TEXT("windows-1256"), encodingStr) == 0)
return 1256;
if (generic_stricmp(TEXT("windows-1257"), encodingStr) == 0)
return 1257;
if (generic_stricmp(TEXT("windows-1258"), encodingStr) == 0)
return 1258;
if (generic_stricmp(TEXT("big5"), encodingStr) == 0)
return 950;
if (generic_stricmp(TEXT("gb2312"), encodingStr) == 0)
return 936;
if (generic_stricmp(TEXT("shift_jis"), encodingStr) == 0)
return 936;
if (generic_stricmp(TEXT("euc-kr"), encodingStr) == 0)
return 936;
if (generic_stricmp(TEXT("tis-620"), encodingStr) == 0)
return 874;
if (generic_stricmp(TEXT("iso-8859-8"), encodingStr) == 0)
return 28598;
if (generic_stricmp(TEXT("utf-8"), encodingStr) == 0)
return 65001;
return CP_ACP;
}
std::basic_string<TCHAR> purgeMenuItemString(const TCHAR * menuItemStr, bool keepAmpersand)
{
TCHAR cleanedName[64] = TEXT("");
size_t j = 0;
size_t menuNameLen = lstrlen(menuItemStr);
for(size_t k = 0 ; k < menuNameLen ; k++)
{
if (menuItemStr[k] == '\t')
{
cleanedName[k] = 0;
break;
}
else if (menuItemStr[k] == '&')
{
if (keepAmpersand)
cleanedName[j++] = menuItemStr[k];
//else skip
}
else
{
cleanedName[j++] = menuItemStr[k];
}
}
cleanedName[j] = 0;
return cleanedName;
};
const wchar_t * WcharMbcsConvertor::char2wchar(const char * mbcs2Convert, UINT codepage)
{
if (!_wideCharStr)
{
_wideCharStr = new wchar_t[initSize];
_wideCharAllocLen = initSize;
}
int len = MultiByteToWideChar(codepage, 0, mbcs2Convert, -1, _wideCharStr, 0);
if (len > 0)
{
if (len > int(_wideCharAllocLen))
{
delete [] _wideCharStr;
_wideCharAllocLen = len;
_wideCharStr = new wchar_t[_wideCharAllocLen];
}
MultiByteToWideChar(codepage, 0, mbcs2Convert, -1, _wideCharStr, len);
}
else
_wideCharStr[0] = 0;
return _wideCharStr;
}
const char * WcharMbcsConvertor::wchar2char(const wchar_t * wcharStr2Convert, UINT codepage)
{
if (!_multiByteStr)
{
_multiByteStr = new char[initSize];
_multiByteAllocLen = initSize;
}
int len = WideCharToMultiByte(codepage, 0, wcharStr2Convert, -1, _multiByteStr, 0, NULL, NULL);
if (len > 0)
{
if (len > int(_multiByteAllocLen))
{
delete [] _multiByteStr;
_multiByteAllocLen = len;
_multiByteStr = new char[_multiByteAllocLen];
}
WideCharToMultiByte(codepage, 0, wcharStr2Convert, -1, _multiByteStr, len, NULL, NULL);
}
else
_multiByteStr[0] = 0;
return _multiByteStr;
}
std::wstring string2wstring(const std::string & rString, UINT codepage)
{
int len = MultiByteToWideChar(codepage, 0, rString.c_str(), -1, NULL, 0);
if(len > 0)
{
std::vector<wchar_t> vw(len);
MultiByteToWideChar(codepage, 0, rString.c_str(), -1, &vw[0], len);
return &vw[0];
}
else
return L"";
}
std::string wstring2string(const std::wstring & rwString, UINT codepage)
{
int len = WideCharToMultiByte(codepage, 0, rwString.c_str(), -1, NULL, 0, NULL, NULL);
if(len > 0)
{
std::vector<char> vw(len);
WideCharToMultiByte(codepage, 0, rwString.c_str(), -1, &vw[0], len, NULL, NULL);
return &vw[0];
}
else
return "";
}

View File

@ -1,112 +0,0 @@
//this file is part of notepad++
//Copyright (C)2003 Don HO ( donho@altern.org )
//
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef M30_IDE_COMMUN_H
#define M30_IDE_COMMUN_H
#include <windows.h>
#include <string>
#include <vector>
#include <time.h>
void systemMessage(const TCHAR *title);
//DWORD ShortToLongPathName(LPCTSTR lpszShortPath, LPTSTR lpszLongPath, DWORD cchBuffer);
void printInt(int int2print);
void printStr(const TCHAR *str2print);
void writeLog(const TCHAR *logFileName, const TCHAR *log2write);
int filter(unsigned int code, struct _EXCEPTION_POINTERS *ep);
int getCpFromStringValue(const TCHAR * encodingStr);
std::basic_string<TCHAR> purgeMenuItemString(const TCHAR * menuItemStr, bool keepAmpersand = false);
#define CP_ANSI_LATIN_1 1252
#define CP_BIG5 950
#ifdef UNICODE
#define NppMainEntry wWinMain
#define generic_strtol wcstol
#define generic_strncpy wcsncpy
#define generic_stricmp wcsicmp
#define generic_strncmp wcsncmp
#define generic_strnicmp wcsnicmp
#define generic_strncat wcsncat
#define generic_strchr wcschr
#define generic_atoi _wtoi
#define generic_atof _wtof
#define generic_strtok wcstok
#define generic_strftime wcsftime
#define generic_fprintf fwprintf
#define generic_sscanf swscanf
#define generic_fopen _wfopen
#define generic_fgets fgetws
#define generic_stat _wstat
#define COPYDATA_FILENAMES COPYDATA_FILENAMESW
#else
#define NppMainEntry WinMain
#define generic_strtol strtol
#define generic_strncpy strncpy
#define generic_stricmp stricmp
#define generic_strncmp strncmp
#define generic_strnicmp strnicmp
#define generic_strncat strncat
#define generic_strchr strchr
#define generic_atoi atoi
#define generic_atof atof
#define generic_strtok strtok
#define generic_strftime strftime
#define generic_fprintf fprintf
#define generic_sscanf sscanf
#define generic_fopen fopen
#define generic_fgets fgets
#define generic_stat _stat
#define COPYDATA_FILENAMES COPYDATA_FILENAMESA
#endif
//void char2wchar(const char* pszCHAR, wchar_t* pszWCHAR, UINT codepage);
//void wchar2char(const wchar_t* pszWCHAR, char* pszCHAR, UINT codepage);
std::wstring string2wstring(const std::string & rString, UINT codepage);
std::string wstring2string(const std::wstring & rwString, UINT codepage);
class WcharMbcsConvertor {
public:
static WcharMbcsConvertor * getInstance() {return _pSelf;};
static void destroyInstance() {delete _pSelf;};
const wchar_t * char2wchar(const char* mbStr, UINT codepage);
const char * wchar2char(const wchar_t* wcStr, UINT codepage);
protected:
WcharMbcsConvertor() : _multiByteStr(NULL), _wideCharStr(NULL), _multiByteAllocLen(0), _wideCharAllocLen(0), initSize(1024) {
};
~WcharMbcsConvertor() {
if (_multiByteStr)
delete [] _multiByteStr;
if (_wideCharStr)
delete [] _wideCharStr;
};
static WcharMbcsConvertor * _pSelf;
const int initSize;
char *_multiByteStr;
size_t _multiByteAllocLen;
wchar_t *_wideCharStr;
size_t _wideCharAllocLen;
};
#endif //M30_IDE_COMMUN_H

View File

@ -24,7 +24,6 @@
//#include "dbghelp.h"
#include "Notepad_plus.h"
#include "SysMsg.h"
#include "FileDialog.h"
#include "resource.h"
#include "printer.h"
@ -133,7 +132,7 @@ Notepad_plus::Notepad_plus(): Window(), _mainWindowStatus(0), _pDocTab(NULL), _p
//putain, enfin!!!
if (valueNode)
{
basic_string<TCHAR> locator = themeDir?themeDir:TEXT("");
generic_string locator = themeDir?themeDir:TEXT("");
locator += valueNode->Value();
_customIconVect.push_back(iconLocator(0, iIcon, locator));
@ -147,7 +146,7 @@ Notepad_plus::Notepad_plus(): Window(), _mainWindowStatus(0), _pDocTab(NULL), _p
//putain, enfin!!!
if (valueNode)
{
basic_string<TCHAR> locator = themeDir?themeDir:TEXT("");
generic_string locator = themeDir?themeDir:TEXT("");
locator += valueNode->Value();
_customIconVect.push_back(iconLocator(1, iIcon, locator));
@ -161,7 +160,7 @@ Notepad_plus::Notepad_plus(): Window(), _mainWindowStatus(0), _pDocTab(NULL), _p
//putain, enfin!!!
if (valueNode)
{
basic_string<TCHAR> locator = themeDir?themeDir:TEXT("");
generic_string locator = themeDir?themeDir:TEXT("");
locator += valueNode->Value();
_customIconVect.push_back(iconLocator(2, iIcon, locator));
@ -827,10 +826,10 @@ bool Notepad_plus::fileReload()
return doReload(buf, true);
}
basic_string<TCHAR> exts2Filters(basic_string<TCHAR> exts) {
generic_string exts2Filters(generic_string exts) {
const TCHAR *extStr = exts.c_str();
TCHAR aExt[MAX_PATH];
basic_string<TCHAR> filters(TEXT(""));
generic_string filters(TEXT(""));
int j = 0;
bool stop = false;
@ -912,7 +911,7 @@ void Notepad_plus::setFileOpenSaveDlgFilters(FileDialog & fDlg)
if (pLS)
userList = pLS->getLexerUserExt();
std::basic_string<TCHAR> list(TEXT(""));
std::generic_string list(TEXT(""));
if (defList)
list += defList;
if (userList)
@ -921,7 +920,7 @@ void Notepad_plus::setFileOpenSaveDlgFilters(FileDialog & fDlg)
list += userList;
}
basic_string<TCHAR> stringFilters = exts2Filters(list);
generic_string stringFilters = exts2Filters(list);
const TCHAR *filters = stringFilters.c_str();
if (filters[0])
{
@ -962,7 +961,7 @@ bool Notepad_plus::isFileSession(const TCHAR * filename) {
TCHAR fncp[MAX_PATH];
lstrcpy(fncp, filename);
TCHAR *pExt = PathFindExtension(fncp);
basic_string<TCHAR> usrSessionExt = TEXT("");
generic_string usrSessionExt = TEXT("");
if (*definedSessionExt != '.')
{
usrSessionExt += TEXT(".");
@ -998,7 +997,7 @@ bool Notepad_plus::fileSave(BufferID id)
if (backup == bak_simple)
{
//copy fn to fn.backup
basic_string<TCHAR> fn_bak(fn);
generic_string fn_bak(fn);
if ((nppgui._useDir) && (nppgui._backupDir[0] != '\0'))
{
TCHAR path[MAX_PATH];
@ -1021,7 +1020,7 @@ bool Notepad_plus::fileSave(BufferID id)
{
TCHAR path[MAX_PATH];
TCHAR *name;
basic_string<TCHAR> fn_dateTime_bak;
generic_string fn_dateTime_bak;
lstrcpy(path, fn);
@ -1404,7 +1403,7 @@ bool Notepad_plus::replaceAllFiles() {
return true;
}
bool Notepad_plus::matchInList(const TCHAR *fileName, const vector<basic_string<TCHAR>> & patterns)
bool Notepad_plus::matchInList(const TCHAR *fileName, const vector<generic_string> & patterns)
{
for (size_t i = 0 ; i < patterns.size() ; i++)
{
@ -1456,9 +1455,9 @@ void Notepad_plus::loadLastSession()
loadSession(lastSession);
}
void Notepad_plus::getMatchedFileNames(const TCHAR *dir, const vector<basic_string<TCHAR>> & patterns, vector<basic_string<TCHAR>> & fileNames, bool isRecursive, bool isInHiddenDir)
void Notepad_plus::getMatchedFileNames(const TCHAR *dir, const vector<generic_string> & patterns, vector<generic_string> & fileNames, bool isRecursive, bool isInHiddenDir)
{
basic_string<TCHAR> dirFilter(dir);
generic_string dirFilter(dir);
dirFilter += TEXT("*.*");
WIN32_FIND_DATA foundData;
@ -1477,7 +1476,7 @@ void Notepad_plus::getMatchedFileNames(const TCHAR *dir, const vector<basic_stri
{
if ((lstrcmp(foundData.cFileName, TEXT("."))) && (lstrcmp(foundData.cFileName, TEXT(".."))))
{
basic_string<TCHAR> pathDir(dir);
generic_string pathDir(dir);
pathDir += foundData.cFileName;
pathDir += TEXT("\\");
getMatchedFileNames(pathDir.c_str(), patterns, fileNames, isRecursive, isInHiddenDir);
@ -1488,7 +1487,7 @@ void Notepad_plus::getMatchedFileNames(const TCHAR *dir, const vector<basic_stri
{
if (matchInList(foundData.cFileName, patterns))
{
basic_string<TCHAR> pathFile(dir);
generic_string pathFile(dir);
pathFile += foundData.cFileName;
fileNames.push_back(pathFile.c_str());
}
@ -1506,7 +1505,7 @@ void Notepad_plus::getMatchedFileNames(const TCHAR *dir, const vector<basic_stri
{
if ((lstrcmp(foundData.cFileName, TEXT("."))) && (lstrcmp(foundData.cFileName, TEXT(".."))))
{
basic_string<TCHAR> pathDir(dir);
generic_string pathDir(dir);
pathDir += foundData.cFileName;
pathDir += TEXT("\\");
getMatchedFileNames(pathDir.c_str(), patterns, fileNames, isRecursive, isInHiddenDir);
@ -1517,7 +1516,7 @@ void Notepad_plus::getMatchedFileNames(const TCHAR *dir, const vector<basic_stri
{
if (matchInList(foundData.cFileName, patterns))
{
basic_string<TCHAR> pathFile(dir);
generic_string pathFile(dir);
pathFile += foundData.cFileName;
fileNames.push_back(pathFile.c_str());
}
@ -1542,11 +1541,11 @@ bool Notepad_plus::findInFiles(bool isRecursive, bool isInHiddenDir)
{
return false;
}
vector<basic_string<TCHAR>> patterns2Match;
vector<generic_string> patterns2Match;
if (_findReplaceDlg.getFilters() == TEXT(""))
_findReplaceDlg.setFindInFilesDirFilter(NULL, TEXT("*.*"));
_findReplaceDlg.getPatterns(patterns2Match);
vector<basic_string<TCHAR>> fileNames;
vector<generic_string> fileNames;
getMatchedFileNames(dir2Search, patterns2Match, fileNames, isRecursive, isInHiddenDir);
bool dontClose = false;
@ -1760,19 +1759,19 @@ void Notepad_plus::checkLangsMenu(int id) const
::CheckMenuRadioItem(_mainMenuHandle, IDM_LANG_C, IDM_LANG_USER_LIMIT, id, MF_BYCOMMAND);
}
basic_string<TCHAR> Notepad_plus::getLangDesc(LangType langType, bool shortDesc)
generic_string Notepad_plus::getLangDesc(LangType langType, bool shortDesc)
{
if ((langType >= L_EXTERNAL) && (langType < NppParameters::getInstance()->L_END))
{
ExternalLangContainer & elc = NppParameters::getInstance()->getELCFromIndex(langType - L_EXTERNAL);
if (shortDesc)
return basic_string<TCHAR>(elc._name);
return generic_string(elc._name);
else
return basic_string<TCHAR>(elc._desc);
return generic_string(elc._desc);
}
basic_string<TCHAR> str2Show = ScintillaEditView::langNames[langType].longName;
generic_string str2Show = ScintillaEditView::langNames[langType].longName;
if (langType == L_USER)
{
@ -1878,8 +1877,8 @@ BOOL Notepad_plus::notify(SCNotification *notification)
const TCHAR *pGoToView = goToView;
const TCHAR *pCloneToView = cloneToView;
#ifdef UNICODE
basic_string<TCHAR> goToViewW = TEXT("");
basic_string<TCHAR> cloneToViewW = TEXT("");
generic_string goToViewW = TEXT("");
generic_string cloneToViewW = TEXT("");
#endif
if (_nativeLang)
{
@ -2335,7 +2334,7 @@ BOOL Notepad_plus::notify(SCNotification *notification)
::ScreenToClient(_hSelf, &p);
HWND hWin = ::RealChildWindowFromPoint(_hSelf, p);
static basic_string<TCHAR> tip;
static generic_string tip;
int id = int(lpttt->hdr.idFrom);
if (hWin == _rebarTop.getHSelf())
@ -3060,7 +3059,7 @@ void Notepad_plus::command(int id)
FindOption op = _findReplaceDlg.getCurrentOptions();
op._whichDirection = (id == IDM_SEARCH_FINDNEXT?DIR_DOWN:DIR_UP);
basic_string<TCHAR> s = _findReplaceDlg.getText2search();
generic_string s = _findReplaceDlg.getText2search();
_findReplaceDlg.processFindNext(s.c_str(), &op);
break;
@ -3934,7 +3933,15 @@ void Notepad_plus::command(int id)
if (isFirstTime && _nativeLang)
{
const TCHAR *lang = (_nativeLang->ToElement())->Attribute(TEXT("name"));
if (lang && !lstrcmp(lang, TEXT("¤¤¤åÁcÅé")))
const char * chineseString = "¤¤¤åÁcÅé";
const TCHAR * chineseStringT;
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
chineseStringT = wmc->char2wchar(chineseString, CP_ACP); //CP_ACP, CP_BIG5, which one to use? Depends on TinyXML conversion routines
#else
chineseStringT = chineseString;
#endif
if (lang && !lstrcmp(lang, chineseStringT))
{
char *authorName = "«J¤µ§^";
HWND hItem = ::GetDlgItem(_aboutDlg.getHSelf(), IDC_AUTHOR_NAME);
@ -3987,10 +3994,10 @@ void Notepad_plus::command(int id)
case IDM_UPDATE_NPP :
{
basic_string<TCHAR> updaterDir = pNppParam->getNppPath();
generic_string updaterDir = pNppParam->getNppPath();
updaterDir += TEXT("\\updater\\");
basic_string<TCHAR> updaterFullPath = updaterDir + TEXT("gup.exe");
basic_string<TCHAR> param = TEXT("-verbose -v");
generic_string updaterFullPath = updaterDir + TEXT("gup.exe");
generic_string param = TEXT("-verbose -v");
param += VERSION_VALUE;
Process updater(updaterFullPath.c_str(), param.c_str(), updaterDir.c_str());
updater.run();
@ -4418,7 +4425,7 @@ void Notepad_plus::setTitle()
//Get the buffer
Buffer * buf = _pEditView->getCurrentBuffer();
basic_string<TCHAR> result = TEXT("");
generic_string result = TEXT("");
if (buf->isDirty()) {
result += TEXT("*");
}
@ -5004,7 +5011,7 @@ void Notepad_plus::showFunctionComp() {
autoC->showFunctionComplete();
}
void Notepad_plus::changeMenuLang(basic_string<TCHAR> & pluginsTrans, basic_string<TCHAR> & windowTrans)
void Notepad_plus::changeMenuLang(generic_string & pluginsTrans, generic_string & windowTrans)
{
if (!_nativeLang) return;
@ -5664,7 +5671,7 @@ bool Notepad_plus::changeDlgLang(HWND hDlg, const TCHAR *dlgTagName, TCHAR *titl
return true;
}
static basic_string<TCHAR> extractSymbol(TCHAR prefix, const TCHAR *str2extract)
static generic_string extractSymbol(TCHAR prefix, const TCHAR *str2extract)
{
bool found = false;
TCHAR extracted[128] = TEXT("");
@ -5676,7 +5683,7 @@ static basic_string<TCHAR> extractSymbol(TCHAR prefix, const TCHAR *str2extract)
if (!str2extract[i] || str2extract[i] == ' ')
{
extracted[j] = '\0';
return basic_string<TCHAR>(extracted);
return generic_string(extracted);
}
extracted[j++] = str2extract[i];
@ -5690,13 +5697,13 @@ static basic_string<TCHAR> extractSymbol(TCHAR prefix, const TCHAR *str2extract)
found = true;
}
}
return basic_string<TCHAR>(extracted);
return generic_string(extracted);
};
bool Notepad_plus::doBlockComment(comment_mode currCommentMode)
{
const TCHAR *commentLineSybol;
basic_string<TCHAR> symbol;
generic_string symbol;
Buffer * buf = _pEditView->getCurrentBuffer();
if (buf->getLangType() == L_USER)
@ -5715,9 +5722,9 @@ bool Notepad_plus::doBlockComment(comment_mode currCommentMode)
if ((!commentLineSybol) || (!commentLineSybol[0]))
return false;
basic_string<TCHAR> comment(commentLineSybol);
generic_string comment(commentLineSybol);
comment += TEXT(" ");
basic_string<TCHAR> long_comment = comment;
generic_string long_comment = comment;
TCHAR linebuf[1000];
size_t comment_length = comment.length();
@ -5814,8 +5821,8 @@ bool Notepad_plus::doStreamComment()
const TCHAR *commentStart;
const TCHAR *commentEnd;
basic_string<TCHAR> symbolStart;
basic_string<TCHAR> symbolEnd;
generic_string symbolStart;
generic_string symbolEnd;
Buffer * buf = _pEditView->getCurrentBuffer();
if (buf->getLangType() == L_USER)
@ -5841,9 +5848,9 @@ bool Notepad_plus::doStreamComment()
if ((!commentEnd) || (!commentEnd[0]))
return false;
basic_string<TCHAR> start_comment(commentStart);
basic_string<TCHAR> end_comment(commentEnd);
basic_string<TCHAR> white_space(TEXT(" "));
generic_string start_comment(commentStart);
generic_string end_comment(commentEnd);
generic_string white_space(TEXT(" "));
start_comment += white_space;
white_space += end_comment;
@ -6337,7 +6344,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
_lastRecentFileList.initMenu(hFileMenu, IDM_FILEMENU_LASTONE + 1, pos);
for (int i = 0 ; i < nbLRFile ; i++)
{
basic_string<TCHAR> * stdStr = pNppParam->getLRFile(i);
generic_string * stdStr = pNppParam->getLRFile(i);
if (nppGUI._checkHistoryFiles)
{
if (PathFileExists(stdStr->c_str()))
@ -6363,7 +6370,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
_subEditView.execute(SCI_USEPOPUP, FALSE);
}
basic_string<TCHAR> pluginsTrans, windowTrans;
generic_string pluginsTrans, windowTrans;
changeMenuLang(pluginsTrans, windowTrans);
if (_pluginsManager.hasPlugins() && pluginsTrans != TEXT(""))
@ -6609,7 +6616,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
const TCHAR *dir = NULL;
//TCHAR currentDir[MAX_PATH];
basic_string<TCHAR> fltr;
generic_string fltr;
if (wParam)
dir = (const TCHAR *)wParam;
@ -6631,8 +6638,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
const TCHAR *ext = NppParameters::getInstance()->getLangExtFromLangType(lt);
if (ext && ext[0])
{
basic_string<TCHAR> filtres = TEXT("");
vector<basic_string<TCHAR>> vStr;
generic_string filtres = TEXT("");
vector<generic_string> vStr;
cutString(ext, vStr);
for (size_t i = 0 ; i < vStr.size() ; i++)
{
@ -6815,8 +6822,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
else if (Message == NPPM_GETEXTPART)
fileStr = PathFindExtension(str);
// For the compability reason, if wParam is 0, then we assume the size of basic_string<TCHAR> buffer (lParam) is large enough.
// otherwise we check if the basic_string<TCHAR> buffer size is enough for the basic_string<TCHAR> to copy.
// For the compability reason, if wParam is 0, then we assume the size of generic_string buffer (lParam) is large enough.
// otherwise we check if the generic_string buffer size is enough for the generic_string to copy.
if (wParam != 0)
{
if (lstrlen(fileStr) >= int(wParam))
@ -6836,8 +6843,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
TCHAR str[strSize];
_pEditView->getGenericSelectedText((TCHAR *)str, strSize);
// For the compability reason, if wParam is 0, then we assume the size of basic_string<TCHAR> buffer (lParam) is large enough.
// otherwise we check if the basic_string<TCHAR> buffer size is enough for the basic_string<TCHAR> to copy.
// For the compability reason, if wParam is 0, then we assume the size of generic_string buffer (lParam) is large enough.
// otherwise we check if the generic_string buffer size is enough for the generic_string to copy.
if (wParam != 0)
{
if (lstrlen(str) >= int(wParam)) //buffer too small
@ -6864,8 +6871,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
::GetModuleFileName(NULL, str, strSize);
PathRemoveFileSpec(str);
// For the compability reason, if wParam is 0, then we assume the size of basic_string<TCHAR> buffer (lParam) is large enough.
// otherwise we check if the basic_string<TCHAR> buffer size is enough for the basic_string<TCHAR> to copy.
// For the compability reason, if wParam is 0, then we assume the size of generic_string buffer (lParam) is large enough.
// otherwise we check if the generic_string buffer size is enough for the generic_string to copy.
if (wParam != 0)
{
if (lstrlen(str) >= int(wParam))
@ -8176,7 +8183,7 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session)
Buffer * buf = MainFileManager->getBufferByID(bufID);
if (!buf->isUntitled() && PathFileExists(buf->getFilePath()))
{
basic_string<TCHAR> languageName = getLangFromMenu( buf );
generic_string languageName = getLangFromMenu( buf );
const TCHAR *langName = languageName.c_str();
sessionFileInfo sfi(buf->getFilePath(), langName, buf->getPosition(&_mainEditView));
@ -8201,7 +8208,7 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session)
Buffer * buf = MainFileManager->getBufferByID(bufID);
if (!buf->isUntitled() && PathFileExists(buf->getFilePath()))
{
basic_string<TCHAR> languageName = getLangFromMenu( buf );
generic_string languageName = getLangFromMenu( buf );
const TCHAR *langName = languageName.c_str();
sessionFileInfo sfi(buf->getFilePath(), langName, buf->getPosition(&_subEditView));
@ -8238,7 +8245,7 @@ bool Notepad_plus::fileLoadSession(const TCHAR *fn)
FileDialog fDlg(_hSelf, _hInst);
fDlg.setExtFilter(TEXT("All types"), TEXT(".*"), NULL);
const TCHAR *ext = NppParameters::getInstance()->getNppGUI()._definedSessionExt.c_str();
basic_string<TCHAR> sessionExt = TEXT("");
generic_string sessionExt = TEXT("");
if (*ext != '\0')
{
if (*ext != '.')
@ -8282,7 +8289,7 @@ const TCHAR * Notepad_plus::fileSaveSession(size_t nbFile, TCHAR ** fileNames, c
for (size_t i = 0 ; i < nbFile ; i++)
{
if (PathFileExists(fileNames[i]))
currentSession._mainViewFiles.push_back(basic_string<TCHAR>(fileNames[i]));
currentSession._mainViewFiles.push_back(generic_string(fileNames[i]));
}
}
else
@ -8302,7 +8309,7 @@ const TCHAR * Notepad_plus::fileSaveSession(size_t nbFile, TCHAR ** fileNames)
const TCHAR *ext = NppParameters::getInstance()->getNppGUI()._definedSessionExt.c_str();
fDlg.setExtFilter(TEXT("All types"), TEXT(".*"), NULL);
basic_string<TCHAR> sessionExt = TEXT("");
generic_string sessionExt = TEXT("");
if (*ext != '\0')
{
if (*ext != '.')

View File

@ -80,9 +80,9 @@ static TiXmlNode * searchDlgNode(TiXmlNode *node, const TCHAR *dlgTagName);
struct iconLocator {
int listIndex;
int iconIndex;
std::basic_string<TCHAR> iconLocation;
std::generic_string iconLocation;
iconLocator(int iList, int iIcon, const std::basic_string<TCHAR> iconLoc)
iconLocator(int iList, int iIcon, const std::generic_string iconLoc)
: listIndex(iList), iconIndex(iIcon), iconLocation(iconLoc){};
};
@ -163,7 +163,7 @@ public:
void changeConfigLang();
void changeUserDefineLang();
void changeMenuLang(basic_string<TCHAR> & pluginsTrans, basic_string<TCHAR> & windowTrans);
void changeMenuLang(generic_string & pluginsTrans, generic_string & windowTrans);
void changePrefereceDlgLang();
void changeShortcutLang();
void changeShortcutmapperLang(ShortcutMapper * sm);
@ -441,14 +441,14 @@ private:
void checkUnicodeMenuItems(UniMode um) const;
basic_string<TCHAR> getLangDesc(LangType langType, bool shortDesc = false);
generic_string getLangDesc(LangType langType, bool shortDesc = false);
void setLangStatus(LangType langType){
_statusBar.setText(getLangDesc(langType).c_str(), STATUSBAR_DOC_TYPE);
};
void setDisplayFormat(formatType f) {
std::basic_string<TCHAR> str;
std::generic_string str;
switch (f)
{
case MAC_FORMAT :
@ -563,12 +563,12 @@ private:
void copyMarkedLines() {
int lastLine = _pEditView->lastZeroBasedLineNumber();
basic_string<TCHAR> globalStr = TEXT("");
generic_string globalStr = TEXT("");
for (int i = lastLine ; i >= 0 ; i--)
{
if (bookmarkPresent(i))
{
basic_string<TCHAR> currentStr = getMarkedLine(i) + globalStr;
generic_string currentStr = getMarkedLine(i) + globalStr;
globalStr = currentStr;
}
}
@ -577,14 +577,14 @@ private:
void cutMarkedLines() {
int lastLine = _pEditView->lastZeroBasedLineNumber();
basic_string<TCHAR> globalStr = TEXT("");
generic_string globalStr = TEXT("");
_pEditView->execute(SCI_BEGINUNDOACTION);
for (int i = lastLine ; i >= 0 ; i--)
{
if (bookmarkPresent(i))
{
basic_string<TCHAR> currentStr = getMarkedLine(i) + globalStr;
generic_string currentStr = getMarkedLine(i) + globalStr;
globalStr = currentStr;
deleteMarkedline(i);
@ -614,7 +614,7 @@ private:
int len = ::GlobalSize(clipboardData);
LPVOID clipboardDataPtr = ::GlobalLock(clipboardData);
basic_string<TCHAR> clipboardStr = (const TCHAR *)clipboardDataPtr;
generic_string clipboardStr = (const TCHAR *)clipboardDataPtr;
::GlobalUnlock(clipboardData);
::CloseClipboard();
@ -646,13 +646,13 @@ private:
_pEditView->replaceTarget(str, lineBegin, lineEnd);
};
basic_string<TCHAR> getMarkedLine(int ln) {
generic_string getMarkedLine(int ln) {
int lineLen = _pEditView->execute(SCI_LINELENGTH, ln);
int lineBegin = _pEditView->execute(SCI_POSITIONFROMLINE, ln);
TCHAR * buf = new TCHAR[lineLen+1];
_pEditView->getGenericText(buf, lineBegin, lineBegin + lineLen);
basic_string<TCHAR> line = buf;
generic_string line = buf;
delete [] buf;
return line;
@ -675,8 +675,8 @@ private:
bool findInOpenedFiles();
bool findInFiles(bool isRecursive, bool isInHiddenDir);
bool matchInList(const TCHAR *fileName, const vector<basic_string<TCHAR>> & patterns);
void getMatchedFileNames(const TCHAR *dir, const vector<basic_string<TCHAR>> & patterns, vector<basic_string<TCHAR>> & fileNames, bool isRecursive, bool isInHiddenDir);
bool matchInList(const TCHAR *fileName, const vector<generic_string> & patterns);
void getMatchedFileNames(const TCHAR *dir, const vector<generic_string> & patterns, vector<generic_string> & fileNames, bool isRecursive, bool isInHiddenDir);
void doSynScorll(HWND hW);
void setWorkingDir(TCHAR *dir) {
@ -735,7 +735,7 @@ private:
return id;
};
basic_string<TCHAR> getLangFromMenu(const Buffer * buf) {
generic_string getLangFromMenu(const Buffer * buf) {
int id;
const TCHAR * userLangName;
TCHAR menuLangName[32];

View File

@ -469,7 +469,7 @@ NppParameters::~NppParameters()
::RemoveFontResource(LINEDRAW_FONT);
}
void cutString(const TCHAR *str2cut, vector<basic_string<TCHAR>> & patternVect)
void cutString(const TCHAR *str2cut, vector<generic_string> & patternVect)
{
TCHAR str2scan[MAX_PATH];
lstrcpy(str2scan, str2cut);
@ -1287,7 +1287,7 @@ void NppParameters::feedFileListParameters(TiXmlNode *node)
const TCHAR *filePath = (childNode->ToElement())->Attribute(TEXT("filename"));
if (filePath)
{
_LRFileList[_nbFile] = new basic_string<TCHAR>(filePath);
_LRFileList[_nbFile] = new generic_string(filePath);
_nbFile++;
}
}
@ -2062,7 +2062,7 @@ void StyleArray::addStyler(int styleID, TiXmlNode *styleNode)
TiXmlNode *v = styleNode->FirstChild();
if (v)
{
_styleArray[_nbStyler]._keywords = new basic_string<TCHAR>(v->Value());
_styleArray[_nbStyler]._keywords = new generic_string(v->Value());
}
}
_nbStyler++;
@ -2166,6 +2166,10 @@ void NppParameters::feedKeyWordsParameters(TiXmlNode *node)
}
}
extern "C" {
typedef DWORD (WINAPI * EESFUNC) (LPCTSTR, LPTSTR, DWORD);
}
void NppParameters::feedGUIParameters(TiXmlNode *node)
{
TiXmlNode *GUIRoot = node->FirstChildElement(TEXT("GUIConfigs"));
@ -2928,8 +2932,35 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
{
lstrcpyn(_nppGUI._defaultDir, path, MAX_PATH);
lstrcpyn(_nppGUI._defaultDirExp, path, MAX_PATH);
DWORD res = DoEnvironmentSubst(_nppGUI._defaultDirExp, MAX_PATH);
if (LOWORD(res) == FALSE) {
EESFUNC eesfunc = NULL; //MSDN doesnt list 98 as having this func, so load dynamically, fallback to DoEnvironmentSubst
HMODULE hKernel = ::LoadLibrary(TEXT("Kernel32.dll"));
if (hKernel) {
#ifdef UNICODE
eesfunc = (EESFUNC)::GetProcAddress(hKernel, "ExpandEnvironmentStringsW");
#else
eesfunc = (EESFUNC)::GetProcAddress(hKernel, "ExpandEnvironmentStringsA");
#endif
}
BOOL res = TRUE;//FALSE;
if (eesfunc) {
DWORD dres = eesfunc(_nppGUI._defaultDir, _nppGUI._defaultDirExp, 500);
if (dres >= MAX_PATH) {
res = FALSE;
} else {
res = TRUE;
}
} else {
//::MessageBox(0,TEXT("Fallback"), 0, 0);
DWORD dres = ::DoEnvironmentSubst(_nppGUI._defaultDirExp, MAX_PATH);
res = LOWORD(dres);
}
if (res == FALSE) {
_nppGUI._defaultDirValid = false; //unable to expand, cannot be used
} else if (!PathFileExists(_nppGUI._defaultDirExp)) {
_nppGUI._defaultDirValid = false; //invalid path, cannot be used

View File

@ -28,7 +28,6 @@
#include "colors.h"
#include "shortcut.h"
#include "ContextMenu.h"
#include "SysMsg.h"
using namespace std;
@ -84,7 +83,7 @@ const TCHAR LINEDRAW_FONT[] = TEXT("LINEDRAW.TTF");
const TCHAR localConfFile[] = TEXT("doLocalConf.xml");
const TCHAR notepadStyleFile[] = TEXT("asNotepad.xml");
void cutString(const TCHAR *str2cut, vector<basic_string<TCHAR>> & patternVect);
void cutString(const TCHAR *str2cut, vector<generic_string> & patternVect);
/*
struct HeaderLineState {
HeaderLineState() : _headerLineNumber(0), _isCollapsed(false){};
@ -113,11 +112,11 @@ struct sessionFileInfo : public Position {
if (ln) _langName = ln;
};
sessionFileInfo(basic_string<TCHAR> fn) : _fileName(fn){};
sessionFileInfo(basic_string<TCHAR> fn, Position pos) : Position(pos), _fileName(fn){};
sessionFileInfo(generic_string fn) : _fileName(fn){};
sessionFileInfo(generic_string fn, Position pos) : Position(pos), _fileName(fn){};
basic_string<TCHAR> _fileName;
basic_string<TCHAR> _langName;
generic_string _fileName;
generic_string _langName;
vector<size_t> marks;
};
@ -258,7 +257,7 @@ struct Style
int _fontSize;
int _keywordClass;
basic_string<TCHAR> *_keywords;
generic_string *_keywords;
Style():_styleID(-1), _fgColor(COLORREF(-1)), _bgColor(COLORREF(-1)), _colorStyle(COLORSTYLE_ALL), _fontName(NULL), _fontStyle(-1), _fontSize(-1), _keywordClass(-1), _keywords(NULL){};
@ -279,7 +278,7 @@ struct Style
_fontStyle = style._fontStyle;
_keywordClass = style._keywordClass;
if (style._keywords)
_keywords = new basic_string<TCHAR>(*(style._keywords));
_keywords = new generic_string(*(style._keywords));
else
_keywords = NULL;
};
@ -298,7 +297,7 @@ struct Style
this->_keywordClass = style._keywordClass;
if (!(this->_keywords) && style._keywords)
this->_keywords = new basic_string<TCHAR>(*(style._keywords));
this->_keywords = new generic_string(*(style._keywords));
else if (this->_keywords && style._keywords)
this->_keywords->assign(*(style._keywords));
else if (this->_keywords && !(style._keywords))
@ -312,7 +311,7 @@ struct Style
void setKeywords(const TCHAR *str) {
if (!_keywords)
_keywords = new basic_string<TCHAR>(str);
_keywords = new generic_string(str);
else
*_keywords = str;
};
@ -484,9 +483,9 @@ struct NewDocDefaultSettings
struct LangMenuItem {
LangType _langType;
int _cmdID;
basic_string<TCHAR> _langName;
generic_string _langName;
LangMenuItem(LangType lt, int cmdID = 0, basic_string<TCHAR> langName = TEXT("")):
LangMenuItem(LangType lt, int cmdID = 0, generic_string langName = TEXT("")):
_langType(lt), _cmdID(cmdID), _langName(langName){};
};
@ -494,17 +493,17 @@ struct PrintSettings {
bool _printLineNumber;
int _printOption;
basic_string<TCHAR> _headerLeft;
basic_string<TCHAR> _headerMiddle;
basic_string<TCHAR> _headerRight;
basic_string<TCHAR> _headerFontName;
generic_string _headerLeft;
generic_string _headerMiddle;
generic_string _headerRight;
generic_string _headerFontName;
int _headerFontStyle;
int _headerFontSize;
basic_string<TCHAR> _footerLeft;
basic_string<TCHAR> _footerMiddle;
basic_string<TCHAR> _footerRight;
basic_string<TCHAR> _footerFontName;
generic_string _footerLeft;
generic_string _footerMiddle;
generic_string _footerRight;
generic_string _footerFontName;
int _footerFontStyle;
int _footerFontSize;
@ -606,7 +605,7 @@ struct NppGUI
size_t _autocFromLen;
bool _funcParams;
basic_string<TCHAR> _definedSessionExt;
generic_string _definedSessionExt;
bool _neverUpdate;
bool _doesExistUpdater;
int _caretBlinkRate;
@ -849,7 +848,7 @@ public:
int getNbLRFile() const {return _nbFile;};
basic_string<TCHAR> *getLRFile(int index) const {
generic_string *getLRFile(int index) const {
return _LRFileList[index];
};
@ -907,7 +906,7 @@ public:
};
void setFontList(HWND hWnd);
const vector<basic_string<TCHAR>> & getFontList() const {return _fontlist;};
const vector<generic_string> & getFontList() const {return _fontlist;};
int getNbUserLang() const {return _nbUserLang;};
UserLangContainer & getULCFromIndex(int i) {return *_userLangArray[i];};
@ -958,7 +957,7 @@ public:
for (int i = 0 ; i < _nbUserLang ; i++)
{
vector<basic_string<TCHAR>> extVect;
vector<generic_string> extVect;
cutString(_userLangArray[i]->_ext, extVect);
for (size_t j = 0 ; j < extVect.size() ; j++)
if (!generic_stricmp(extVect[j].c_str(), ext))
@ -1046,9 +1045,9 @@ public:
WNDPROC getEnableThemeDlgTexture() const {return _enableThemeDialogTextureFuncAddr;};
struct FindDlgTabTitiles {
basic_string<TCHAR> _find;
basic_string<TCHAR> _replace;
basic_string<TCHAR> _findInFiles;
generic_string _find;
generic_string _replace;
generic_string _findInFiles;
FindDlgTabTitiles() : _find(TEXT("")), _replace(TEXT("")), _findInFiles(TEXT("")) {};
bool isWellFilled() {
return (lstrcmp(_find.c_str(), TEXT("")) != 0 && lstrcmp(_replace.c_str(), TEXT("")) && lstrcmp(_findInFiles.c_str(), TEXT("")));
@ -1115,7 +1114,7 @@ private:
Lang *_langList[NB_LANG];
int _nbLang;
basic_string<TCHAR> *_LRFileList[NB_MAX_LRF_FILE];
generic_string *_LRFileList[NB_MAX_LRF_FILE];
int _nbFile;
int _nbMaxFile;
@ -1133,7 +1132,7 @@ private:
LexerStylerArray _lexerStylerArray;
StyleArray _widgetStyleArray;
vector<basic_string<TCHAR>> _fontlist;
vector<generic_string> _fontlist;
HMODULE _hUser32;
HMODULE _hUXTheme;
@ -1153,7 +1152,7 @@ private:
vector<int> _scintillaModifiedKeyIndices; //modified scintilla keys. Indices static, determined by searching for commandId. Needed when saving alterations
//vector<basic_string<TCHAR>> _noMenuCmdNames;
//vector<generic_string> _noMenuCmdNames;
vector<MenuItemUnit> _contextMenuItems;
Session _session;
@ -1173,7 +1172,7 @@ private:
winVer _winVersion;
static int CALLBACK EnumFontFamExProc(ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, int FontType, LPARAM lParam) {
vector<basic_string<TCHAR>> *pStrVect = (vector<basic_string<TCHAR>> *)lParam;
vector<generic_string> *pStrVect = (vector<generic_string> *)lParam;
size_t vectSize = pStrVect->size();
//Search through all the fonts, EnumFontFamiliesEx never states anything about order

View File

@ -19,7 +19,7 @@
#include "Notepad_plus_msgs.h"
#include <algorithm>
static bool isInList(basic_string<TCHAR> word, const vector<basic_string<TCHAR>> & wordArray)
static bool isInList(generic_string word, const vector<generic_string> & wordArray)
{
for (size_t i = 0 ; i < wordArray.size() ; i++)
if (wordArray[i] == word)
@ -88,7 +88,7 @@ bool AutoCompletion::showWordComplete(bool autoInsert)
_pEditView->getGenericText(beginChars, startPos, curPos);
basic_string<TCHAR> expr(TEXT("\\<"));
generic_string expr(TEXT("\\<"));
expr += beginChars;
expr += TEXT("[^ \\t.,;:\"()=<>'+!\\[\\]]*");
@ -97,7 +97,7 @@ bool AutoCompletion::showWordComplete(bool autoInsert)
int flags = SCFIND_WORDSTART | SCFIND_MATCHCASE | SCFIND_REGEXP | SCFIND_POSIX;
_pEditView->execute(SCI_SETSEARCHFLAGS, flags);
vector<basic_string<TCHAR>> wordArray;
vector<generic_string> wordArray;
int posFind = _pEditView->searchInTarget(expr.c_str(), 0, docLength);
while (posFind != -1)
@ -128,7 +128,7 @@ bool AutoCompletion::showWordComplete(bool autoInsert)
}
sort(wordArray.begin(), wordArray.end());
basic_string<TCHAR> words(TEXT(""));
generic_string words(TEXT(""));
for (size_t i = 0 ; i < wordArray.size() ; i++)
{

View File

@ -48,7 +48,7 @@ private:
bool _ignoreCase;
std::basic_string<TCHAR> _keyWords;
std::generic_string _keyWords;
FunctionCallTip _funcCalltip;
const TCHAR * getApiFileName();

View File

@ -249,7 +249,7 @@ LangType Buffer::getLangFromExt(const TCHAR *ext)
if (pLS)
userList = pLS->getLexerUserExt();
std::basic_string<TCHAR> list(TEXT(""));
std::generic_string list(TEXT(""));
if (defList)
list += defList;
if (userList)
@ -498,7 +498,7 @@ bool FileManager::saveBuffer(BufferID id, const TCHAR * filename, bool isCopy) {
Utf8_16_Write UnicodeConvertor;
UnicodeConvertor.setEncoding(mode);
FILE *fp = UnicodeConvertor.generic_fopen(fullpath, TEXT("wb"));
FILE *fp = UnicodeConvertor.fopen(fullpath, TEXT("wb"));
if (fp)
{
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, buffer->_doc); //generate new document

View File

@ -27,7 +27,7 @@ int Searching::convertExtendedToString(const TCHAR * query, TCHAR * result, int
int charLeft = length;
bool isGood = true;
TCHAR current;
while(i < length) { //because the backslash escape quences always reduce the size of the basic_string<TCHAR>, no overflow checks have to be made for target, assuming parameters are correct
while(i < length) { //because the backslash escape quences always reduce the size of the generic_string, no overflow checks have to be made for target, assuming parameters are correct
current = query[i];
charLeft--;
if (current == '\\' && charLeft) { //possible escape sequence
@ -227,7 +227,7 @@ void FindReplaceDlg::addText2Combo(const TCHAR * txt2add, HWND hCombo, bool isUT
::SendMessage(hCombo, CB_SETCURSEL, i, 0);
}
basic_string<TCHAR> FindReplaceDlg::getTextFromCombo(HWND hCombo, bool isUnicode) const
generic_string FindReplaceDlg::getTextFromCombo(HWND hCombo, bool isUnicode) const
{
TCHAR str[MAX_PATH];
#ifdef UNICODE
@ -254,7 +254,7 @@ basic_string<TCHAR> FindReplaceDlg::getTextFromCombo(HWND hCombo, bool isUnicode
::SendMessage(hCombo, WM_GETTEXT, MAX_PATH - 1, (LPARAM)str);
}
#endif
return basic_string<TCHAR>(str);
return generic_string(str);
}
@ -538,7 +538,7 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
if ((_currentStatus == FIND_DLG) || (_currentStatus == REPLACE_DLG))
{
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
basic_string<TCHAR> str2Search = getTextFromCombo(hFindCombo, isUnicode);
generic_string str2Search = getTextFromCombo(hFindCombo, isUnicode);
updateCombo(IDFINDWHAT);
processFindNext(str2Search.c_str());
}
@ -555,8 +555,8 @@ BOOL CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
{
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH);
basic_string<TCHAR> str2Search = getTextFromCombo(hFindCombo);
basic_string<TCHAR> str2Replace = getTextFromCombo(hReplaceCombo);
generic_string str2Search = getTextFromCombo(hFindCombo);
generic_string str2Replace = getTextFromCombo(hReplaceCombo);
updateCombos();
processReplace(str2Search.c_str(), str2Replace.c_str());
}
@ -876,7 +876,7 @@ bool FindReplaceDlg::processFindNext(const TCHAR *txt2find, FindOption *options)
//failed, or failed twice with wrap
if (!pOptions->_isIncremental) //incremental search doesnt trigger messages
{
basic_string<TCHAR> msg = TEXT("Can't find the text:\r\n\"");
generic_string msg = TEXT("Can't find the text:\r\n\"");
msg += pText;
msg += TEXT("\"");
::MessageBox(_hSelf, msg.c_str(), TEXT("Find"), MB_OK);
@ -1051,7 +1051,7 @@ int FindReplaceDlg::processRange(ProcessOperation op, const TCHAR *txt2find, con
TCHAR *pTextFind = NULL;//new TCHAR[stringSizeFind + 1];
if (!txt2find) {
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
basic_string<TCHAR> str2Search = getTextFromCombo(hFindCombo, isUnicode);
generic_string str2Search = getTextFromCombo(hFindCombo, isUnicode);
stringSizeFind = str2Search.length();
pTextFind = new TCHAR[stringSizeFind + 1];
lstrcpy(pTextFind, str2Search.c_str());
@ -1070,7 +1070,7 @@ int FindReplaceDlg::processRange(ProcessOperation op, const TCHAR *txt2find, con
if (op == ProcessReplaceAll) {
if (!txt2replace) {
HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH);
basic_string<TCHAR> str2Replace = getTextFromCombo(hReplaceCombo, isUnicode);
generic_string str2Replace = getTextFromCombo(hReplaceCombo, isUnicode);
stringSizeReplace = str2Replace.length();
pTextReplace = new TCHAR[stringSizeReplace + 1];
lstrcpy(pTextReplace, str2Replace.c_str());
@ -1160,7 +1160,7 @@ int FindReplaceDlg::processRange(ProcessOperation op, const TCHAR *txt2find, con
lend = lstart + 1020;
(*_ppEditView)->getGenericText(lineBuf, lstart, lend);
basic_string<TCHAR> line = lineBuf;
generic_string line = lineBuf;
line += TEXT("\r\n");
_pFinder->add(FoundInfo(targetStart, targetEnd, line.c_str(), fileName, _pFinder->_lineCounter), lineNumber + 1);
@ -1383,7 +1383,7 @@ void FindReplaceDlg::enableFindInFilesControls(bool isEnable)
::SetWindowText(_hSelf, label);
}
void FindReplaceDlg::getPatterns(vector<basic_string<TCHAR>> & patternVect)
void FindReplaceDlg::getPatterns(vector<generic_string> & patternVect)
{
cutString(_filters.c_str(), patternVect);
}
@ -1528,7 +1528,7 @@ BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
if (LOWORD(wParam) == IDC_INCFINDPREVOK)
fo._whichDirection = DIR_UP;
basic_string<TCHAR> str2Search = _pFRDlg->getTextFromCombo(::GetDlgItem(_hSelf, IDC_INCFINDTEXT), isUnicode);
generic_string str2Search = _pFRDlg->getTextFromCombo(::GetDlgItem(_hSelf, IDC_INCFINDTEXT), isUnicode);
_pFRDlg->processFindNext(str2Search.c_str(), &fo);
}
return TRUE;
@ -1544,7 +1544,7 @@ BOOL CALLBACK FindIncrementDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
fo._isIncremental = true;
fo._isMatchCase = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_INCFINDMATCHCASE, BM_GETCHECK, 0, 0));
basic_string<TCHAR> str2Search = _pFRDlg->getTextFromCombo(::GetDlgItem(_hSelf, IDC_INCFINDTEXT), isUnicode);
generic_string str2Search = _pFRDlg->getTextFromCombo(::GetDlgItem(_hSelf, IDC_INCFINDTEXT), isUnicode);
bool isFound = _pFRDlg->processFindNext(str2Search.c_str(), &fo);
if (!isFound)
{

View File

@ -45,8 +45,8 @@ struct FoundInfo {
: _start(start), _end(end), _foundLine(foundLine), _fullPath(fullPath), _scintLineNumber(lineNum){};
int _start;
int _end;
std::basic_string<TCHAR> _foundLine;
std::basic_string<TCHAR> _fullPath;
std::generic_string _foundLine;
std::generic_string _fullPath;
size_t _scintLineNumber;
};
@ -101,7 +101,7 @@ public:
};
void addFileNameTitle(const TCHAR * fileName) {
basic_string<TCHAR> str = TEXT("[");
generic_string str = TEXT("[");
str += fileName;
str += TEXT("]\n");
@ -113,7 +113,7 @@ public:
void add(FoundInfo fi, int lineNb) {
_foundInfos.push_back(fi);
std::basic_string<TCHAR> str = TEXT("Line ");
std::generic_string str = TEXT("Line ");
TCHAR lnb[16];
wsprintf(lnb, TEXT("%d"), lineNb);
@ -277,13 +277,13 @@ public :
};
void setSearchWord2Finder(){
basic_string<TCHAR> str2Search = getText2search();
generic_string str2Search = getText2search();
_pFinder->setSearchWord(str2Search.c_str());
};
const TCHAR * getDir2Search() const {return _directory.c_str();};
void getPatterns(vector<basic_string<TCHAR>> & patternVect);
void getPatterns(vector<generic_string> & patternVect);
void launchFindInFilesDlg() {
doDialog(FINDINFILES_DLG);
@ -302,18 +302,18 @@ public :
}
};
basic_string<TCHAR> getText2search() const {
generic_string getText2search() const {
return getTextFromCombo(::GetDlgItem(_hSelf, IDFINDWHAT));
};
const basic_string<TCHAR> & getFilters() const {return _filters;};
const basic_string<TCHAR> & getDirectory() const {return _directory;};
const generic_string & getFilters() const {return _filters;};
const generic_string & getDirectory() const {return _directory;};
const FindOption & getCurrentOptions() const {return _options;};
protected :
virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
void addText2Combo(const TCHAR * txt2add, HWND comboID, bool isUTF8 = false);
basic_string<TCHAR> getTextFromCombo(HWND hCombo, bool isUnicode = false) const;
generic_string getTextFromCombo(HWND hCombo, bool isUnicode = false) const;
private :
DIALOG_TYPE _currentStatus;
@ -336,8 +336,8 @@ private :
int _findAllResult;
TCHAR _findAllResultStr[128];
basic_string<TCHAR> _filters;
basic_string<TCHAR> _directory;
generic_string _filters;
generic_string _directory;
bool _isRecursive;
bool _isInHiddenDir;

View File

@ -46,7 +46,7 @@ inline bool match(TCHAR c1, TCHAR c2) {
return false;
}
//test basic_string<TCHAR> case insensitive ala Scintilla
//test generic_string case insensitive ala Scintilla
//0 if equal, <0 of before, >0 if after (name1 that is)
int testNameNoCase(const TCHAR * name1, const TCHAR * name2, int len = -1) {
if (len == -1) {

View File

@ -17,7 +17,7 @@
#include "Printer.h"
void replaceStr(basic_string<TCHAR> & str, basic_string<TCHAR> str2BeReplaced, basic_string<TCHAR> replacement)
void replaceStr(generic_string & str, generic_string str2BeReplaced, generic_string replacement)
{
size_t pos = str.find(str2BeReplaced);
@ -256,7 +256,7 @@ size_t Printer::doPrint(bool justDoIt)
{
frPrint.rc.top += headerLineHeight + headerLineHeight / 2;
basic_string<TCHAR> headerLeftPart = nppGUI._printSettings._headerLeft;
generic_string headerLeftPart = nppGUI._printSettings._headerLeft;
if (headerLeftPart != TEXT(""))
{
replaceStr(headerLeftPart, shortDateVar, shortDate);
@ -265,7 +265,7 @@ size_t Printer::doPrint(bool justDoIt)
expandNppEnvironmentStrs(headerLeftPart.c_str(), headerL, sizeof(headerL), _pdlg.hwndOwner);
}
basic_string<TCHAR> headerMiddlePart = nppGUI._printSettings._headerMiddle;
generic_string headerMiddlePart = nppGUI._printSettings._headerMiddle;
if (headerMiddlePart != TEXT(""))
{
replaceStr(headerMiddlePart, shortDateVar, shortDate);
@ -274,7 +274,7 @@ size_t Printer::doPrint(bool justDoIt)
expandNppEnvironmentStrs(headerMiddlePart.c_str(), headerM, sizeof(headerM), _pdlg.hwndOwner);
}
basic_string<TCHAR> headerRightPart = nppGUI._printSettings._headerRight;
generic_string headerRightPart = nppGUI._printSettings._headerRight;
if (headerRightPart != TEXT(""))
{
replaceStr(headerRightPart, shortDateVar, shortDate);
@ -289,7 +289,7 @@ size_t Printer::doPrint(bool justDoIt)
{
frPrint.rc.bottom -= footerLineHeight + footerLineHeight / 2;
basic_string<TCHAR> footerLeftPart = nppGUI._printSettings._footerLeft;
generic_string footerLeftPart = nppGUI._printSettings._footerLeft;
if (footerLeftPart != TEXT(""))
{
replaceStr(footerLeftPart, shortDateVar, shortDate);
@ -298,7 +298,7 @@ size_t Printer::doPrint(bool justDoIt)
expandNppEnvironmentStrs(footerLeftPart.c_str(), footerL, sizeof(footerL), _pdlg.hwndOwner);
}
basic_string<TCHAR> footerMiddlePart = nppGUI._printSettings._footerMiddle;
generic_string footerMiddlePart = nppGUI._printSettings._footerMiddle;
if (footerMiddlePart != TEXT(""))
{
replaceStr(footerMiddlePart, shortDateVar, shortDate);
@ -307,7 +307,7 @@ size_t Printer::doPrint(bool justDoIt)
expandNppEnvironmentStrs(footerMiddlePart.c_str(), footerM, sizeof(footerM), _pdlg.hwndOwner);
}
basic_string<TCHAR> footerRightPart = nppGUI._printSettings._footerRight;
generic_string footerRightPart = nppGUI._printSettings._footerRight;
if (footerRightPart != TEXT(""))
{
replaceStr(footerRightPart, shortDateVar, shortDate);
@ -359,7 +359,7 @@ size_t Printer::doPrint(bool justDoIt)
// Left part
if (headerL[0] != '\0')
{
basic_string<TCHAR> headerLeft(headerL);
generic_string headerLeft(headerL);
size_t pos = headerLeft.find(pageVar);
if (pos != headerLeft.npos)
@ -372,7 +372,7 @@ size_t Printer::doPrint(bool justDoIt)
// Middle part
if (headerM != '\0')
{
basic_string<TCHAR> headerMiddle(headerM);
generic_string headerMiddle(headerM);
size_t pos = headerMiddle.find(pageVar);
if (pos != headerMiddle.npos)
headerMiddle.replace(pos, lstrlen(pageVar), pageString);
@ -384,7 +384,7 @@ size_t Printer::doPrint(bool justDoIt)
// Right part
if (headerR != '\0')
{
basic_string<TCHAR> headerRight(headerR);
generic_string headerRight(headerR);
size_t pos = headerRight.find(pageVar);
if (pos != headerRight.npos)
headerRight.replace(pos, lstrlen(pageVar), pageString);
@ -427,7 +427,7 @@ size_t Printer::doPrint(bool justDoIt)
// Left part
if (footerL[0] != '\0')
{
basic_string<TCHAR> footerLeft(footerL);
generic_string footerLeft(footerL);
size_t pos = footerLeft.find(pageVar);
if (pos != footerLeft.npos)
footerLeft.replace(pos, lstrlen(pageVar), pageString);
@ -439,7 +439,7 @@ size_t Printer::doPrint(bool justDoIt)
// Middle part
if (footerM[0] != '\0')
{
basic_string<TCHAR> footerMiddle(footerM);
generic_string footerMiddle(footerM);
size_t pos = footerMiddle.find(pageVar);
if (pos != footerMiddle.npos)
footerMiddle.replace(pos, lstrlen(pageVar), pageString);
@ -451,7 +451,7 @@ size_t Printer::doPrint(bool justDoIt)
// Right part
if (footerR[0] != '\0')
{
basic_string<TCHAR> footerRight(footerR);
generic_string footerRight(footerR);
size_t pos = footerRight.find(pageVar);
if (pos != footerRight.npos)
footerRight.replace(pos, lstrlen(pageVar), pageString);

View File

@ -592,28 +592,29 @@ void ScintillaEditView::setCppLexer(LangType langType)
const TCHAR *pKwArray[10] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
makeStyle(langType, pKwArray);
basic_string<char> keywordList("");
basic_string<char> keywordListInstruction("");
basic_string<char> keywordListType("");
if (pKwArray[LANG_INDEX_INSTR])
{
#ifdef UNICODE
basic_string<wchar_t> kwlW = pKwArray[LANG_INDEX_INSTR];
keywordList = wstring2string(kwlW, CP_ACP);
keywordListInstruction = wstring2string(kwlW, CP_ACP);
#else
keywordList = pKwArray[LANG_INDEX_INSTR];
keywordListInstruction = pKwArray[LANG_INDEX_INSTR];
#endif
}
cppInstrs = getCompleteKeywordList(keywordList, langType, LANG_INDEX_INSTR);
cppInstrs = getCompleteKeywordList(keywordListInstruction, langType, LANG_INDEX_INSTR);
if (pKwArray[LANG_INDEX_TYPE])
{
#ifdef UNICODE
basic_string<wchar_t> kwlW = pKwArray[LANG_INDEX_TYPE];
keywordList = wstring2string(kwlW, CP_ACP);
keywordListType = wstring2string(kwlW, CP_ACP);
#else
keywordList = pKwArray[LANG_INDEX_INSTR];
keywordListType = pKwArray[LANG_INDEX_TYPE];
#endif
}
cppTypes = getCompleteKeywordList(keywordList, langType, LANG_INDEX_TYPE);
cppTypes = getCompleteKeywordList(keywordListType, langType, LANG_INDEX_TYPE);
execute(SCI_SETKEYWORDS, 0, (LPARAM)cppInstrs);
execute(SCI_SETKEYWORDS, 1, (LPARAM)cppTypes);
@ -2036,7 +2037,7 @@ void ScintillaEditView::columnReplace(const ColumnModeInfo & cmi, const TCHAR ch
for (size_t i = 0 ; i < cmi.size() ; i++)
{
int len = cmi[i].second - cmi[i].first;
basic_string<TCHAR> str(len, ch);
generic_string str(len, ch);
execute(SCI_SETTARGETSTART, cmi[i].first);
execute(SCI_SETTARGETEND, cmi[i].second);

View File

@ -25,7 +25,6 @@
#include "SciLexer.h"
#include "Buffer.h"
#include "colors.h"
#include "SysMsg.h"
#include "UserDefineDialog.h"
#include "resource.h"

View File

@ -62,7 +62,7 @@ void SharedParametersDialog::initControls()
//for the font name combos
HWND hFontNameCombo = ::GetDlgItem(_hSelf, _fontNameCombo[i]);
const std::vector<std::basic_string<TCHAR>> & fontlist = pNppParam->getFontList();
const std::vector<std::generic_string> & fontlist = pNppParam->getFontList();
for (int j = 0 ; j < int(fontlist.size()) ; j++)
{
int k = ::SendMessage(hFontNameCombo, CB_ADDSTRING, 0, (LPARAM)fontlist[j].c_str());
@ -1461,7 +1461,7 @@ BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM
if (tmpName)
{
basic_string<TCHAR> newNameString(tmpName);
generic_string newNameString(tmpName);
const TCHAR *newName = newNameString.c_str();
if (pNppParam->isExistingUserLangName(newName))

View File

@ -94,11 +94,11 @@ BOOL CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM l
line = new TCHAR[lineLen];
}
(*_ppEditView)->getGenericText(line, lineBegin, lineEnd);
basic_string<TCHAR> s2r(line);
generic_string s2r(line);
if (lineEndCol < cursorCol)
{
basic_string<TCHAR> s_space(cursorCol - lineEndCol, ' ');
generic_string s_space(cursorCol - lineEndCol, ' ');
s2r.append(s_space);
s2r.append(str);
}
@ -170,17 +170,17 @@ BOOL CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM l
line = new TCHAR[lineLen];
}
(*_ppEditView)->getGenericText(line, lineBegin, lineEnd);
basic_string<TCHAR> s2r(line);
generic_string s2r(line);
/*
Calcule basic_string<TCHAR>
Calcule generic_string
*/
int2str(str, sizeof(str), initialNumber, base, nb, isZeroLeading);
initialNumber += increaseNumber;
if (lineEndCol < cursorCol)
{
basic_string<TCHAR> s_space(cursorCol - lineEndCol, ' ');
generic_string s_space(cursorCol - lineEndCol, ' ');
s2r.append(s_space);
s2r.append(str);
}

View File

@ -33,7 +33,7 @@ distribution.
#include "tinystr.h"
// TiXmlString constructor, based on a C basic_string<TCHAR>
// TiXmlString constructor, based on a C generic_string
TiXmlString::TiXmlString (const TCHAR* instring)
{
unsigned newlen;
@ -178,7 +178,7 @@ void TiXmlString::append( const TCHAR* str, int len )
}
else
{
// we know we can safely append the new basic_string<TCHAR>
// we know we can safely append the new generic_string
// strncat (cstring, str, len);
memcpy (cstring + length (),
str,
@ -227,7 +227,7 @@ void TiXmlString::append( const TCHAR * suffix )
}
else
{
// we know we can safely append the new basic_string<TCHAR>
// we know we can safely append the new generic_string
// lstrcat (cstring, suffix);
memcpy (cstring + length (),
suffix,

View File

@ -36,16 +36,16 @@ distribution.
#include <windows.h>
/*
TiXmlString is an emulation of the std::basic_string<TCHAR> template.
TiXmlString is an emulation of the std::generic_string template.
Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.
Only the member functions relevant to the TinyXML project have been implemented.
The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase
a basic_string<TCHAR> and there's no more room, we allocate a buffer twice as big as we need.
a generic_string and there's no more room, we allocate a buffer twice as big as we need.
*/
class TiXmlString
{
public :
// TiXmlString constructor, based on a basic_string<TCHAR>
// TiXmlString constructor, based on a generic_string
TiXmlString (const TCHAR * instring);
// TiXmlString empty constructor
@ -127,13 +127,13 @@ class TiXmlString
return cstring [index];
}
// find a TCHAR in a basic_string<TCHAR>. Return TiXmlString::notfound if not found
// find a TCHAR in a generic_string. Return TiXmlString::notfound if not found
unsigned find (TCHAR lookup) const
{
return find (lookup, 0);
}
// find a TCHAR in a basic_string<TCHAR> from an offset. Return TiXmlString::notfound if not found
// find a TCHAR in a generic_string from an offset. Return TiXmlString::notfound if not found
unsigned find (TCHAR tofind, unsigned offset) const;
/* Function to reserve a big amount of data when we know we'll need it. Be aware that this
@ -166,11 +166,11 @@ class TiXmlString
protected :
// The base basic_string<TCHAR>
// The base generic_string
TCHAR * cstring;
// Number of chars allocated
unsigned allocated;
// Current basic_string<TCHAR> size
// Current generic_string size
unsigned current_length;
// New size computation. It is simplistic right now : it returns twice the amount

View File

@ -24,7 +24,6 @@ distribution.
#include <ctype.h>
#include "tinyxml.h"
#include "SysMsg.h"
#ifdef TIXML_USE_STL
#include <sstream>
@ -706,8 +705,8 @@ bool TiXmlDocument::LoadFile( const TCHAR* filename )
// There was a really terrifying little bug here. The code:
// value = filename
// in the STL case, cause the assignment method of the std::basic_string<TCHAR> to
// be called. What is strange, is that the std::basic_string<TCHAR> had the same
// in the STL case, cause the assignment method of the std::generic_string to
// be called. What is strange, is that the std::generic_string had the same
// address as it's c_str() method, and so bad things happen. Looks
// like a bug in the Microsoft STL implementation.
// See STL_STRING_BUG above.
@ -718,7 +717,7 @@ bool TiXmlDocument::LoadFile( const TCHAR* filename )
if ( file )
{
// Get the file size, so we can pre-allocate the basic_string<TCHAR>. HUGE speed impact.
// Get the file size, so we can pre-allocate the generic_string. HUGE speed impact.
long length = 0;
fseek( file, 0, SEEK_END );
length = ftell( file );
@ -1125,7 +1124,7 @@ TIXML_OSTREAM & operator<< (TIXML_OSTREAM & out, const TiXmlNode & base)
#ifdef TIXML_USE_STL
std::basic_string<TCHAR> & operator<< (std::basic_string<TCHAR>& out, const TiXmlNode& base )
std::generic_string & operator<< (std::generic_string& out, const TiXmlNode& base )
{
//std::ostringstream os_stream( std::ostringstream::out );

View File

@ -55,7 +55,7 @@ distribution.
#include <string>
#include <iostream>
//#include <ostream>
#define TIXML_STRING std::basic_string<TCHAR>
#define TIXML_STRING std::generic_string
//#define TIXML_ISTREAM std::istream
//#define TIXML_OSTREAM std::ostream
#define TIXML_ISTREAM std::basic_istream<TCHAR>
@ -191,7 +191,7 @@ protected:
static bool StreamTo( TIXML_ISTREAM * in, int character, TIXML_STRING * tag );
#endif
/* Reads an XML name into the basic_string<TCHAR> provided. Returns
/* Reads an XML name into the generic_string provided. Returns
a pointer just past the last character of the name,
or 0 if the function has an error.
*/
@ -201,7 +201,7 @@ protected:
Wickedly complex options, but it keeps the (sensitive) code in one place.
*/
static const TCHAR* ReadText( const TCHAR* in, // where to start
TIXML_STRING* text, // the basic_string<TCHAR> read
TIXML_STRING* text, // the generic_string read
bool ignoreWhiteSpace, // whether to keep the white space
const TCHAR* endTag, // what ends this text
bool ignoreCase ); // whether to ignore case in the end tag
@ -226,7 +226,7 @@ protected:
}
}
// Puts a basic_string<TCHAR> to a stream, expanding entities as it goes.
// Puts a generic_string to a stream, expanding entities as it goes.
// Note this should not contian the '<', '>', etc, or they will be transformed into entities!
static void PutString( const TIXML_STRING& str, TIXML_OSTREAM* out );
@ -316,8 +316,8 @@ public:
*/
friend std::basic_ostream<TCHAR>& operator<< (std::basic_ostream<TCHAR>& out, const TiXmlNode& base);
/// Appends the XML node or attribute to a std::basic_string<TCHAR>.
friend std::basic_string<TCHAR>& operator<< (std::basic_string<TCHAR>& out, const TiXmlNode& base );
/// Appends the XML node or attribute to a std::generic_string.
friend std::generic_string& operator<< (std::generic_string& out, const TiXmlNode& base );
#else
// Used internally, not part of the public API.
@ -347,7 +347,7 @@ public:
Element: name of the element
Comment: the comment text
Unknown: the tag contents
Text: the text basic_string<TCHAR>
Text: the text generic_string
@endverbatim
The subclasses will wrap this function.
@ -360,14 +360,14 @@ public:
Element: name of the element
Comment: the comment text
Unknown: the tag contents
Text: the text basic_string<TCHAR>
Text: the text generic_string
@endverbatim
*/
void SetValue(const TCHAR * _value) { value = _value;}
#ifdef TIXML_USE_STL
/// STL std::basic_string<TCHAR> form.
void SetValue( const std::basic_string<TCHAR>& _value )
/// STL std::generic_string form.
void SetValue( const std::generic_string& _value )
{
StringToBuffer buf( _value );
SetValue( buf.buffer ? buf.buffer : TEXT("") );
@ -387,8 +387,8 @@ public:
TiXmlNode* LastChild( const TCHAR * value ) const; /// The last child of this node matching 'value'. Will be null if there are no children.
#ifdef TIXML_USE_STL
TiXmlNode* FirstChild( const std::basic_string<TCHAR>& _value ) const { return FirstChild (_value.c_str ()); } ///< STL std::basic_string<TCHAR> form.
TiXmlNode* LastChild( const std::basic_string<TCHAR>& _value ) const { return LastChild (_value.c_str ()); } ///< STL std::basic_string<TCHAR> form.
TiXmlNode* FirstChild( const std::generic_string& _value ) const { return FirstChild (_value.c_str ()); } ///< STL std::generic_string form.
TiXmlNode* LastChild( const std::generic_string& _value ) const { return LastChild (_value.c_str ()); } ///< STL std::generic_string form.
#endif
/** An alternate way to walk the children of a node.
@ -413,7 +413,7 @@ public:
TiXmlNode* IterateChildren( const TCHAR * value, TiXmlNode* previous ) const;
#ifdef TIXML_USE_STL
TiXmlNode* IterateChildren( const std::basic_string<TCHAR>& _value, TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } ///< STL std::basic_string<TCHAR> form.
TiXmlNode* IterateChildren( const std::generic_string& _value, TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } ///< STL std::generic_string form.
#endif
/** Add a new node related to this. Adds a child past the LastChild.
@ -458,8 +458,8 @@ public:
TiXmlNode* PreviousSibling( const TCHAR * ) const;
#ifdef TIXML_USE_STL
TiXmlNode* PreviousSibling( const std::basic_string<TCHAR>& _value ) const { return PreviousSibling (_value.c_str ()); } ///< STL std::basic_string<TCHAR> form.
TiXmlNode* NextSibling( const std::basic_string<TCHAR>& _value) const { return NextSibling (_value.c_str ()); } ///< STL std::basic_string<TCHAR> form.
TiXmlNode* PreviousSibling( const std::generic_string& _value ) const { return PreviousSibling (_value.c_str ()); } ///< STL std::generic_string form.
TiXmlNode* NextSibling( const std::generic_string& _value) const { return NextSibling (_value.c_str ()); } ///< STL std::generic_string form.
#endif
/// Navigate to a sibling node.
@ -481,7 +481,7 @@ public:
TiXmlElement* NextSiblingElement( const TCHAR * ) const;
#ifdef TIXML_USE_STL
TiXmlElement* NextSiblingElement( const std::basic_string<TCHAR>& _value) const { return NextSiblingElement (_value.c_str ()); } ///< STL std::basic_string<TCHAR> form.
TiXmlElement* NextSiblingElement( const std::generic_string& _value) const { return NextSiblingElement (_value.c_str ()); } ///< STL std::generic_string form.
#endif
/// Convenience function to get through elements.
@ -491,7 +491,7 @@ public:
TiXmlElement* FirstChildElement( const TCHAR * value ) const;
#ifdef TIXML_USE_STL
TiXmlElement* FirstChildElement( const std::basic_string<TCHAR>& _value ) const { return FirstChildElement (_value.c_str ()); } ///< STL std::basic_string<TCHAR> form.
TiXmlElement* FirstChildElement( const std::generic_string& _value ) const { return FirstChildElement (_value.c_str ()); } ///< STL std::generic_string form.
#endif
/** Query the type (as an enumerated value, above) of this node.
@ -570,8 +570,8 @@ public:
}
#ifdef TIXML_USE_STL
/// std::basic_string<TCHAR> constructor.
TiXmlAttribute( const std::basic_string<TCHAR>& _name, const std::basic_string<TCHAR>& _value )
/// std::generic_string constructor.
TiXmlAttribute( const std::generic_string& _name, const std::generic_string& _value )
{
name = _name;
value = _value;
@ -594,7 +594,7 @@ public:
const int IntValue() const; ///< Return the value of this attribute, converted to an integer.
const double DoubleValue() const; ///< Return the value of this attribute, converted to a double.
/** QueryIntValue examines the value basic_string<TCHAR>. It is an alternative to the
/** QueryIntValue examines the value generic_string. It is an alternative to the
IntValue() method with richer error checking.
If the value is an integer, it is stored in 'value' and
the call returns TIXML_SUCCESS. If it is not
@ -604,7 +604,7 @@ public:
which is the opposite of almost all other TinyXml calls.
*/
int QueryIntValue( int* value ) const;
/// QueryDoubleValue examines the value basic_string<TCHAR>. See QueryIntValue().
/// QueryDoubleValue examines the value generic_string. See QueryIntValue().
int QueryDoubleValue( double* value ) const;
void SetName( const TCHAR* _name ) { name = _name; } ///< Set the name of this attribute.
@ -614,14 +614,14 @@ public:
void SetDoubleValue( double value ); ///< Set the value from a double.
#ifdef TIXML_USE_STL
/// STL std::basic_string<TCHAR> form.
void SetName( const std::basic_string<TCHAR>& _name )
/// STL std::generic_string form.
void SetName( const std::generic_string& _name )
{
StringToBuffer buf( _name );
SetName ( buf.buffer ? buf.buffer : TEXT("error") );
}
/// STL std::basic_string<TCHAR> form.
void SetValue( const std::basic_string<TCHAR>& _value )
/// STL std::generic_string form.
void SetValue( const std::generic_string& _value )
{
StringToBuffer buf( _value );
SetValue( buf.buffer ? buf.buffer : TEXT("error") );
@ -701,8 +701,8 @@ public:
TiXmlElement (const TCHAR * in_value);
#ifdef TIXML_USE_STL
/// std::basic_string<TCHAR> constructor.
TiXmlElement( const std::basic_string<TCHAR>& _value ) : TiXmlNode( TiXmlNode::ELEMENT )
/// std::generic_string constructor.
TiXmlElement( const std::generic_string& _value ) : TiXmlNode( TiXmlNode::ELEMENT )
{
firstChild = lastChild = 0;
value = _value;
@ -749,19 +749,19 @@ public:
void SetAttribute( const TCHAR* name, const TCHAR * value );
#ifdef TIXML_USE_STL
const TCHAR* Attribute( const std::basic_string<TCHAR>& name ) const { return Attribute( name.c_str() ); }
const TCHAR* Attribute( const std::basic_string<TCHAR>& name, int* i ) const { return Attribute( name.c_str(), i ); }
const TCHAR* Attribute( const std::generic_string& name ) const { return Attribute( name.c_str() ); }
const TCHAR* Attribute( const std::generic_string& name, int* i ) const { return Attribute( name.c_str(), i ); }
/// STL std::basic_string<TCHAR> form.
void SetAttribute( const std::basic_string<TCHAR>& name, const std::basic_string<TCHAR>& _value )
/// STL std::generic_string form.
void SetAttribute( const std::generic_string& name, const std::generic_string& _value )
{
StringToBuffer n( name );
StringToBuffer v( _value );
if ( n.buffer && v.buffer )
SetAttribute (n.buffer, v.buffer );
}
///< STL std::basic_string<TCHAR> form.
void SetAttribute( const std::basic_string<TCHAR>& name, int _value )
///< STL std::generic_string form.
void SetAttribute( const std::generic_string& name, int _value )
{
StringToBuffer n( name );
if ( n.buffer )
@ -778,7 +778,7 @@ public:
*/
void RemoveAttribute( const TCHAR * name );
#ifdef TIXML_USE_STL
void RemoveAttribute( const std::basic_string<TCHAR>& name ) { RemoveAttribute (name.c_str ()); } ///< STL std::basic_string<TCHAR> form.
void RemoveAttribute( const std::generic_string& name ) { RemoveAttribute (name.c_str ()); } ///< STL std::generic_string form.
#endif
TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); } ///< Access the first attribute in this element.
@ -857,7 +857,7 @@ public:
#ifdef TIXML_USE_STL
/// Constructor.
TiXmlText( const std::basic_string<TCHAR>& initValue ) : TiXmlNode (TiXmlNode::TEXT)
TiXmlText( const std::generic_string& initValue ) : TiXmlNode (TiXmlNode::TEXT)
{
SetValue( initValue );
}
@ -905,9 +905,9 @@ public:
#ifdef TIXML_USE_STL
/// Constructor.
TiXmlDeclaration( const std::basic_string<TCHAR>& _version,
const std::basic_string<TCHAR>& _encoding,
const std::basic_string<TCHAR>& _standalone )
TiXmlDeclaration( const std::generic_string& _version,
const std::generic_string& _encoding,
const std::generic_string& _standalone )
: TiXmlNode( TiXmlNode::DECLARATION )
{
version = _version;
@ -996,7 +996,7 @@ public:
#ifdef TIXML_USE_STL
/// Constructor.
TiXmlDocument( const std::basic_string<TCHAR>& documentName ) :
TiXmlDocument( const std::generic_string& documentName ) :
TiXmlNode( TiXmlNode::DOCUMENT )
{
value = documentName;
@ -1019,12 +1019,12 @@ public:
bool SaveFile( const TCHAR * filename ) const;
#ifdef TIXML_USE_STL
bool LoadFile( const std::basic_string<TCHAR>& filename ) ///< STL std::basic_string<TCHAR> version.
bool LoadFile( const std::generic_string& filename ) ///< STL std::generic_string version.
{
StringToBuffer f( filename );
return ( f.buffer && LoadFile( f.buffer ));
}
bool SaveFile( const std::basic_string<TCHAR>& filename ) const ///< STL std::basic_string<TCHAR> version.
bool SaveFile( const std::generic_string& filename ) const ///< STL std::generic_string version.
{
StringToBuffer f( filename );
return ( f.buffer && SaveFile( f.buffer ));
@ -1051,7 +1051,7 @@ public:
/// Contains a textual (english) description of the error if one occurs.
const TCHAR * ErrorDesc() const { return errorDesc.c_str (); }
/** Generally, you probably want the error basic_string<TCHAR> ( ErrorDesc() ). But if you
/** Generally, you probably want the error generic_string ( ErrorDesc() ). But if you
prefer the ErrorId, this function will fetch it.
*/
const int ErrorId() const { return errorId; }
@ -1242,11 +1242,11 @@ public:
TiXmlHandle ChildElement( int index ) const;
#ifdef TIXML_USE_STL
TiXmlHandle FirstChild( const std::basic_string<TCHAR>& _value ) const { return FirstChild( _value.c_str() ); }
TiXmlHandle FirstChildElement( const std::basic_string<TCHAR>& _value ) const { return FirstChildElement( _value.c_str() ); }
TiXmlHandle FirstChild( const std::generic_string& _value ) const { return FirstChild( _value.c_str() ); }
TiXmlHandle FirstChildElement( const std::generic_string& _value ) const { return FirstChildElement( _value.c_str() ); }
TiXmlHandle Child( const std::basic_string<TCHAR>& _value, int index ) const { return Child( _value.c_str(), index ); }
TiXmlHandle ChildElement( const std::basic_string<TCHAR>& _value, int index ) const { return ChildElement( _value.c_str(), index ); }
TiXmlHandle Child( const std::generic_string& _value, int index ) const { return Child( _value.c_str(), index ); }
TiXmlHandle ChildElement( const std::generic_string& _value, int index ) const { return ChildElement( _value.c_str(), index ); }
#endif
/// Return the handle as a TiXmlNode. This may return null.

View File

@ -24,7 +24,6 @@ distribution.
#include "tinyxml.h"
#include <ctype.h>
#include "SysMsg.h"
//#define DEBUG_PARSER

View File

@ -213,7 +213,7 @@ Utf8_16_Write::~Utf8_16_Write()
fclose();
}
FILE * Utf8_16_Write::generic_fopen(const TCHAR *_name, const TCHAR *_type)
FILE * Utf8_16_Write::fopen(const TCHAR *_name, const TCHAR *_type)
{
m_pFile = ::generic_fopen(_name, _type);

View File

@ -134,7 +134,7 @@ public:
void setEncoding(UniMode eType);
FILE * generic_fopen(const TCHAR *_name, const TCHAR *_type);
FILE * fopen(const TCHAR *_name, const TCHAR *_type);
size_t fwrite(const void* p, size_t _size);
void fclose();

View File

@ -25,7 +25,7 @@ BOOL CALLBACK AboutDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
case WM_INITDIALOG :
{
HWND compileDateHandle = ::GetDlgItem(_hSelf, IDC_BUILD_DATETIME);
basic_string<TCHAR> buildTime = TEXT("Build time : ");
generic_string buildTime = TEXT("Build time : ");
#ifdef UNICODE
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();

View File

@ -18,7 +18,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "ColourPicker.h"
#include "SysMsg.h"

View File

@ -18,7 +18,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "ColourPopup.h"
#include "SysMsg.h"
DWORD colourItems[] = {
RGB( 0, 0, 0), RGB( 64, 0, 0), RGB(128, 0, 0), RGB(128, 64, 64), RGB(255, 0, 0), RGB(255, 128, 128),

View File

@ -19,7 +19,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "WordStyleDlg.h"
#include "ScintillaEditView.h"
#include "SysMsg.h"
BOOL CALLBACK ColourStaticTextHooker::colourStaticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
@ -100,7 +99,7 @@ BOOL CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPar
for(int i = 0 ; i < sizeof(fontSizeStrs)/3 ; i++)
::SendMessage(_hFontSizeCombo, CB_ADDSTRING, 0, (LPARAM)fontSizeStrs[i]);
const std::vector<std::basic_string<TCHAR>> & fontlist = (NppParameters::getInstance())->getFontList();
const std::vector<std::generic_string> & fontlist = (NppParameters::getInstance())->getFontList();
for (size_t i = 0 ; i < fontlist.size() ; i++)
{
int j = ::SendMessage(_hFontNameCombo, CB_ADDSTRING, 0, (LPARAM)fontlist[i].c_str());
@ -661,7 +660,7 @@ void WordStyleDlg::setVisualFromStyleList()
LangType lType = pNppParams->getLangIDFromStr(lexerStyler.getLexerName());
if (lType == L_TXT)
{
basic_string<TCHAR> str = lexerStyler.getLexerName();
generic_string str = lexerStyler.getLexerName();
str += TEXT(" is not defined in NppParameters::getLangIDFromStr()");
printStr(str.c_str());
}

View File

@ -27,9 +27,9 @@ using namespace std;
struct MenuItemUnit {
unsigned long _cmdID;
basic_string<TCHAR> _itemName;
generic_string _itemName;
MenuItemUnit() : _cmdID(0), _itemName(TEXT("")) {};
MenuItemUnit(unsigned long cmdID, basic_string<TCHAR> itemName) : _cmdID(cmdID), _itemName(itemName) {};
MenuItemUnit(unsigned long cmdID, generic_string itemName) : _cmdID(cmdID), _itemName(itemName) {};
MenuItemUnit(unsigned long cmdID, const TCHAR *itemName) : _cmdID(cmdID){
if (!itemName)
_itemName = TEXT("");

View File

@ -22,7 +22,6 @@
#include "DropData.h"
#include "SplitterContainer.h"
#include "WindowInterface.h"
#include "SysMsg.h"
#include "ToolTip.h"
#include <Commctrl.h>
#include <shlobj.h>

View File

@ -22,7 +22,6 @@
#include "Window.h"
#include "DockingCont.h"
#include "DockingSplitter.h"
#include "SysMsg.h"
#include <vector>
#include <commctrl.h>
#include "SplitterContainer.h"

View File

@ -20,7 +20,6 @@
#define DOCKINGSPLITTER_H
#include "Docking.h"
#include "SysMsg.h"
#include "dockingResource.h"
#include "window.h"

View File

@ -23,7 +23,6 @@
#include "DockingCont.h"
#include "DockingManager.h"
#include "commctrl.h"
#include "sysmsg.h"
#include "common_func.h"

View File

@ -58,7 +58,7 @@ void folderBrowser(HWND parent, int outputCtrlID)
info.pidlRoot = NULL;
TCHAR szDisplayName[MAX_PATH];
info.pszDisplayName = szDisplayName;
basic_string<TCHAR> title = TEXT("Select a folder to search from");
generic_string title = TEXT("Select a folder to search from");
info.lpszTitle = title.c_str();
info.ulFlags = 0;
info.lpfn = BrowseCallbackProc;
@ -73,7 +73,7 @@ void folderBrowser(HWND parent, int outputCtrlID)
// pidl will be not null when they select a folder.
if (pidl)
{
// Try to convert the pidl to a display basic_string<TCHAR>.
// Try to convert the pidl to a display generic_string.
// Return is true if success.
TCHAR szDir[MAX_PATH];
if (::SHGetPathFromIDList(pidl, szDir))

View File

@ -11,7 +11,6 @@ Modified by Don HO <don.h@free.fr>
*/
#include "babygrid.h"
#include "SysMsg.h"
#define MAX_GRIDS 20
@ -1743,7 +1742,7 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
holdfont=(HFONT)SelectObject(hdc,BGHS[SelfIndex].hfont);
}
//if there are \n codes in the basic_string<TCHAR>, find the longest line
//if there are \n codes in the generic_string, find the longest line
longestline=FindLongestLine(hdc,(TCHAR*)lParam,&size);
//GetTextExtentPoint32(hdc,(TCHAR*)lParam,lstrlen((TCHAR*)lParam),&size);
required_width = longestline+15;

View File

@ -24,7 +24,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "ShortcutMapper_rc.h"
#include "shortcut.h"
#include "ContextMenu.h"
#include "SysMsg.h"
enum GridState {STATE_MENU, STATE_MACRO, STATE_USER, STATE_PLUGIN, STATE_SCINTILLA};

View File

@ -72,12 +72,12 @@ void FileDialog::setExtFilter(const TCHAR *extText, const TCHAR *ext, ...)
if (_nbExt < nbExtMax)
lstrcpy(_extArray[_nbExt++], ext);
//
std::basic_string<TCHAR> extFilter = extText;
std::generic_string extFilter = extText;
va_list pArg;
va_start(pArg, ext);
std::basic_string<TCHAR> exts;
std::generic_string exts;
if (ext[0] == '.')
exts += TEXT("*");
@ -116,7 +116,7 @@ int FileDialog::setExtsFilter(const TCHAR *extText, const TCHAR *exts)
if (_nbExt < nbExtMax)
lstrcpy(_extArray[_nbExt++], exts);
//
std::basic_string<TCHAR> extFilter = extText;
std::generic_string extFilter = extText;
extFilter += TEXT(" (L");
extFilter += exts;
@ -175,7 +175,7 @@ stringVector * FileDialog::doOpenMultiFilesDlg()
TCHAR fn[MAX_PATH];
TCHAR *pFn = _fileName + lstrlen(_fileName) + 1;
if (!(*pFn))
_fileNames.push_back(std::basic_string<TCHAR>(_fileName));
_fileNames.push_back(std::generic_string(_fileName));
else
{
lstrcpy(fn, _fileName);
@ -188,7 +188,7 @@ stringVector * FileDialog::doOpenMultiFilesDlg()
{
fn[term] = '\0';
lstrcat(fn, pFn);
_fileNames.push_back(std::basic_string<TCHAR>(fn));
_fileNames.push_back(std::generic_string(fn));
pFn += lstrlen(pFn) + 1;
}
@ -226,7 +226,7 @@ TCHAR * FileDialog::doSaveDlg()
static HWND hFileDlg = NULL;
static WNDPROC oldProc = NULL;
static basic_string<TCHAR> currentExt = TEXT("");
static generic_string currentExt = TEXT("");
static BOOL CALLBACK fileDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message)
@ -245,7 +245,7 @@ static BOOL CALLBACK fileDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM
if (currentExt != TEXT(""))
{
basic_string<TCHAR> fnExt = changeExt(fn, currentExt);
generic_string fnExt = changeExt(fn, currentExt);
::SetWindowText(fnControl, fnExt.c_str());
}
return oldProc(hwnd, message, wParam, lParam);
@ -270,7 +270,7 @@ static TCHAR * get1stExt(TCHAR *ext) { // precondition : ext should be under the
return begin;
};
static basic_string<TCHAR> addExt(HWND textCtrl, HWND typeCtrl) {
static generic_string addExt(HWND textCtrl, HWND typeCtrl) {
TCHAR fn[256];
::GetWindowText(textCtrl, fn, sizeof(fn));
@ -280,7 +280,7 @@ static basic_string<TCHAR> addExt(HWND textCtrl, HWND typeCtrl) {
TCHAR *pExt = get1stExt(ext);
if (*fn != '\0')
{
basic_string<TCHAR> fnExt = changeExt(fn, pExt);
generic_string fnExt = changeExt(fn, pExt);
::SetWindowText(textCtrl, fnExt.c_str());
}
return pExt;

View File

@ -24,7 +24,6 @@
#include <windows.h>
#include <vector>
#include <string>
#include "SysMsg.h"
#include "Parameters.h"
const int nbExtMax = 256;
@ -32,7 +31,7 @@ const int extLenMax = 64;
using namespace std;
typedef vector<basic_string<TCHAR>> stringVector;
typedef vector<generic_string> stringVector;
//const bool styleOpen = true;
//const bool styleSave = false;
@ -63,17 +62,17 @@ struct OPENFILENAMENPP {
};
static basic_string<TCHAR> changeExt(basic_string<TCHAR> fn, basic_string<TCHAR> ext)
static generic_string changeExt(generic_string fn, generic_string ext)
{
if (ext == TEXT(""))
return fn;
basic_string<TCHAR> fnExt = fn;
generic_string fnExt = fn;
int index = fnExt.find_last_of(TEXT("."));
basic_string<TCHAR> extension = TEXT(".");
generic_string extension = TEXT(".");
extension += ext;
if (index == basic_string<TCHAR>::npos)
if (index == generic_string::npos)
{
fnExt += extension;
}

View File

@ -17,7 +17,6 @@
#include <windows.h>
#include "preferenceDlg.h"
#include "SysMsg.h"
#include "common_func.h"
BOOL CALLBACK PreferenceDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
@ -798,7 +797,7 @@ BOOL CALLBACK DefaultNewDocDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM
int index = 0;
for (int i = L_TXT ; i < pNppParam->L_END ; i++)
{
basic_string<TCHAR> str;
generic_string str;
if ((LangType)i != L_USER)
{
int cmdID = pNppParam->langTypeToCommandID((LangType)i);
@ -878,7 +877,7 @@ BOOL CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara
{
for (int i = L_TXT ; i < pNppParam->L_END ; i++)
{
basic_string<TCHAR> str;
generic_string str;
if ((LangType)i != L_USER)
{
int cmdID = pNppParam->langTypeToCommandID((LangType)i);
@ -1007,7 +1006,7 @@ BOOL CALLBACK LangMenuDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lPara
{
TiXmlElement *element = childNode->ToElement();
if (basic_string<TCHAR>(element->Attribute(TEXT("name"))) == lmi._langName)
if (generic_string(element->Attribute(TEXT("name"))) == lmi._langName)
{
element->SetAttribute(TEXT("excluded"), (LOWORD(wParam)==IDC_BUTTON_REMOVE)?TEXT("yes"):TEXT("no"));
pNppParam->getExternalLexerDoc()->at(x)->SaveFile();
@ -1144,15 +1143,15 @@ BOOL CALLBACK PrintSettingsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM
return FALSE;
}
void trim(basic_string<TCHAR> & str)
void trim(generic_string & str)
{
basic_string<TCHAR>::size_type pos = str.find_last_not_of(' ');
generic_string::size_type pos = str.find_last_not_of(' ');
if (pos != basic_string<TCHAR>::npos)
if (pos != generic_string::npos)
{
str.erase(pos + 1);
pos = str.find_first_not_of(' ');
if(pos != basic_string<TCHAR>::npos) str.erase(0, pos);
if(pos != generic_string::npos) str.erase(0, pos);
}
else str.erase(str.begin(), str.end());
};
@ -1180,7 +1179,7 @@ BOOL CALLBACK PrintSettings2Dlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM
::SendDlgItemMessage(_hSelf, IDC_COMBO_HFONTSIZE, CB_ADDSTRING, 0, (LPARAM)intStr);
::SendDlgItemMessage(_hSelf, IDC_COMBO_FFONTSIZE, CB_ADDSTRING, 0, (LPARAM)intStr);
}
const std::vector<std::basic_string<TCHAR>> & fontlist = pNppParam->getFontList();
const std::vector<std::generic_string> & fontlist = pNppParam->getFontList();
for (size_t i = 0 ; i < fontlist.size() ; i++)
{
int j = ::SendDlgItemMessage(_hSelf, IDC_COMBO_HFONTNAME, CB_ADDSTRING, 0, (LPARAM)fontlist[i].c_str());
@ -1298,7 +1297,7 @@ BOOL CALLBACK PrintSettings2Dlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM
}
::GetDlgItemText(_hSelf, groupStatic, str, sizeof(str));
basic_string<TCHAR> title = str;
generic_string title = str;
title += TEXT(" ");
::GetDlgItemText(_hSelf, focusedEditStatic, str, sizeof(str));
title += str;
@ -1385,7 +1384,7 @@ BOOL CALLBACK PrintSettings2Dlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM
::SendDlgItemMessage(_hSelf, _focusedEditCtrl, WM_GETTEXT, sizeof(str), (LPARAM)str);
//::MessageBox(NULL, str, TEXT(""), MB_OK);
basic_string<TCHAR> str2Set(str);
generic_string str2Set(str);
str2Set.replace(_selStart, _selEnd - _selStart, varStr);
::SetDlgItemText(_hSelf, _focusedEditCtrl, str2Set.c_str());

View File

@ -71,8 +71,8 @@ private :
struct LangID_Name
{
LangType _id;
basic_string<TCHAR> _name;
LangID_Name(LangType id, basic_string<TCHAR> name) : _id(id), _name(name){};
generic_string _name;
LangID_Name(LangType id, generic_string name) : _id(id), _name(name){};
};
class DefaultNewDocDlg : public StaticDialog
@ -112,8 +112,8 @@ private :
};
struct strCouple {
basic_string<TCHAR> _varDesc;
basic_string<TCHAR> _var;
generic_string _varDesc;
generic_string _var;
strCouple(TCHAR *varDesc, TCHAR *var): _varDesc(varDesc), _var(var){};
};

View File

@ -16,7 +16,6 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "SysMsg.h"
#include "Splitter.h"
//#include "resource.h"

View File

@ -16,7 +16,6 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "SplitterContainer.h"
#include "SysMsg.h"
bool SplitterContainer::_isRegistered = false;

View File

@ -43,11 +43,11 @@ class Command {
public :
Command(){};
Command(TCHAR *cmd) : _cmdLine(cmd){};
Command(basic_string<TCHAR> cmd) : _cmdLine(cmd){};
Command(generic_string cmd) : _cmdLine(cmd){};
HINSTANCE run(HWND hWnd);
protected :
basic_string<TCHAR> _cmdLine;
generic_string _cmdLine;
private :
void extractArgs(TCHAR *cmd2Exec, TCHAR *args, const TCHAR *cmdEntier);
};

View File

@ -16,7 +16,6 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "StaticDialog.h"
#include "SysMsg.h"
void StaticDialog::goToCenter()
{

View File

@ -24,7 +24,6 @@
#endif //_WIN32_IE
#include <commctrl.h>
#include "SysMsg.h"
class StatusBar : public Window
{

View File

@ -16,7 +16,6 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "TabBar.h"
#include "SysMsg.h"
const COLORREF blue = RGB(0, 0, 0xFF);
const COLORREF black = RGB(0, 0, 0);

View File

@ -16,7 +16,6 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "TaskList.h"
#include "SysMsg.h"
#include "TaskListDlg_rc.h"
#include "colors.h"

View File

@ -25,7 +25,6 @@
#endif //WM_MOUSEWHEEL
#include <commctrl.h>
#include "SysMsg.h"
class TaskList : public Window
{

View File

@ -33,10 +33,10 @@ const bool dirDown = false;
struct TaskLstFnStatus {
int _iView;
int _docIndex;
basic_string<TCHAR> _fn;
generic_string _fn;
int _status;
TaskLstFnStatus(basic_string<TCHAR> str, int status) : _fn(str), _status(status){};
TaskLstFnStatus(int iView, int docIndex, basic_string<TCHAR> str, int status) : _iView(iView), _docIndex(docIndex), _fn(str), _status(status) {};
TaskLstFnStatus(generic_string str, int status) : _fn(str), _status(status){};
TaskLstFnStatus(int iView, int docIndex, generic_string str, int status) : _iView(iView), _docIndex(docIndex), _fn(str), _status(status) {};
};
struct TaskListInfo {

View File

@ -17,7 +17,6 @@
//#include "..\..\resource.h"
#include "ToolBar.h"
#include "SysMsg.h"
#include "Shortcut.h"
const int WS_TOOLBARSTYLE = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | TBSTYLE_TOOLTIPS |TBSTYLE_FLAT | CCS_TOP | BTNS_AUTOSIZE | CCS_NOPARENTALIGN | CCS_NORESIZE | CCS_NODIVIDER;
@ -238,7 +237,7 @@ void ToolBar::doPopop(POINT chevPoint) {
if (start < _nrCurrentButtons) { //some buttons are hidden
HMENU menu = ::CreatePopupMenu();
int cmd;
basic_string<TCHAR> text;
generic_string text;
while (start < _nrCurrentButtons) {
cmd = _pTBB[start].idCommand;
getNameStrFromCmd(cmd, text);

View File

@ -18,7 +18,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "ToolTip.h"
#include "SysMsg.h"

View File

@ -17,7 +17,7 @@
#include "TreeView.h"
HTREEITEM TreeView::insertTo(HTREEITEM parent, char *itemStr, int imgIndex)
HTREEITEM TreeView::insertTo(HTREEITEM parent, TCHAR *itemStr, int imgIndex)
{
TV_INSERTSTRUCT tvinsert;
tvinsert.hParent=parent;
@ -43,7 +43,7 @@ void TreeView::init(HINSTANCE hInst, HWND pere)
_hSelf = CreateWindowEx(0,
WC_TREEVIEW,
"Tree View",
TEXT("Tree View"),
WS_VISIBLE | WS_CHILD | WS_BORDER |
TVS_HASLINES | TVS_HASBUTTONS | TVS_SHOWSELALWAYS ,
0, 0, 0, 0,
@ -55,19 +55,19 @@ void TreeView::init(HINSTANCE hInst, HWND pere)
if (!_hSelf)
throw int(56);
Parent = insertTo(NULL, "MAOCS30 Command", 0);
Parent = insertTo(NULL, TEXT("MAOCS30 Command"), 0);
Root=Parent;
Before=Parent;
Parent = insertTo(Parent, "Native command", 0);
insertTo(Parent, "Power On", 0);
insertTo(Parent, "Power off", 0);
insertTo(Parent, "Entrant", 0);
insertTo(Parent, "Sortant", 0);
Parent = insertTo(Before, "Macro", 0);
insertTo(Parent, "ChangeCode", 0);
insertTo(Parent, "CipherData", 0);
Parent = insertTo(Parent, TEXT("Native command"), 0);
insertTo(Parent, TEXT("Power On"), 0);
insertTo(Parent, TEXT("Power off"), 0);
insertTo(Parent, TEXT("Entrant"), 0);
insertTo(Parent, TEXT("Sortant"), 0);
Parent = insertTo(Before, TEXT("Macro"), 0);
insertTo(Parent, TEXT("ChangeCode"), 0);
insertTo(Parent, TEXT("CipherData"), 0);
insertTo(NULL, "Bla bla bla bla...", 0);
insertTo(NULL, TEXT("Bla bla bla bla..."), 0);
//display();
}

View File

@ -38,7 +38,7 @@ public :
};
private :
HTREEITEM insertTo(HTREEITEM parent, char *itemStr, int imgIndex);
HTREEITEM insertTo(HTREEITEM parent, TCHAR *itemStr, int imgIndex);
};
#endif

View File

@ -2,7 +2,6 @@
#include "WindowsDlg.h"
#include "WindowsDlgRc.h"
#include "DocTabView.h"
#include "SysMsg.h"
#include <algorithm>
#include <functional>
#include <vector>
@ -739,7 +738,7 @@ void WindowsMenu::init(HINSTANCE hInst, HMENU hMainMenu, const TCHAR *translatio
if (translation && translation[0])
{
basic_string<TCHAR> windowStr(translation);
generic_string windowStr(translation);
windowStr += TEXT("...");
::ModifyMenu(_hMenu, IDM_WINDOW_WINDOWS, MF_BYCOMMAND, IDM_WINDOW_WINDOWS, windowStr.c_str());
}

View File

@ -55,7 +55,7 @@ class WindowsDlg : public SizeableDlg
class CachedValue
{
std::basic_string<TCHAR> fullname;
std::generic_string fullname;
int index;
};

View File

@ -156,9 +156,9 @@ UCHAR vkeyValue[] = {\
0x76, 0x77, 0x78, 0x79, 0x7A, 0x7B};
*/
basic_string<TCHAR> Shortcut::toString() const
generic_string Shortcut::toString() const
{
basic_string<TCHAR> sc = TEXT("");
generic_string sc = TEXT("");
if (!isEnabled())
return sc;
@ -169,7 +169,7 @@ basic_string<TCHAR> Shortcut::toString() const
if (_keyCombo._isShift)
sc += TEXT("Shift+");
basic_string<TCHAR> keyString;
generic_string keyString;
getKeyStrFromVal(_keyCombo._key, keyString);
sc += keyString;
return sc;
@ -195,12 +195,12 @@ void Shortcut::setName(const TCHAR * name) {
_name[i] = 0;
}
basic_string<TCHAR> ScintillaKeyMap::toString() const {
generic_string ScintillaKeyMap::toString() const {
return toString(0);
}
basic_string<TCHAR> ScintillaKeyMap::toString(int index) const {
basic_string<TCHAR> sc = TEXT("");
generic_string ScintillaKeyMap::toString(int index) const {
generic_string sc = TEXT("");
if (!isEnabled())
return sc;
@ -212,7 +212,7 @@ basic_string<TCHAR> ScintillaKeyMap::toString(int index) const {
if (kc._isShift)
sc += TEXT("Shift+");
basic_string<TCHAR> keyString;
generic_string keyString;
getKeyStrFromVal(kc._key, keyString);
sc += keyString;
return sc;
@ -261,7 +261,7 @@ size_t ScintillaKeyMap::getSize() const {
return size;
}
void getKeyStrFromVal(UCHAR keyVal, basic_string<TCHAR> & str)
void getKeyStrFromVal(UCHAR keyVal, generic_string & str)
{
str = TEXT("");
bool found = false;
@ -278,7 +278,7 @@ void getKeyStrFromVal(UCHAR keyVal, basic_string<TCHAR> & str)
str = TEXT("Unlisted");
}
void getNameStrFromCmd(DWORD cmd, basic_string<TCHAR> & str)
void getNameStrFromCmd(DWORD cmd, generic_string & str)
{
if ((cmd >= ID_MACRO) && (cmd < ID_MACRO_LIMIT))
{
@ -645,7 +645,7 @@ void ScintillaAccelerator::updateMenuItemByID(ScintillaKeyMap skm, int id) {
}
i++;
}
basic_string<TCHAR> menuItem = cmdName;
generic_string menuItem = cmdName;
if (skm.isEnabled()) {
menuItem += TEXT("\t");
//menuItem += TEXT("Sc:"); //sc: scintilla shortcut
@ -764,7 +764,7 @@ BOOL CALLBACK ScintillaKeyMap::run_dlgProc(UINT Message, WPARAM wParam, LPARAM l
if (res > -1) {
if (res == oldsize) {
::SendDlgItemMessage(_hSelf, IDC_LIST_KEYS, LB_INSERTSTRING, -1, (LPARAM)toString(res).c_str());
}else { //update current basic_string<TCHAR>, can happen if it was disabled
}else { //update current generic_string, can happen if it was disabled
updateListItem(res);
}
::SendDlgItemMessage(_hSelf, IDC_LIST_KEYS, LB_SETCURSEL, res, 0);

View File

@ -31,8 +31,8 @@ const size_t nameLenMax = 64;
class NppParameters;
void getKeyStrFromVal(UCHAR keyVal, basic_string<TCHAR> & str);
void getNameStrFromCmd(DWORD cmd, basic_string<TCHAR> & str);
void getKeyStrFromVal(UCHAR keyVal, generic_string & str);
void getNameStrFromCmd(DWORD cmd, generic_string & str);
static int keyTranslate(int keyIn) {
switch (keyIn) {
case VK_DOWN: return SCK_DOWN;
@ -143,9 +143,9 @@ public:
return (_keyCombo._key != 0);
};
virtual basic_string<TCHAR> toString() const; //the hotkey part
basic_string<TCHAR> toMenuItemString() const { //basic_string<TCHAR> suitable for menu
basic_string<TCHAR> str = _menuName;
virtual generic_string toString() const; //the hotkey part
generic_string toMenuItemString() const { //generic_string suitable for menu
generic_string str = _menuName;
if(isEnabled())
{
str += TEXT("\t");
@ -214,8 +214,8 @@ public:
bool isEnabled() const;
size_t getSize() const;
basic_string<TCHAR> toString() const;
basic_string<TCHAR> toString(int index) const;
generic_string toString() const;
generic_string toString(int index) const;
int doDialog() {
return ::DialogBoxParam(_hInst, MAKEINTRESOURCE(IDD_SHORTCUTSCINT_DLG), _hParent, (DLGPROC)dlgProc, (LPARAM)this);
@ -265,7 +265,7 @@ struct recordedMacroStep {
int message;
long wParameter;
long lParameter;
basic_string<TCHAR> sParameter;
generic_string sParameter;
MacroTypeIndex MacroType;
recordedMacroStep(int iMessage, long wParam, long lParam);
@ -300,7 +300,7 @@ public:
UserCommand(Shortcut sc, const TCHAR *cmd, int id) : CommandShortcut(sc, id), _cmd(cmd) {_canModifyName = true;};
const TCHAR* getCmd() const {return _cmd.c_str();};
private:
basic_string<TCHAR> _cmd;
generic_string _cmd;
};
class PluginCmdShortcut : public CommandShortcut {

View File

@ -57,7 +57,7 @@ void LastRecentFileList::updateMenu() {
//Then readd them, so everything stays in sync
TCHAR indexBuffer[4];
for(int j = 0; j < _size; j++) {
std::basic_string<TCHAR> menuString = TEXT("");
std::generic_string menuString = TEXT("");
if (j < 9) { //first 9 have accelerator (0 unused)
menuString += TEXT("&");
}
@ -124,7 +124,7 @@ void LastRecentFileList::clear() {
}
std::basic_string<TCHAR> & LastRecentFileList::getItem(int id) {
std::generic_string & LastRecentFileList::getItem(int id) {
int i = 0;
for(; i < _size; i++) {
if (_lrfl.at(i)._id == id)
@ -135,7 +135,7 @@ std::basic_string<TCHAR> & LastRecentFileList::getItem(int id) {
return _lrfl.at(i)._name; //if not found, return first
};
std::basic_string<TCHAR> & LastRecentFileList::getIndex(int index) {
std::generic_string & LastRecentFileList::getIndex(int index) {
return _lrfl.at(index)._name; //if not found, return first
};

View File

@ -8,7 +8,7 @@
struct RecentItem {
int _id;
std::basic_string<TCHAR> _name;
std::generic_string _name;
RecentItem(const TCHAR * name) : _name(name) {};
};
@ -42,8 +42,8 @@ public :
return _userMax;
};
std::basic_string<TCHAR> & getItem(int id); //use menu id
std::basic_string<TCHAR> & getIndex(int index); //use menu id
std::generic_string & getItem(int id); //use menu id
std::generic_string & getIndex(int index); //use menu id
void setUserMaxNbLRF(int size);

View File

@ -15,8 +15,8 @@
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "Common.h"
#include "Notepad_plus.h"
#include "SysMsg.h"
#include "Process.h"
#include <exception> //default C++ exception
@ -48,7 +48,7 @@ void parseCommandLine(TCHAR * commandLine, ParamVector & paramVector) {
switch(commandLine[i]) {
case '\"': { //quoted filename, ignore any following whitespace
if (!isInFile) { //" will always be treated as start or end of param, in case the user forgot to add an space
paramVector.push_back(commandLine+i+1); //add next param(since zero terminated basic_string<TCHAR> original, no overflow of +1)
paramVector.push_back(commandLine+i+1); //add next param(since zero terminated generic_string original, no overflow of +1)
}
isInFile = !isInFile;
isInWhiteSpace = false;
@ -69,7 +69,7 @@ void parseCommandLine(TCHAR * commandLine, ParamVector & paramVector) {
break; }
}
}
//the commandline basic_string<TCHAR> is now a list of zero terminated strings concatenated, and the vector contains all the substrings
//the commandline generic_string is now a list of zero terminated strings concatenated, and the vector contains all the substrings
}
bool isInList(const TCHAR *token2Find, ParamVector & params) {
@ -85,7 +85,7 @@ bool isInList(const TCHAR *token2Find, ParamVector & params) {
return false;
};
bool getParamVal(TCHAR c, ParamVector & params, basic_string<TCHAR> & value) {
bool getParamVal(TCHAR c, ParamVector & params, generic_string & value) {
value = TEXT("");
int nrItems = params.size();
@ -102,14 +102,14 @@ bool getParamVal(TCHAR c, ParamVector & params, basic_string<TCHAR> & value) {
}
LangType getLangTypeFromParam(ParamVector & params) {
basic_string<TCHAR> langStr;
generic_string langStr;
if (!getParamVal('l', params, langStr))
return L_EXTERNAL;
return NppParameters::getLangIDFromStr(langStr.c_str());
};
int getLn2GoFromParam(ParamVector & params) {
basic_string<TCHAR> lineNumStr;
generic_string lineNumStr;
if (!getParamVal('n', params, lineNumStr))
return -1;
return generic_atoi(lineNumStr.c_str());
@ -123,16 +123,21 @@ const TCHAR FLAG_NOTABBAR[] = TEXT("-notabbar");
void doException(Notepad_plus & notepad_plus_plus);
int WINAPI NppMainEntry(HINSTANCE hInstance, HINSTANCE, TCHAR * cmdLine, int nCmdShow)
//int WINAPI NppMainEntry(HINSTANCE hInstance, HINSTANCE, TCHAR * cmdLine, int nCmdShow)
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR cmdLineAnsi, int nCmdShow)
{
LPTSTR cmdLine = ::GetCommandLine();
ParamVector params;
parseCommandLine(cmdLine, params);
params.erase(params.begin()); //remove the first element, since thats the path the the executable (GetCommandLine does that)
bool TheFirstOne = true;
::SetLastError(NO_ERROR);
::CreateMutex(NULL, false, TEXT("nppInstance"));
if (::GetLastError() == ERROR_ALREADY_EXISTS)
TheFirstOne = false;
ParamVector params;
parseCommandLine(cmdLine, params);
CmdLineParams cmdLineParams;
bool isMultiInst = isInList(FLAG_MULTI_INSTANCE, params);
cmdLineParams._isNoTab = isInList(FLAG_NOTABBAR, params);
@ -151,7 +156,7 @@ int WINAPI NppMainEntry(HINSTANCE hInstance, HINSTANCE, TCHAR * cmdLine, int nCm
cmdLineParams._isNoSession = true;
}
basic_string<TCHAR> quotFileName = TEXT("");
generic_string quotFileName = TEXT("");
// tell the running instance the FULL path to the new files to load
size_t nrFilesToOpen = params.size();
const TCHAR * currentFile;
@ -223,12 +228,12 @@ int WINAPI NppMainEntry(HINSTANCE hInstance, HINSTANCE, TCHAR * cmdLine, int nCm
NppGUI & nppGui = (NppGUI &)pNppParameters->getNppGUI();
basic_string<TCHAR> updaterDir = pNppParameters->getNppPath();
generic_string updaterDir = pNppParameters->getNppPath();
updaterDir += TEXT("\\updater\\");
basic_string<TCHAR> updaterFullPath = updaterDir + TEXT("gup.exe");
generic_string updaterFullPath = updaterDir + TEXT("gup.exe");
basic_string<TCHAR> version = TEXT("-v");
generic_string version = TEXT("-v");
version += VERSION_VALUE;
winVer curWinVer = notepad_plus_plus.getWinVersion();

View File

@ -13,16 +13,16 @@
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/EHa"
Optimization="0"
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\Common;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TIXML_USE_STL"
MinimalRebuild="TRUE"
ExceptionHandling="FALSE"
BasicRuntimeChecks="0"
@ -31,7 +31,8 @@
PrecompiledHeaderFile=""
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
DebugInformationFormat="3"
ForcedIncludeFiles="Common.h"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -39,7 +40,7 @@
AdditionalOptions="/fixed:no"
AdditionalDependencies="comctl32.lib shlwapi.lib shell32.lib Oleacc.lib"
ShowProgress="2"
OutputFile="$(OutDir)/../../bin/notepad++Debug.exe"
OutputFile="../bin/notepad++DebugA.exe"
Version="1.0"
LinkIncremental="1"
TypeLibraryFile="/TLBID"
@ -82,8 +83,8 @@ IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\use
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\bin"
IntermediateDirectory="Release"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="TRUE">
@ -96,8 +97,8 @@ IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\use
FavorSizeOrSpeed="2"
OmitFramePointers="TRUE"
OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\Common;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;TIXML_USE_STL"
StringPooling="TRUE"
ExceptionHandling="FALSE"
RuntimeLibrary="4"
@ -105,7 +106,8 @@ IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\use
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
DebugInformationFormat="3"
ForcedIncludeFiles="Common.h"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
@ -113,7 +115,154 @@ IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\use
AdditionalOptions="/OPT:WIN98"
AdditionalDependencies="comctl32.lib shlwapi.lib shell32.lib Oleacc.lib"
ShowProgress="2"
OutputFile="$(OutDir)/notepad++.exe"
OutputFile="../bin/notepad++A.exe"
Version="1.0"
LinkIncremental="1"
TypeLibraryFile=""
TypeLibraryResourceID="1"
GenerateDebugInformation="FALSE"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="IF NOT EXIST ..\bin\config.xml COPY ..\src\config.model.xml ..\bin\config.xml
IF NOT EXIST ..\bin\config.model.xml COPY ..\src\config.model.xml ..\bin\config.model.xml
IF NOT EXIST ..\bin\langs.xml COPY ..\src\langs.model.xml ..\bin\langs.xml
IF NOT EXIST ..\bin\langs.model.xml COPY ..\src\langs.model.xml ..\bin\langs.model.xml
IF NOT EXIST ..\bin\stylers.xml COPY ..\src\stylers.model.xml ..\bin\stylers.xml
IF NOT EXIST ..\bin\stylers.model.xml COPY ..\src\stylers.model.xml ..\bin\stylers.model.xml
IF NOT EXIST ..\bin\LINEDRAW.TTF COPY ..\src\font\LINEDRAW.TTF ..\bin\LINEDRAW.TTF
IF NOT EXIST ..\bin\contextMenu.xml COPY ..\src\contextMenu.xml ..\bin\contextMenu.xml
IF NOT EXIST ..\bin\shortcuts.xml COPY ..\src\shortcuts.xml ..\bin\shortcuts.xml
IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\userDefineLang.xml
"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug Unicode|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1">
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/EHa"
Optimization="0"
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\Common;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;TIXML_USE_STL"
MinimalRebuild="TRUE"
ExceptionHandling="FALSE"
BasicRuntimeChecks="0"
RuntimeLibrary="5"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=""
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"
ForcedIncludeFiles="Common.h"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="unicows.lib comctl32.lib shlwapi.lib shell32.lib"
ShowProgress="2"
OutputFile="../bin/notepad++Debug.exe"
Version="1.0"
LinkIncremental="1"
IgnoreAllDefaultLibraries="FALSE"
IgnoreDefaultLibraryNames=""
TypeLibraryFile="/TLBID"
TypeLibraryResourceID="5"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/notepadPlus.pdb"
SubSystem="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="IF NOT EXIST ..\bin\config.xml COPY ..\src\config.model.xml ..\bin\config.xml
IF NOT EXIST ..\bin\config.model.xml COPY ..\src\config.model.xml ..\bin\config.model.xml
IF NOT EXIST ..\bin\langs.xml COPY ..\src\langs.model.xml ..\bin\langs.xml
IF NOT EXIST ..\bin\langs.model.xml COPY ..\src\langs.model.xml ..\bin\langs.model.xml
IF NOT EXIST ..\bin\stylers.xml COPY ..\src\stylers.model.xml ..\bin\stylers.xml
IF NOT EXIST ..\bin\stylers.model.xml COPY ..\src\stylers.model.xml ..\bin\stylers.model.xml
IF NOT EXIST ..\bin\LINEDRAW.TTF COPY ..\src\font\LINEDRAW.TTF ..\bin\LINEDRAW.TTF
IF NOT EXIST ..\bin\contextMenu.xml COPY ..\src\contextMenu.xml ..\bin\contextMenu.xml
IF NOT EXIST ..\bin\shortcuts.xml COPY ..\src\shortcuts.xml ..\bin\shortcuts.xml
IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\userDefineLang.xml
"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release Unicode|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/EHa"
Optimization="2"
GlobalOptimizations="TRUE"
InlineFunctionExpansion="1"
FavorSizeOrSpeed="2"
OmitFramePointers="TRUE"
OptimizeForWindowsApplication="TRUE"
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\Common;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;TIXML_USE_STL"
StringPooling="TRUE"
ExceptionHandling="FALSE"
RuntimeLibrary="4"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"
ForcedIncludeFiles="Common.h"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/OPT:WIN98"
AdditionalDependencies="unicows.lib comctl32.lib shlwapi.lib shell32.lib Oleacc.lib"
ShowProgress="2"
OutputFile="../bin/notepad++.exe"
Version="1.0"
LinkIncremental="1"
TypeLibraryFile=""
@ -179,10 +328,19 @@ IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\use
</File>
<File
RelativePath="..\src\winmain.cpp">
<FileConfiguration
Name="Debug Unicode|Win32">
<Tool
Name="VCCLCompilerTool"
GeneratePreprocessedFile="0"/>
</FileConfiguration>
</File>
<Filter
Name="MISC"
Filter="">
<File
RelativePath="..\src\MISC\Common\Common.cpp">
</File>
<File
RelativePath="..\src\MISC\PluginsManager\PluginsManager.cpp">
</File>
@ -192,9 +350,6 @@ IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\use
<File
RelativePath="..\src\MISC\RegExt\regExtDlg.cpp">
</File>
<File
RelativePath="..\src\MISC\SysMsg\SysMsg.cpp">
</File>
<File
RelativePath="..\src\Misc\Exception\Win32Exception.cpp">
</File>
@ -395,6 +550,9 @@ IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\use
<Filter
Name="MISC"
Filter="">
<File
RelativePath="..\src\MISC\Common\Common.h">
</File>
<File
RelativePath="..\src\MISC\FileNameStringSplitter.h">
</File>
@ -416,9 +574,6 @@ IF NOT EXIST ..\bin\userDefineLang.xml COPY ..\src\userDefineLang.xml ..\bin\use
<File
RelativePath="..\src\MISC\RegExt\regExtDlgRc.h">
</File>
<File
RelativePath="..\src\MISC\SysMsg\SysMsg.h">
</File>
<File
RelativePath="..\src\Misc\Exception\Win32Exception.h">
</File>