From 7f3e9442553d118cb06847d2b5519f0bbd0ad5f9 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 31 May 2024 23:12:53 +0300 Subject: [PATCH] v m --- tool3/MainFrm.cpp | 2 +- tool3/mainthread.cpp | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/tool3/MainFrm.cpp b/tool3/MainFrm.cpp index 12462a3..bf413f3 100644 --- a/tool3/MainFrm.cpp +++ b/tool3/MainFrm.cpp @@ -177,7 +177,7 @@ void CMainFrame::tr() // bh->Create(L"start",BS_BITMAP|WS_CHILD|WS_VISIBLE|c,CR SECURITY_ATTRIBUTES sa={sizeof(SECURITY_ATTRIBUTES), NULL, true}; CreatePipe(&stdinRd, &stdinWr, &sa, 10000); - CreatePipe(&stdoutRd,&stdoutWr, &sa,350000); + CreatePipe(&stdoutRd,&stdoutWr, &sa,11500); if(pi.hProcess) CloseHandle(pi.hProcess); STARTUPINFO si = {}; diff --git a/tool3/mainthread.cpp b/tool3/mainthread.cpp index 1f2b34b..fe0a4ae 100644 --- a/tool3/mainthread.cpp +++ b/tool3/mainthread.cpp @@ -27,9 +27,9 @@ VOID c(VOID *) DWORD numberofbyteswritten; DWORD dwRead; DWORD totalbytesavailable; - char output_cmd[350001]; - int h, c, ferrum = 0, tm = 400; - unsigned long long monte = 0; + char output_cmd[11501] = {}; + int h, c, ferrum = 0, tm = 800; + int monte = 0; BYTE w = 0; CStringA t, bear; SETTEXTEX fw = { 4, CP_THREAD_ACP }; @@ -57,15 +57,15 @@ VOID c(VOID *) if (totalbytesavailable) { - ReadFile(stdoutRd, output_cmd, min(350000, totalbytesavailable), &dwRead, NULL); - h = min(350000, totalbytesavailable); + ReadFile(stdoutRd, output_cmd, min(14000, totalbytesavailable), &dwRead, NULL); + h = min(11500, totalbytesavailable); output_cmd[h] = '\0'; t = output_cmd; if (monte) bear.SetAt(monte - 2, reserve); monte = monte + h; bear = bear + t; - if (w++ > 41) { bear = bear.Right(monte = min(monte, 374734)); w = 0; _clearfp(); } + if (w++ > 10) { bear = bear.Right(monte = min(monte, 11734)); w = 0; _clearfp(); } reserve = bear[monte - 2]; bear.SetAt(monte - 2, '\0'); @@ -77,7 +77,7 @@ VOID c(VOID *) memcpy_s(&z2, 40, &z, 40); // q and block[] , if (z.finishup != 1) { - tm = 2340; + tm = 1740; z.finishup = -5 + sscanf_s(t.Left(19), "%d-%d-%d %d:%d:%d", &z.c->tm_year, &z.c->tm_mon, &z.c->tm_mday, &z.c->tm_hour, &z.c->tm_min, &z.c->tm_sec); z.E = min(z.E, z.E - z.finishup); //first Anchor z.c->tm_year -= 1900; @@ -143,7 +143,7 @@ VOID c(VOID *) } } SendMessage(hc, EM_SETTEXTEX, (WPARAM)&fw, (LPARAM)(LPCSTR)bear); - PostMessage(hc, WM_VSCROLL, SB_BOTTOM, 0); +// PostMessage(hc, WM_VSCROLL, SB_BOTTOM, 0); if (braze[bren][0] == 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 @@ -180,7 +180,10 @@ VOID c(VOID *) //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 } } - Sleep(tm); + Sleep(tm/2); + PostMessage(hc, WM_VSCROLL, SB_BOTTOM, 0); + Sleep(tm/2); + } } \ No newline at end of file