Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyneu committed Aug 21, 2018
1 parent fab8a3b commit 409c009
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
14 changes: 7 additions & 7 deletions tool3/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ CButton *cmdos;
CStatic *b7;
ITaskbarList3 *bhr;
HANDLE cl;
bool stopflag;

DWORD CALLBACK E(DWORD_PTR dw, LPBYTE pb, LONG cb, LONG *pcb)
{
Expand Down Expand Up @@ -121,10 +120,11 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
t=NULL;
}

braze.insert(std::map< state , std::wstring>::value_type( q_quit, L"q_quit"));
braze.insert(std::map< state , std::wstring>::value_type( q_gundrop, L"q_gundrop"));
braze.insert(std::map< state , std::wstring>::value_type( q_synced, L"q_synced"));
braze.insert(std::map< state , std::wstring>::value_type( q_stay, L"q_stay"));
braze.insert(std::map< state , std::wstring>::value_type( q_quit, L"quit"));
braze.insert(std::map< state , std::wstring>::value_type( q_gundrop, L"gundrop"));
braze.insert(std::map< state , std::wstring>::value_type( q_stay, L"stay"));
braze.insert(std::map< state , std::wstring>::value_type( q_stop, L"q_stop"));
braze.insert(std::map< state , std::wstring>::value_type( q_torque, L"torque"));


bh->Create(L"start",BS_BITMAP|WS_CHILD|WS_VISIBLE|c,CRect(50,50,170,100),this,2133);
Expand Down Expand Up @@ -199,7 +199,7 @@ void CMainFrame::tr() // bh->Create(L"start",BS_BITMAP|WS_CHILD|WS_VISIBLE|c,CR

void CMainFrame::w() // q->Create(L"stop",BS_BITMAP|WS_CHILD|WS_VISIBLE|WS_DISABLED,CRect(50+170,50,170+170,100),this,233);
{
stopflag = 1;
bren = bren == q_quit ? bren : q_stop;
char k[100];
strcpy(k,"exit\n");
DWORD numberofbyteswritten;
Expand Down Expand Up @@ -307,8 +307,8 @@ DWORD c;
CWnd::OnClose();
break;
default:
if (*braze[bren].crbegin() != L'q') { bren = q_quit; this->w(); }
bren = q_quit;
if (!stopflag) this->w();
break;
}

Expand Down
5 changes: 1 addition & 4 deletions tool3/mainthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ extern ITaskbarList3 *bhr;
extern HANDLE cl;
extern HANDLE stdinRd, stdinWr, stdoutRd, stdoutWr;
extern state bren;
extern bool stopflag;
extern int cr,f,terminator;
extern std::map< state , std::wstring> braze;
extern PROCESS_INFORMATION pi;
VOID c(VOID *)
Expand Down Expand Up @@ -131,7 +129,7 @@ VOID c(VOID *)
}
SendMessage(hc, EM_SETTEXTEX, (WPARAM)&fw, (LPARAM)(LPCSTR)bear);
PostMessage(hc, WM_VSCROLL, SB_BOTTOM, 0);
if (stopflag && (output_cmd[h - 3] == 'd' || output_cmd[h - 3] == '.')) { WriteFile(stdinWr, k, 1, &numberofbyteswritten, NULL); ferrum = 1; tm = 700; }
if (*braze[bren].crbegin() == L'q' && (output_cmd[h - 3] == 'd' || output_cmd[h - 3] == '.')) { WriteFile(stdinWr, k, 1, &numberofbyteswritten, NULL); ferrum = 1; tm = 700; }
// you'll never know. https://monero.stackexchange.com/questions/6161/exit-command-pushed-to-pipelined-monerod

if (ferrum && output_cmd[h - 3] == 'y')
Expand Down Expand Up @@ -163,7 +161,6 @@ VOID c(VOID *)
}
_aligned_free(z.c);
_aligned_free(z.p);
stopflag = false;
break; //'Both break and continue have no effect on an if-statement. A common misconception is
//that break can be used to jump out of an if compound statement.' An Introduction to the C Programming Language and Software Design. Tim Bailey 2005
}
Expand Down
1 change: 1 addition & 0 deletions tool3/tool3.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ enum state
q_quit,
q_synced,
q_gundrop,
q_stop,
q_stay,
q_torque
};
Expand Down
Binary file modified x64/Release/tool3.exe
Binary file not shown.

0 comments on commit 409c009

Please sign in to comment.