Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion sakura_core/CGrepEnumFileBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <vector>
#include <windows.h>
#include <string.h>
#include <tchar.h>
#include <Shlwapi.h>
#include "CGrepEnumKeys.h"
#include "util/string_ex.h"
Expand Down
1 change: 0 additions & 1 deletion sakura_core/CGrepEnumKeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <vector>
#include <windows.h>
#include <string.h>
#include <tchar.h>
#include "util/string_ex.h"
#include "util/file.h"

Expand Down
1 change: 0 additions & 1 deletion sakura_core/_main/CCommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "StdAfx.h"
#include "CCommandLine.h"
#include "mem/CMemory.h"
#include <tchar.h>
#include <io.h>
#include <string.h>
#include "debug/CRunningTimer.h"
Expand Down
1 change: 0 additions & 1 deletion sakura_core/_main/CProcessFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "debug/CRunningTimer.h"
#include "util/os.h"
#include <io.h>
#include <tchar.h>
#include "CSelectLang.h"
#include "config/system_constants.h"

Expand Down
1 change: 0 additions & 1 deletion sakura_core/_main/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#pragma once

#include <Windows.h>
#include <tchar.h>

#include "charset/charset.h"

Expand Down
34 changes: 17 additions & 17 deletions sakura_core/config/system_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
// 定数命名補助 //
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
//数値定数の文字列化 2009.02.11 ryoji
#define _NUM_TO_STR(n) #n
#define _NUM_TO_STR(n) L ## #n
#define NUM_TO_STR(n) _NUM_TO_STR(n)

//! デバッグ判別、定数サフィックス 2007.09.20 kobake
#ifdef _DEBUG
#define _DEBUG_SUFFIX_ "_DEBUG"
#define _DEBUG_SUFFIX_ L"_DEBUG"
#else
#define _DEBUG_SUFFIX_ ""
#define _DEBUG_SUFFIX_ L""
#endif

//! ビルドコード判別、定数サフィックス 2007.09.20 kobake
#define _CODE_SUFFIX_ "WP"
#define _CODE_SUFFIX_ L"WP"

//! ターゲットマシン判別 2010.08.21 Moca 追加
#ifdef _WIN64
#define CON_SKR_MACHINE_SUFFIX_ "M64"
#define CON_SKR_MACHINE_SUFFIX_ L"M64"
#else
#define CON_SKR_MACHINE_SUFFIX_ ""
#define CON_SKR_MACHINE_SUFFIX_ L""
#endif

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
Expand Down Expand Up @@ -551,7 +551,7 @@
*/
#define N_SHAREDATA_VERSION 181
#define STR_SHAREDATA_VERSION NUM_TO_STR(N_SHAREDATA_VERSION)
#define GSTR_SHAREDATA (L"SakuraShareData" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_SHAREDATA (L"SakuraShareData" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
// ミューテックス //
Expand All @@ -561,42 +561,42 @@
#define GSTR_MUTEX_SAKURA L"MutexSakuraEditor"

//! コントロールプロセス
#define GSTR_MUTEX_SAKURA_CP (L"MutexSakuraEditorCP" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_MUTEX_SAKURA_CP (L"MutexSakuraEditorCP" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

//! ノーマルプロセス初期化同期
#define GSTR_MUTEX_SAKURA_INIT (L"MutexSakuraEditorInit" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_MUTEX_SAKURA_INIT (L"MutexSakuraEditorInit" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

//! ノード操作同期
#define GSTR_MUTEX_SAKURA_EDITARR (L"MutexSakuraEditorEditArr" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_MUTEX_SAKURA_EDITARR (L"MutexSakuraEditorEditArr" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

//DLLSHARE Work操作同期
#define GSTR_MUTEX_SAKURA_SHAREWORK (L"MutexSakuraEditorShareWork" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_MUTEX_SAKURA_SHAREWORK (L"MutexSakuraEditorShareWork" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

//! 強調キーワードロック
#define GSTR_MUTEX_SAKURA_KEYWORD (L"MutexSakuraEditorKeyword" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_MUTEX_SAKURA_KEYWORD (L"MutexSakuraEditorKeyword" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

//タイプ別設定転送用
#define GSTR_MUTEX_SAKURA_DOCTYPE (L"MutexSakuraEditorDocType" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_MUTEX_SAKURA_DOCTYPE (L"MutexSakuraEditorDocType" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
// イベント //
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //

//! 初期化完了イベント
#define GSTR_EVENT_SAKURA_CP_INITIALIZED (L"EventSakuraEditorCPInitialized" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_EVENT_SAKURA_CP_INITIALIZED (L"EventSakuraEditorCPInitialized" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
// ウィンドウクラス //
// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //

//! コントロールトレイ
#define GSTR_CEDITAPP (L"CControlTray" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_CEDITAPP (L"CControlTray" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

