Skip to content

Commit

Permalink
auto format
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Jul 25, 2022
1 parent 6bf4e22 commit 4fede8a
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion src/CheckUpdate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void CheckUpdate() {
return;
tagname = buff.substr(0, p);
}
if (tagname == U8_VERSION_STRING_FOR_TAG_CHECK) {
if(tagname == U8_VERSION_STRING_FOR_TAG_CHECK) {
return;
}
if(MessageBox(NULL, LoadStringFromResource(IDS_NEW_VERSION_AVAILABLE).c_str(), L"Tama", MB_YESNO) == IDYES)
Expand Down
2 changes: 1 addition & 1 deletion src/GhostStuff.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void reload_shiori_of_baseware();
void unload_shiori_of_baseware();

std::wstring get_shiori_path(std::wstring ghost_path);
void UpdateGhostModulestate();
void UpdateGhostModulestate();

bool ExecLoad(void);
void ExecRequest(const wchar_t* str);
Expand Down
62 changes: 31 additions & 31 deletions src/Parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,37 @@ void SetParameter(POINT &wp, SIZE &ws) {
// 各種パラメータ設定

// 初期値
fontshape[F_DEFAULT].pt = 9;
fontshape[F_DEFAULT].col = 0x0;
fontshape[F_DEFAULT].bold = 0;
fontshape[F_DEFAULT].italic = 0;
fontshape[F_FATAL].pt = 9;
fontshape[F_FATAL].col = 0x0000ff;
fontshape[F_FATAL].bold = 1;
fontshape[F_FATAL].italic = 1;
fontshape[F_ERROR].pt = 9;
fontshape[F_ERROR].col = 0x0000ff;
fontshape[F_ERROR].bold = 0;
fontshape[F_ERROR].italic = 0;
fontshape[F_WARNING].pt = 9;
fontshape[F_WARNING].col = 0x0080ff;
fontshape[F_WARNING].bold = 0;
fontshape[F_WARNING].italic = 0;
fontshape[F_NOTE].pt = 9;
fontshape[F_NOTE].col = 0x008000;
fontshape[F_NOTE].bold = 0;
fontshape[F_NOTE].italic = 0;
bkcol = 0xffffff;
bdcol = 0xffffff;
dlgcol = 0xffffff;
fontcharset = DEFAULT_CHARSET;
receive = 1;
AlertOnWarning = 1;
fontshape[F_DEFAULT].pt = 9;
fontshape[F_DEFAULT].col = 0x0;
fontshape[F_DEFAULT].bold = 0;
fontshape[F_DEFAULT].italic = 0;
fontshape[F_FATAL].pt = 9;
fontshape[F_FATAL].col = 0x0000ff;
fontshape[F_FATAL].bold = 1;
fontshape[F_FATAL].italic = 1;
fontshape[F_ERROR].pt = 9;
fontshape[F_ERROR].col = 0x0000ff;
fontshape[F_ERROR].bold = 0;
fontshape[F_ERROR].italic = 0;
fontshape[F_WARNING].pt = 9;
fontshape[F_WARNING].col = 0x0080ff;
fontshape[F_WARNING].bold = 0;
fontshape[F_WARNING].italic = 0;
fontshape[F_NOTE].pt = 9;
fontshape[F_NOTE].col = 0x008000;
fontshape[F_NOTE].bold = 0;
fontshape[F_NOTE].italic = 0;
bkcol = 0xffffff;
bdcol = 0xffffff;
dlgcol = 0xffffff;
fontcharset = DEFAULT_CHARSET;
receive = 1;
AlertOnWarning = 1;
disable_auto_transfer_shiori_ownership = 0;
wp.x = -1024;
wp.y = -1024;
ws.cx = 0;
ws.cy = 0;
wp.x = -1024;
wp.y = -1024;
ws.cx = 0;
ws.cy = 0;
// フォント列挙
LOGFONT logFont;
ZeroMemory(&logFont, sizeof(logFont));
Expand Down Expand Up @@ -231,7 +231,7 @@ bool SetParameter(const wstring s0, const wstring s1, POINT &wp, SIZE &ws) {
else if(s0 == L"alert.onwarning")
AlertOnWarning = (_wtoi(s1.c_str())) ? 1 : 0;
// disable_auto_transfer_shiori_ownership
else if(s0 == L"shiori_ownership.auto_transfer.disable")
else if(s0 == L"shiori_ownership.auto_transfer.disable")
disable_auto_transfer_shiori_ownership = (_wtoi(s1.c_str())) ? 1 : 0;
// face
else if(s0 == L"face")
Expand Down
6 changes: 3 additions & 3 deletions src/ToolFunctions.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <string>
using namespace std;

int HexStrToInt(const wchar_t *str);
void CutSpace(wstring &str);
bool Split(wstring &str, wstring &s0, wstring &s1, const wstring sepstr);
int HexStrToInt(const wchar_t *str);
void CutSpace(wstring &str);
bool Split(wstring &str, wstring &s0, wstring &s1, const wstring sepstr);
wchar_t *setlocaleauto(int category);
78 changes: 39 additions & 39 deletions src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,46 @@

#include "windows.h"

#define IDC_MYICON 2
#define IDD_DRAGFILES_DIALOG 102
#define IDS_APP_TITLE 103
#define IDS_ERROR_NONE_GHOST 104
#define IDS_ERROR_TITLE 105
#define IDS_ERROR_GHOST_NOT_FOUND_P1 106
#define IDS_ERROR_GHOST_NOT_FOUND_P2 107
#define IDS_EVENT_DEF_REMINDER 108
#define IDS_ERROR_NULL_GHOST_HWND 109
#define IDS_GHOST_SELECT_START_WITH_OUT_GHOST 110
#define IDS_ERROR_LOST_GHOST_LINK 111
#define IDS_ERROR_GHOST_ALREADY_HAS_TAMA 112
#define IDS_ERROR_DRAGGING_FILE_IS_NOT_ALLOWED 113
#define IDS_NEW_VERSION_AVAILABLE 114
#define IDS_ERROR_UNEXPECTED_EXCEPTION 115
#define IDS_TARGET_GHOST_SHIORI_UNLOADED 116
#define IDM_EXIT 105
#define IDI_DRAGFILES 107
#define IDI_SMALL 108
#define IDR_MAINFRAME 128
#define IDD_GHOST_SELECT 134
#define IDD_SEND_REQUEST 136
#define IDC_EDIT 1000
#define IDC_SEND 1001
#define IDC_SEND_REQUEST_RICHEDIT 1002
#define IDC_GHOST_SELECT_LIST 1003
#define ID_TAMA_EXIT 32771
#define ID_TAMA_RELOAD 32772
#define ID_TAMA_VERSION 32773
#define ID_TAMA_COPY 32774
#define ID_TAMA_TOP 32775
#define ID_TAMA_UNLOAD 32776
#define ID_TAMA_JUMPTOP 32777
#define ID_TAMA_REQUEST 32778
#define ID_TAMA_JUMPBOTTOM 32779
#define ID_TAMA_RECEIVE 32780
#define ID_TAMA_ALERTONWARNING 32781
#define IDC_MYICON 2
#define IDD_DRAGFILES_DIALOG 102
#define IDS_APP_TITLE 103
#define IDS_ERROR_NONE_GHOST 104
#define IDS_ERROR_TITLE 105
#define IDS_ERROR_GHOST_NOT_FOUND_P1 106
#define IDS_ERROR_GHOST_NOT_FOUND_P2 107
#define IDS_EVENT_DEF_REMINDER 108
#define IDS_ERROR_NULL_GHOST_HWND 109
#define IDS_GHOST_SELECT_START_WITH_OUT_GHOST 110
#define IDS_ERROR_LOST_GHOST_LINK 111
#define IDS_ERROR_GHOST_ALREADY_HAS_TAMA 112
#define IDS_ERROR_DRAGGING_FILE_IS_NOT_ALLOWED 113
#define IDS_NEW_VERSION_AVAILABLE 114
#define IDS_ERROR_UNEXPECTED_EXCEPTION 115
#define IDS_TARGET_GHOST_SHIORI_UNLOADED 116
#define IDM_EXIT 105
#define IDI_DRAGFILES 107
#define IDI_SMALL 108
#define IDR_MAINFRAME 128
#define IDD_GHOST_SELECT 134
#define IDD_SEND_REQUEST 136
#define IDC_EDIT 1000
#define IDC_SEND 1001
#define IDC_SEND_REQUEST_RICHEDIT 1002
#define IDC_GHOST_SELECT_LIST 1003
#define ID_TAMA_EXIT 32771
#define ID_TAMA_RELOAD 32772
#define ID_TAMA_VERSION 32773
#define ID_TAMA_COPY 32774
#define ID_TAMA_TOP 32775
#define ID_TAMA_UNLOAD 32776
#define ID_TAMA_JUMPTOP 32777
#define ID_TAMA_REQUEST 32778
#define ID_TAMA_JUMPBOTTOM 32779
#define ID_TAMA_RECEIVE 32780
#define ID_TAMA_ALERTONWARNING 32781
#define ID_TAMA_DISABLE_AUTO_TRANSFER_SHIORI_OWNERSHIP 32782
#define IDT_CHOST_STATUS_WATCHER 13
#define IDC_STATIC -1
#define IDT_CHOST_STATUS_WATCHER 13
#define IDC_STATIC -1

// Next default values for new objects
//
Expand Down
18 changes: 9 additions & 9 deletions src/tama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void ArgsHandling() {

if(argc)
selfpath = argv[0];

if(argc != 1) {
size_t i = 1;
while(i < argc) {
Expand Down Expand Up @@ -79,7 +79,7 @@ int APIENTRY WinMain(

//new thread for CheckUpdate, using windows api
auto checkupdate_thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)CheckUpdate, NULL, 0, NULL);

GhostSelection(hInstance);
if(!ghost_uid.empty())
shiorimode = load_by_baseware;
Expand Down Expand Up @@ -136,7 +136,7 @@ int APIENTRY WinMain(
}
if(tamamode == specified_ghost && shioristaus == running)
On_tamaExit(hWnd, ghost_path);

if(hMutex != NULL)
::CloseHandle(hMutex);

Expand Down Expand Up @@ -311,7 +311,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
MoveWindow(hWnd, wpos.x, wpos.y, wsz.cx, wsz.cy, TRUE);
else
SendMessage(hWnd, WM_SIZE, wsz.cx, wsz.cy);

// リッチエディットコントロール作成
hRtLib = LoadLibrary(L"RICHED32.DLL");
hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, L"RICHEDIT", L"",
Expand All @@ -334,7 +334,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
// 更新
wstring logbuf;
logbuf.resize(cds->cbData);
wcscpy_s(logbuf.data(), (size_t)cds->cbData, (wchar_t*)cds->lpData);
wcscpy_s(logbuf.data(), (size_t)cds->cbData, (wchar_t *)cds->lpData);

static OSVERSIONINFO osi = {sizeof(osi)};
static bool osiiniter = GetVersionEx(&osi);
Expand Down Expand Up @@ -370,7 +370,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
case F_WARNING:
boxtitle = L"ghost warning";
icontype = MB_ICONWARNING;
icontype = MB_ICONWARNING;
break;
default:
boxtitle = NULL;
Expand Down Expand Up @@ -486,7 +486,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
AlertOnWarning ^= 1;
break;
case ID_TAMA_DISABLE_AUTO_TRANSFER_SHIORI_OWNERSHIP:
disable_auto_transfer_shiori_ownership ^= 1;
disable_auto_transfer_shiori_ownership ^= 1;
break;
case ID_TAMA_RECEIVE:
receive ^= 1;
Expand All @@ -509,7 +509,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if(shioristaus != critical) {
auto info = linker.NOTYFY({{L"Event", L"tama.ShioriReloadRequest"}});
switch(info.get_code()) {
case -1: //ssp exit
case -1: //ssp exit
[[fallthrough]];
case 404: //Not Found
LostGhostLink();
Expand Down Expand Up @@ -541,7 +541,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if(shioristaus != critical) {
auto info = linker.NOTYFY({{L"Event", L"tama.ShioriUnloadRequest"}});
switch(info.get_code()) {
case -1: //ssp exit
case -1: //ssp exit
[[fallthrough]];
case 404: //Not Found
LostGhostLink();
Expand Down

0 comments on commit 4fede8a

Please sign in to comment.