diff --git a/Notepad3_vs2017.sln b/Notepad3_vs2017.sln index afc167569..80530ea2f 100644 --- a/Notepad3_vs2017.sln +++ b/Notepad3_vs2017.sln @@ -11,6 +11,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minipath", "minipath\minipa EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scintilla", "scintilla\Scintilla_VS2017.vcxproj", "{5877B917-512B-49F5-B514-1B4159E7A9CA}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "np3encrypt", "np3encrypt\np3encrypt_VS2017.vcxproj", "{0210F830-26C6-40FC-BFD1-6ED833B90830}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -27,14 +29,6 @@ Global {BAAD32AB-CD47-12FD-873C-0BBC204B7641}.Release|Win32.Build.0 = Release|Win32 {BAAD32AB-CD47-12FD-873C-0BBC204B7641}.Release|x64.ActiveCfg = Release|x64 {BAAD32AB-CD47-12FD-873C-0BBC204B7641}.Release|x64.Build.0 = Release|x64 - {5877B917-512B-49F5-B514-1B4159E7A9CA}.Debug|Win32.ActiveCfg = Debug|Win32 - {5877B917-512B-49F5-B514-1B4159E7A9CA}.Debug|Win32.Build.0 = Debug|Win32 - {5877B917-512B-49F5-B514-1B4159E7A9CA}.Debug|x64.ActiveCfg = Debug|x64 - {5877B917-512B-49F5-B514-1B4159E7A9CA}.Debug|x64.Build.0 = Debug|x64 - {5877B917-512B-49F5-B514-1B4159E7A9CA}.Release|Win32.ActiveCfg = Release|Win32 - {5877B917-512B-49F5-B514-1B4159E7A9CA}.Release|Win32.Build.0 = Release|Win32 - {5877B917-512B-49F5-B514-1B4159E7A9CA}.Release|x64.ActiveCfg = Release|x64 - {5877B917-512B-49F5-B514-1B4159E7A9CA}.Release|x64.Build.0 = Release|x64 {781B17E7-427F-488F-A8E9-360BA38A10F3}.Debug|Win32.ActiveCfg = Debug|Win32 {781B17E7-427F-488F-A8E9-360BA38A10F3}.Debug|Win32.Build.0 = Debug|Win32 {781B17E7-427F-488F-A8E9-360BA38A10F3}.Debug|Win32.Deploy.0 = Debug|Win32 @@ -47,6 +41,22 @@ Global {781B17E7-427F-488F-A8E9-360BA38A10F3}.Release|x64.ActiveCfg = Release|x64 {781B17E7-427F-488F-A8E9-360BA38A10F3}.Release|x64.Build.0 = Release|x64 {781B17E7-427F-488F-A8E9-360BA38A10F3}.Release|x64.Deploy.0 = Release|x64 + {5877B917-512B-49F5-B514-1B4159E7A9CA}.Debug|Win32.ActiveCfg = Debug|Win32 + {5877B917-512B-49F5-B514-1B4159E7A9CA}.Debug|Win32.Build.0 = Debug|Win32 + {5877B917-512B-49F5-B514-1B4159E7A9CA}.Debug|x64.ActiveCfg = Debug|x64 + {5877B917-512B-49F5-B514-1B4159E7A9CA}.Debug|x64.Build.0 = Debug|x64 + {5877B917-512B-49F5-B514-1B4159E7A9CA}.Release|Win32.ActiveCfg = Release|Win32 + {5877B917-512B-49F5-B514-1B4159E7A9CA}.Release|Win32.Build.0 = Release|Win32 + {5877B917-512B-49F5-B514-1B4159E7A9CA}.Release|x64.ActiveCfg = Release|x64 + {5877B917-512B-49F5-B514-1B4159E7A9CA}.Release|x64.Build.0 = Release|x64 + {0210F830-26C6-40FC-BFD1-6ED833B90830}.Debug|Win32.ActiveCfg = Debug|Win32 + {0210F830-26C6-40FC-BFD1-6ED833B90830}.Debug|Win32.Build.0 = Debug|Win32 + {0210F830-26C6-40FC-BFD1-6ED833B90830}.Debug|x64.ActiveCfg = Debug|x64 + {0210F830-26C6-40FC-BFD1-6ED833B90830}.Debug|x64.Build.0 = Debug|x64 + {0210F830-26C6-40FC-BFD1-6ED833B90830}.Release|Win32.ActiveCfg = Release|Win32 + {0210F830-26C6-40FC-BFD1-6ED833B90830}.Release|Win32.Build.0 = Release|Win32 + {0210F830-26C6-40FC-BFD1-6ED833B90830}.Release|x64.ActiveCfg = Release|x64 + {0210F830-26C6-40FC-BFD1-6ED833B90830}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/minipath/src/Dialogs.c b/minipath/src/Dialogs.c index 81c60194e..c151b42ec 100644 --- a/minipath/src/Dialogs.c +++ b/minipath/src/Dialogs.c @@ -583,8 +583,8 @@ INT_PTR CALLBACK AboutDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam) hFontTitle = GetStockObject(DEFAULT_GUI_FONT); GetObject(hFontTitle,sizeof(LOGFONT),&lf); lf.lfWeight = FW_BOLD; - lf.lfWidth = 8; - lf.lfHeight = 22; + lf.lfWidth = 8; + lf.lfHeight = 22; hFontTitle = CreateFontIndirect(&lf); SendDlgItemMessage(hwnd,IDC_VERSION,WM_SETFONT,(WPARAM)hFontTitle,TRUE); @@ -1246,7 +1246,7 @@ INT_PTR CALLBACK ProgPageProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lParam) extern HWND hwndStatus; extern int nIdFocus; -extern WCHAR tchFilter[128]; +extern WCHAR tchFilter[DL_FILTER_BUFSIZE]; extern BOOL bNegFilter; INT_PTR OptionsPropSheet(HWND hwnd,HINSTANCE hInstance) diff --git a/np3encrypt/np3encrypt_VS2017.vcxproj b/np3encrypt/np3encrypt_VS2017.vcxproj new file mode 100644 index 000000000..19d92e245 --- /dev/null +++ b/np3encrypt/np3encrypt_VS2017.vcxproj @@ -0,0 +1,172 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {0210F830-26C6-40FC-BFD1-6ED833B90830} + Win32Proj + np3encrypt + 8.1 + np3encrypt + + + + Application + true + v141_xp + Unicode + + + Application + false + v141_xp + true + Unicode + + + Application + true + v141_xp + Unicode + + + Application + false + v141_xp + true + Unicode + + + + + + + + + + + + + + + + + + + + + false + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ + + + true + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ + + + true + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ + + + false + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\ + ..\Bin\$(Configuration)_$(PlatformShortName)_$(PlatformToolset)\obj\$(ProjectName)\ + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/np3encrypt/np3encrypt_VS2017.vcxproj.filters b/np3encrypt/np3encrypt_VS2017.vcxproj.filters new file mode 100644 index 000000000..23124a7bd --- /dev/null +++ b/np3encrypt/np3encrypt_VS2017.vcxproj.filters @@ -0,0 +1,63 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {3f9cf2f1-2454-45d8-a2ed-02e3a66581e8} + + + + + + + + Headerdateien + + + Headerdateien + + + crypto + + + crypto + + + crypto + + + crypto + + + + + Quelldateien + + + Quelldateien + + + crypto + + + crypto + + + crypto + + + crypto + + + \ No newline at end of file diff --git a/src/Dialogs.c b/src/Dialogs.c index f8dd4f574..6bff9f21c 100644 --- a/src/Dialogs.c +++ b/src/Dialogs.c @@ -2180,7 +2180,7 @@ INT_PTR CALLBACK SelectDefLineEndingDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LP case WM_INITDIALOG: { int i; - WCHAR wch[128]; + WCHAR wch[256]; piOption = (int*)lParam; diff --git a/src/Edit.c b/src/Edit.c index 56020bd09..1c2bfbbfc 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -4829,7 +4829,7 @@ INT_PTR CALLBACK EditFindReplaceDlgProcW(HWND hwnd,UINT umsg,WPARAM wParam,LPARA static BOOL bFirstTime = TRUE; #endif - WCHAR tch[128]; + WCHAR tch[256]; HMENU hmenu; SetWindowLongPtr(hwnd,DWLP_USER,(LONG_PTR)lParam); diff --git a/src/Helpers.c b/src/Helpers.c index 3cc39db61..6b50047f8 100644 --- a/src/Helpers.c +++ b/src/Helpers.c @@ -381,11 +381,11 @@ BOOL SetWindowTitle(HWND hwnd,UINT uIDAppName,BOOL bIsElevated,UINT uIDUntitled, UINT uIDReadOnly,BOOL bReadOnly,LPCWSTR lpszExcerpt) { - WCHAR szUntitled[128]; + WCHAR szUntitled[256]; WCHAR szExcrptQuot[256]; WCHAR szExcrptFmt[32]; - WCHAR szAppName[128]; - WCHAR szElevatedAppName[128]; + WCHAR szAppName[256]; + WCHAR szElevatedAppName[256]; WCHAR szReadOnly[32]; WCHAR szTitle[512]; static WCHAR szCachedFile[MAX_PATH]; diff --git a/src/Notepad3.c b/src/Notepad3.c index f1598b2bc..ac4a17496 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -252,7 +252,7 @@ BOOL bLastCopyFromMe = FALSE; DWORD dwLastCopyTime; UINT uidsAppTitle = IDS_APPTITLE; -WCHAR szTitleExcerpt[128] = L""; +WCHAR szTitleExcerpt[256] = { L'\0' }; int fKeepTitleExcerpt = 0; HANDLE hChangeHandle = NULL; @@ -7843,7 +7843,7 @@ void SetNotifyIconTitle(HWND hwnd) NOTIFYICONDATA nid; SHFILEINFO shfi; - WCHAR tchTitle[128]; + WCHAR tchTitle[256]; WCHAR tchFormat[32]; ZeroMemory(&nid,sizeof(NOTIFYICONDATA)); diff --git a/src/Styles.c b/src/Styles.c index a8a43c73d..373a3fa3a 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -2724,10 +2724,8 @@ void Style_Load() for (iLexer = 0; iLexer < COUNTOF(pLexArray); iLexer++) { LoadIniSection(pLexArray[iLexer]->pszName,pIniSection,cchIniSection); - if (!IniSectionGetString(pIniSection,L"FileNameExtensions",pLexArray[iLexer]->pszDefExt, - pLexArray[iLexer]->szExtensions,COUNTOF(pLexArray[iLexer]->szExtensions))) - lstrcpyn(pLexArray[iLexer]->szExtensions,pLexArray[iLexer]->pszDefExt, - COUNTOF(pLexArray[iLexer]->szExtensions)); + IniSectionGetString(pIniSection, L"FileNameExtensions", pLexArray[iLexer]->pszDefExt, + pLexArray[iLexer]->szExtensions, COUNTOF(pLexArray[iLexer]->szExtensions)); i = 0; while (pLexArray[iLexer]->Styles[i].iStyle != -1) { IniSectionGetString(pIniSection,pLexArray[iLexer]->Styles[i].pszName, @@ -2761,7 +2759,7 @@ void Style_Save() IniSectionSetString(pIniSection,tch,wch); } SaveIniSection(L"Custom Colors",pIniSection); - ZeroMemory(pIniSection,cchIniSection); + ZeroMemory(pIniSection, cchIniSection * sizeof(WCHAR)); // auto select IniSectionSetInt(pIniSection,L"Use2ndDefaultStyle",bUse2ndDefaultStyle); @@ -2777,13 +2775,14 @@ void Style_Save() IniSectionSetInt(pIniSection,L"SelectDlgSizeY",cyStyleSelectDlg); SaveIniSection(L"Styles",pIniSection); + ZeroMemory(pIniSection, cchIniSection * sizeof(WCHAR)); if (!fStylesModified) { LocalFree(pIniSection); return; } - ZeroMemory(pIniSection,cchIniSection); + for (iLexer = 0; iLexer < COUNTOF(pLexArray); iLexer++) { IniSectionSetString(pIniSection,L"FileNameExtensions",pLexArray[iLexer]->szExtensions); i = 0; @@ -2791,8 +2790,9 @@ void Style_Save() IniSectionSetString(pIniSection,pLexArray[iLexer]->Styles[i].pszName,pLexArray[iLexer]->Styles[i].szValue); i++; } + SaveIniSection(pLexArray[iLexer]->pszName,pIniSection); - ZeroMemory(pIniSection,cchIniSection); + ZeroMemory(pIniSection, cchIniSection * sizeof(WCHAR)); } LocalFree(pIniSection); } @@ -2829,10 +2829,8 @@ BOOL Style_Import(HWND hwnd) for (iLexer = 0; iLexer < COUNTOF(pLexArray); iLexer++) { if (GetPrivateProfileSection(pLexArray[iLexer]->pszName,pIniSection,cchIniSection,szFile)) { - if (!IniSectionGetString(pIniSection,L"FileNameExtensions",pLexArray[iLexer]->pszDefExt, - pLexArray[iLexer]->szExtensions,COUNTOF(pLexArray[iLexer]->szExtensions))) - lstrcpyn(pLexArray[iLexer]->szExtensions,pLexArray[iLexer]->pszDefExt, - COUNTOF(pLexArray[iLexer]->szExtensions)); + IniSectionGetString(pIniSection, L"FileNameExtensions", pLexArray[iLexer]->pszDefExt, + pLexArray[iLexer]->szExtensions, COUNTOF(pLexArray[iLexer]->szExtensions)); i = 0; while (pLexArray[iLexer]->Styles[i].iStyle != -1) { IniSectionGetString(pIniSection,pLexArray[iLexer]->Styles[i].pszName, @@ -2888,7 +2886,7 @@ BOOL Style_Export(HWND hwnd) } if (!WritePrivateProfileSection(pLexArray[iLexer]->pszName,pIniSection,szFile)) dwError = GetLastError(); - ZeroMemory(pIniSection,cchIniSection); + ZeroMemory(pIniSection, cchIniSection * sizeof(WCHAR)); } LocalFree(pIniSection); @@ -3165,7 +3163,6 @@ void Style_SetLexer(HWND hwnd,PEDITLEXER pLexNew) SendMessage(hwnd,SCI_SETEXTRADESCENT,0,0); //wsprintf(lexDefault.Styles[11+iIdx].szValue,L"size:0"); } - { // set folding style; braces are for scoping only static const int iMarkerIDs[] = { @@ -4351,7 +4348,7 @@ int Style_GetLexerIconId(PEDITLEXER plex) HTREEITEM Style_AddLexerToTreeView(HWND hwnd,PEDITLEXER plex) { int i = 0; - WCHAR tch[128]; + WCHAR tch[256]; HTREEITEM hTreeNode; @@ -4398,7 +4395,7 @@ HTREEITEM Style_AddLexerToTreeView(HWND hwnd,PEDITLEXER plex) // void Style_AddLexerToListView(HWND hwnd,PEDITLEXER plex) { - WCHAR tch[128]; + WCHAR tch[256]; LVITEM lvi; ZeroMemory(&lvi,sizeof(LVITEM)); @@ -4510,14 +4507,15 @@ INT_PTR CALLBACK Style_ConfigDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lP GetDlgItemText(hwnd,IDC_STYLEEDIT,pCurrentStyle->szValue,COUNTOF(pCurrentStyle->szValue)); else if (pCurrentLexer) { - if (!GetDlgItemText(hwnd,IDC_STYLEEDIT,pCurrentLexer->szExtensions,COUNTOF(pCurrentLexer->szExtensions))) - lstrcpy(pCurrentLexer->szExtensions,pCurrentLexer->pszDefExt); + WCHAR szBuf[256] = { L'\0' }; + if (GetDlgItemText(hwnd, IDC_STYLEEDIT, szBuf, COUNTOF(szBuf))) + lstrcpy(pCurrentLexer->szExtensions, szBuf); } // a lexer has been selected if (!TreeView_GetParent(hwndTV,lpnmtv->itemNew.hItem)) { - WCHAR wch[128]; + WCHAR wch[256]; GetDlgItemText(hwnd,IDC_STYLELABELS,wch,COUNTOF(wch)); if (StrChr(wch,L'|')) *StrChr(wch,L'|') = 0; @@ -4564,7 +4562,7 @@ INT_PTR CALLBACK Style_ConfigDlgProc(HWND hwnd,UINT umsg,WPARAM wParam,LPARAM lP // a style has been selected else { - WCHAR wch[128]; + WCHAR wch[256]; GetDlgItemText(hwnd,IDC_STYLELABELS,wch,COUNTOF(wch)); if (StrChr(wch,L'|')) *StrChr(wch,L'|') = 0; diff --git a/src/Styles.h b/src/Styles.h index 877e5f3f8..49fdb1996 100644 --- a/src/Styles.h +++ b/src/Styles.h @@ -24,7 +24,7 @@ typedef struct _editstyle int rid; WCHAR* pszName; WCHAR* pszDefault; - WCHAR szValue[128]; + WCHAR szValue[256]; } EDITSTYLE, *PEDITSTYLE; @@ -42,7 +42,7 @@ typedef struct _editlexer int rid; WCHAR* pszName; WCHAR* pszDefExt; - WCHAR szExtensions[128]; + WCHAR szExtensions[256]; PKEYWORDLIST pKeyWords; EDITSTYLE Styles[];