//! メインウィンドウ
#define GSTR_EDITWINDOWNAME (L"TextEditorWindow" _T(CON_SKR_MACHINE_SUFFIX_) _T(_CODE_SUFFIX_) _T(_DEBUG_SUFFIX_) _T(STR_SHAREDATA_VERSION))
#define GSTR_EDITWINDOWNAME (L"TextEditorWindow" CON_SKR_MACHINE_SUFFIX_ _CODE_SUFFIX_ _DEBUG_SUFFIX_ STR_SHAREDATA_VERSION)

//! ビュー
#define GSTR_VIEWNAME (L"SakuraView" _T(STR_SHAREDATA_VERSION))
#define GSTR_VIEWNAME (L"SakuraView" STR_SHAREDATA_VERSION)

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
// リソース //
Expand Down
3 changes: 1 addition & 2 deletions sakura_core/debug/Debug1.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <vadefs.h>

#include <Windows.h>
#include <tchar.h>

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- //
// メッセージ出力:実装 //
Expand Down Expand Up @@ -58,7 +57,7 @@ void DebugOutW( LPCWSTR lpFmt, ...);

//トレース出力(トレース箇所のファイルパスと行番号を出力してエラー解析を容易にする目的)
#ifdef _DEBUG
#define TRACE( format, ... ) DEBUG_TRACE( _T("%hs(%d): ") _T(format) _T("\n"), __FILE__, __LINE__, __VA_ARGS__ )
#define TRACE( format, ... ) DEBUG_TRACE( L"%hs(%d): " L ## format L"\n", __FILE__, __LINE__, __VA_ARGS__ )
#else
#define TRACE( ... )
#endif
Expand Down
38 changes: 19 additions & 19 deletions sakura_core/dlg/CDlgAbout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,53 +52,53 @@ const DWORD p_helpids[] = { //12900
// 2006.01.17 Moca COMPILER_VERを追加
// 2010.04.15 Moca icc/dmcを追加しCPUを分離
#if defined(_M_AMD64)
# define TARGET_M_SUFFIX "_A64"
# define TARGET_M_SUFFIX L"_A64"
#else
# define TARGET_M_SUFFIX ""
# define TARGET_M_SUFFIX L""
#endif

#if defined(__BORLANDC__)
// borland c++
// http://docwiki.embarcadero.com/RADStudio/Rio/en/Predefined_Macros
// http://docwiki.embarcadero.com/RADStudio/Rio/en/Predefined_Macros#C.2B.2B_Compiler_Versions_in_Predefined_Macros
# define COMPILER_TYPE "B"
# define COMPILER_TYPE L"B"
# define COMPILER_VER __BORLANDC__
#elif defined(__GNUG__)
// __GNUG__ = (__GNUC__ && __cplusplus)
// GNU C++
// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html
# define COMPILER_TYPE "G"
# define COMPILER_TYPE L"G"
# define COMPILER_VER (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#elif defined(__INTEL_COMPILER)
// Intel Compiler
// https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-additional-predefined-macros
# define COMPILER_TYPE "I"
# define COMPILER_TYPE L"I"
# define COMPILER_VER __INTEL_COMPILER
#elif defined(__DMC__)
// Digital Mars C/C++
// https://digitalmars.com/ctg/predefined.html
# define COMPILER_TYPE "D"
# define COMPILER_TYPE L"D"
# define COMPILER_VER __DMC__
#elif defined(_MSC_VER)
// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019
# define COMPILER_TYPE "V"
# define COMPILER_TYPE L"V"
# define COMPILER_VER _MSC_VER
#else
// unknown
# define COMPILER_TYPE "U"
# define COMPILER_TYPE L"U"
# define COMPILER_VER 0
#endif
// To Here Feb. 7, 2002 genta

#define TARGET_STRING_MODEL "WP"
#define TARGET_STRING_MODEL L"WP"

#ifdef _DEBUG
#define TARGET_DEBUG_MODE "D"
#define TARGET_DEBUG_MODE L"D"
#else
#define TARGET_DEBUG_MODE "R"
#define TARGET_DEBUG_MODE L"R"
#endif

#define TSTR_TARGET_MODE _T(TARGET_STRING_MODEL) _T(TARGET_DEBUG_MODE)
#define TSTR_TARGET_MODE TARGET_STRING_MODEL TARGET_DEBUG_MODE

#if defined(CI_BUILD_URL)
#pragma message("CI_BUILD_URL: " CI_BUILD_URL)
Expand Down Expand Up @@ -179,20 +179,20 @@ BOOL CDlgAbout::OnInitDialog( HWND hwndDlg, WPARAM wParam, LPARAM lParam )

// 2行目
#ifdef GIT_COMMIT_HASH
cmemMsg.AppendString( L"(GitHash " _T(GIT_COMMIT_HASH) L")\r\n" );
cmemMsg.AppendString( L"(GitHash " LTEXT(GIT_COMMIT_HASH) L")\r\n" );
#endif

// 3行目
#ifdef GIT_REMOTE_ORIGIN_URL
cmemMsg.AppendString( L"(GitURL " _T(GIT_REMOTE_ORIGIN_URL) L")\r\n");
cmemMsg.AppendString( L"(GitURL " LTEXT(GIT_REMOTE_ORIGIN_URL) L")\r\n");
#endif

// 段落区切り
cmemMsg.AppendString( L"\r\n" );

// コンパイル情報
cmemMsg.AppendStringF(
L" Compile Info: " _T(COMPILER_TYPE) _T(TARGET_M_SUFFIX) L"%d " TSTR_TARGET_MODE L" WIN%03x/I%03x/N%03x\r\n",
L" Compile Info: " COMPILER_TYPE TARGET_M_SUFFIX L"%d " TSTR_TARGET_MODE L" WIN%03x/I%03x/N%03x\r\n",
COMPILER_VER, WINVER, _WIN32_IE, _WIN32_WINNT
);

Expand Down Expand Up @@ -306,20 +306,20 @@ BOOL CDlgAbout::OnStnClicked( int wID )
case IDC_STATIC_URL_CI_BUILD:
{
#if defined(CI_BUILD_URL)
::ShellExecute(GetHwnd(), nullptr, _T(CI_BUILD_URL), nullptr, nullptr, SW_SHOWNORMAL);
::ShellExecute(GetHwnd(), nullptr, LTEXT(CI_BUILD_URL), nullptr, nullptr, SW_SHOWNORMAL);
#elif defined(GIT_REMOTE_ORIGIN_URL)
::ShellExecute(GetHwnd(), nullptr, _T(GIT_REMOTE_ORIGIN_URL), nullptr, nullptr, SW_SHOWNORMAL);
::ShellExecute(GetHwnd(), nullptr, LTEXT(GIT_REMOTE_ORIGIN_URL), nullptr, nullptr, SW_SHOWNORMAL);
#endif
return TRUE;
}
case IDC_STATIC_URL_GITHUB_COMMIT:
#if defined(GITHUB_COMMIT_URL)
::ShellExecute(GetHwnd(), nullptr, _T(GITHUB_COMMIT_URL), nullptr, nullptr, SW_SHOWNORMAL);
::ShellExecute(GetHwnd(), nullptr, LTEXT(GITHUB_COMMIT_URL), nullptr, nullptr, SW_SHOWNORMAL);
#endif
return TRUE;
case IDC_STATIC_URL_GITHUB_PR:
#if defined(GITHUB_PR_HEAD_URL)
::ShellExecute(GetHwnd(), nullptr, _T(GITHUB_PR_HEAD_URL), nullptr, nullptr, SW_SHOWNORMAL);
::ShellExecute(GetHwnd(), nullptr, LTEXT(GITHUB_PR_HEAD_URL), nullptr, nullptr, SW_SHOWNORMAL);
#endif
return TRUE;
}
Expand Down
2 changes: 1 addition & 1 deletion sakura_core/func/CKeyBind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ WCHAR* CKeyBind::MakeMenuLabel(const WCHAR* sName, const WCHAR* sKey)
}
else {
if( !GetDllShareData().m_Common.m_sMainMenu.m_bMainMenuKeyParentheses
&& (((p = wcschr( sName, sKey[0])) != nullptr) || ((p = wcschr( sName, _totlower(sKey[0]))) != nullptr)) ){
&& (((p = wcschr( sName, sKey[0])) != nullptr) || ((p = wcschr( sName, towlower(sKey[0]))) != nullptr)) ){
// 欧文風、使用している文字をアクセスキーに
wcscpy_s( sLabel, _countof(sLabel), sName );
sLabel[p-sName] = L'&';
Expand Down
1 change: 0 additions & 1 deletion sakura_core/types/CType_Tex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

#include "StdAfx.h"
#include <wchar.h>
#include <algorithm>
#include "types/CType.h"
#include "doc/CEditDoc.h"
Expand Down
1 change: 0 additions & 1 deletion sakura_core/util/MessageBoxF.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#define SAKURA_MESSAGEBOXF_542C25FF_34EB_4920_AC1A_DA32919E101B_H_
#pragma once

#include <tchar.h>
#include <Windows.h>

#include <cstdarg>
Expand Down
2 changes: 1 addition & 1 deletion sakura_core/util/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ HFONT UpdateDialogFont( HWND hwnd, BOOL force )
{
HFONT hFontDialog = (HFONT)::SendMessageAny( hwnd, WM_GETFONT, 0, (LPARAM)nullptr );

if( !force && wcsncmp_literal( CSelectLang::getDefaultLangString(), _T("Japanese") ) != 0 ){
if( !force && wcsncmp_literal( CSelectLang::getDefaultLangString(), L"Japanese" ) != 0 ){
return hFontDialog;
}

Expand Down