Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyneu committed Oct 21, 2017
1 parent b8d632a commit 0873f1e
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 20 deletions.
Binary file modified Release/tool3.exe
Binary file not shown.
6 changes: 6 additions & 0 deletions tool3.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}.Debug|Win32.ActiveCfg = Debug|Win32
{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}.Debug|Win32.Build.0 = Debug|Win32
{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}.Debug|x64.ActiveCfg = Debug|x64
{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}.Debug|x64.Build.0 = Debug|x64
{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}.Release|Win32.ActiveCfg = Release|Win32
{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}.Release|Win32.Build.0 = Release|Win32
{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}.Release|x64.ActiveCfg = Release|x64
{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Binary file modified tool3.suo
Binary file not shown.
34 changes: 18 additions & 16 deletions tool3/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
wq[1].LoadBitmapW(IDB_BITMAP4);
wchar_t w[140];
ExpandEnvironmentStrings(L"%USERPROFILE%\\Documents\\fold.",w,140);
FILE *xf=_wfopen(w,L"r+");
FILE *xf;
_wfopen_s(&xf,w,L"r+");
DWORD c = 0L;
if(xf)
{
Expand All @@ -118,15 +119,15 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
}
else
{
wcscpy_s(remmi,L"--block-sync-size 498 --db-sync-mode fastest:sync:8750");
wcscpy_s(remmi,L"--block-sync-size 4 --db-sync-mode fastest:sync:8750");
fwprintf(xf,L"\n%s",remmi);
}
fclose(xf);
}
else
{
c=WS_DISABLED;
wcscpy_s(remmi,L"--block-sync-size 498 --db-sync-mode fastest:sync:8750");
wcscpy_s(remmi,L"--block-sync-size 4 --db-sync-mode fastest:sync:8750");
t=NULL;
}

Expand All @@ -142,6 +143,7 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
dc->Create(WS_VISIBLE|WS_CHILD|PBS_SMOOTH,CRect(120,100+130,120+220,100+170),this,21);
t7->Create(WS_VISIBLE|WS_CHILD|PBS_VERTICAL|PBS_SMOOTHREVERSE|PBS_SMOOTH,CRect(10,200,10+19,200+140),this,29);
t7->SetState(PBST_ERROR);
t7->SetRange(0,140);
hc=CreateWindowEx(WS_EX_NOPARENTNOTIFY, MSFTEDIT_CLASS,remmi,
ES_MULTILINE|ES_AUTOVSCROLL|ES_NOOLEDRAGDROP| WS_VISIBLE | WS_CHILD |WS_TABSTOP|WS_VSCROLL,
1, 350, 450, 201,
Expand Down Expand Up @@ -195,7 +197,7 @@ VOID c(VOID *)
CStringA t,bear;
bear.Empty();
SETTEXTEX fw;
fw.flags=0;
fw.flags=4;
fw.codepage=CP_THREAD_ACP;
int monte=0;
char reserve;
Expand All @@ -210,7 +212,14 @@ VOID c(VOID *)
h = min(400000,totalbytesavailable);
output_cmd[h]='\0';
t=output_cmd;
if(monte) bear.SetAt(monte-2,reserve);
if(monte) bear.SetAt(monte-2,reserve);
else
{
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.c.tm_year-=1900;
z.t=_mktime64(&z.c);
}

monte=monte+h;
bear=bear + t;
if(w++ > 13) {bear=bear.Right(monte=min(monte,3504));w=0;}
Expand All @@ -227,17 +236,11 @@ VOID c(VOID *)
tm=2940;
if(z.tb==2)
{

sscanf(t.Left(19),"%d-%d-%d %d:%d:%d", &z.p.tm_year ,&z.p.tm_mon, &z.p.tm_mday , &z.p.tm_hour, &z.p.tm_min ,&z.p.tm_sec);
sscanf_s(t.Left(19),"%d-%d-%d %d:%d:%d", &z.p.tm_year ,&z.p.tm_mon, &z.p.tm_mday , &z.p.tm_hour, &z.p.tm_min ,&z.p.tm_sec);
z.p.tm_year-=1900;
z.b=_mktime64(&z.p);
}
else
{
sscanf(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.c.tm_year-=1900;
z.t=_mktime64(&z.c);
}


t=t.Right(h-c-7);
t.Truncate(h-c-11);
Expand All @@ -249,8 +252,8 @@ VOID c(VOID *)
{
z.block[2]=p[1];
z.q=60.0*((z.block[2] - z.block[1]))/(z.b - z.t);
if(z.tp==0) { z.x= 3.78*z.q; z.tp++; }
t7->SetPos(100*z.q/z.x);
if(z.tp==0) { z.x= 58.0*z.q; z.tp++; }
t7->SetPos(140*z.q/z.x);
}
else z.tb=2;
}
Expand All @@ -276,7 +279,6 @@ VOID c(VOID *)
dc->SetState(PBST_PAUSED);
bhr->SetProgressState(hz,TBPF_PAUSED);
q->EnableWindow(0);
t7->SetPos(0);
WaitForSingleObject(pi.hProcess,INFINITE);
b=0;
bh->EnableWindow();
Expand Down
100 changes: 96 additions & 4 deletions tool3/tool3.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{5AAACF95-B7BD-4C26-B1B4-6B97629C2883}</ProjectGuid>
Expand All @@ -22,29 +30,54 @@
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
Expand All @@ -67,26 +100,50 @@
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</Midl>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<FunctionLevelLinking>false</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<StructMemberAlignment>Default</StructMemberAlignment>
<BufferSecurityCheck>false</BufferSecurityCheck>
<OmitFramePointers>true</OmitFramePointers>
<ErrorReporting>None</ErrorReporting>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
Expand All @@ -99,6 +156,39 @@
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>false</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN64;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<StructMemberAlignment>Default</StructMemberAlignment>
<BufferSecurityCheck>false</BufferSecurityCheck>
<OmitFramePointers>true</OmitFramePointers>
<ErrorReporting>None</ErrorReporting>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>false</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<LinkErrorReporting>NoErrorReport</LinkErrorReporting>
</Link>
<Midl>
<MkTypLibCompatible>false</MkTypLibCompatible>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</Midl>
<ResourceCompile>
<Culture>0x0409</Culture>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
<None Include="res\tool3.ico" />
Expand All @@ -115,7 +205,9 @@
<ClCompile Include="MainFrm.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="tool3.cpp" />
</ItemGroup>
Expand Down
Binary file added x64/Release/tool3.exe
Binary file not shown.

0 comments on commit 0873f1e

Please sign in to comment.