From ee9f86004b6b53915990c896681675657cf7e131 Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 10 Oct 2025 02:17:07 +0200 Subject: [PATCH] monorepo --- P0/smt4497-P0/smt4497-P0/smt4497-P0.cpp | 23 +++ P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj | 135 +++++++++++++ .../smt4497-P0/smt4497-P0.vcxproj.filters | 6 + .../smt4497-P0/smt4497-P0.vcxproj.user | 4 + P0/smt4497-P0/smt4497-SolP0.sln | 31 +++ P1/P1.sln | 31 +++ P1/smt4497-P1/smt4497-P1-matrices.cpp | 24 +++ P1/smt4497-P1/smt4497-P1.cpp | 30 +++ P1/smt4497-P1/smt4497-P1.h | 11 ++ P1/smt4497-P1/smt4497-P1.vcxproj | 140 ++++++++++++++ P1/smt4497-P1/smt4497-P1.vcxproj.filters | 33 ++++ P1/smt4497-P1/smt4497-P1.vcxproj.user | 8 + P1/smt4497-P1/smt4497-P1a.cpp | 21 ++ P1/smt4497-P1/smt4497-P1b.cpp | 14 ++ P2/P2.sln | 31 +++ P2/smt4497-P2/Crono.cpp | 66 +++++++ P2/smt4497-P2/Crono.h | 21 ++ P2/smt4497-P2/smt4497-P2-classes.cpp | 11 ++ P2/smt4497-P2/smt4497-P2-struct-union.cpp | 34 ++++ P2/smt4497-P2/smt4497-P2-typedef.cpp | 25 +++ P2/smt4497-P2/smt4497-P2.cpp | 12 ++ P2/smt4497-P2/smt4497-P2.h | 11 ++ P2/smt4497-P2/smt4497-P2.vcxproj | 143 ++++++++++++++ P2/smt4497-P2/smt4497-P2.vcxproj.filters | 42 ++++ P2/smt4497-P2/smt4497-P2.vcxproj.user | 4 + P3/P3.sln | 31 +++ P3/smt4497-P3/smt4497-P3.cpp | 27 +++ P3/smt4497-P3/smt4497-P3.h | 3 + P3/smt4497-P3/smt4497-P3.vcxproj | 152 +++++++++++++++ P3/smt4497-P3/smt4497-P3.vcxproj.filters | 27 +++ P3/smt4497-P3/smt4497-P3.vcxproj.user | 13 ++ P4/P4.sln | 31 +++ P4/smt4497-P4/smt4497-P4.cpp | 180 ++++++++++++++++++ P4/smt4497-P4/smt4497-P4.h | 18 ++ P4/smt4497-P4/smt4497-P4.vcxproj | 154 +++++++++++++++ P4/smt4497-P4/smt4497-P4.vcxproj.filters | 9 + P4/smt4497-P4/smt4497-P4.vcxproj.user | 23 +++ P5/P5.sln | 31 +++ P5/smt4497-P5/smt4497-P5.cpp | 129 +++++++++++++ P5/smt4497-P5/smt4497-P5.vcxproj | 154 +++++++++++++++ P5/smt4497-P5/smt4497-P5.vcxproj.filters | 9 + P5/smt4497-P5/smt4497-P5.vcxproj.user | 19 ++ P5/smt4497-P5/smt4497-p5.h | 14 ++ README.md | 1 + SSRepo/SSRepo.sln | 81 ++++++++ SSRepo/SSRepo/SSRepo.vcxproj | 138 ++++++++++++++ SSRepo/SSRepo/SSRepo.vcxproj.filters | 2 + SSRepo/SSRepo/SSRepo.vcxproj.user | 4 + 48 files changed, 2161 insertions(+) create mode 100644 P0/smt4497-P0/smt4497-P0/smt4497-P0.cpp create mode 100644 P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj create mode 100644 P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj.filters create mode 100644 P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj.user create mode 100644 P0/smt4497-P0/smt4497-SolP0.sln create mode 100644 P1/P1.sln create mode 100644 P1/smt4497-P1/smt4497-P1-matrices.cpp create mode 100644 P1/smt4497-P1/smt4497-P1.cpp create mode 100644 P1/smt4497-P1/smt4497-P1.h create mode 100644 P1/smt4497-P1/smt4497-P1.vcxproj create mode 100644 P1/smt4497-P1/smt4497-P1.vcxproj.filters create mode 100644 P1/smt4497-P1/smt4497-P1.vcxproj.user create mode 100644 P1/smt4497-P1/smt4497-P1a.cpp create mode 100644 P1/smt4497-P1/smt4497-P1b.cpp create mode 100644 P2/P2.sln create mode 100644 P2/smt4497-P2/Crono.cpp create mode 100644 P2/smt4497-P2/Crono.h create mode 100644 P2/smt4497-P2/smt4497-P2-classes.cpp create mode 100644 P2/smt4497-P2/smt4497-P2-struct-union.cpp create mode 100644 P2/smt4497-P2/smt4497-P2-typedef.cpp create mode 100644 P2/smt4497-P2/smt4497-P2.cpp create mode 100644 P2/smt4497-P2/smt4497-P2.h create mode 100644 P2/smt4497-P2/smt4497-P2.vcxproj create mode 100644 P2/smt4497-P2/smt4497-P2.vcxproj.filters create mode 100644 P2/smt4497-P2/smt4497-P2.vcxproj.user create mode 100644 P3/P3.sln create mode 100644 P3/smt4497-P3/smt4497-P3.cpp create mode 100644 P3/smt4497-P3/smt4497-P3.h create mode 100644 P3/smt4497-P3/smt4497-P3.vcxproj create mode 100644 P3/smt4497-P3/smt4497-P3.vcxproj.filters create mode 100644 P3/smt4497-P3/smt4497-P3.vcxproj.user create mode 100644 P4/P4.sln create mode 100644 P4/smt4497-P4/smt4497-P4.cpp create mode 100644 P4/smt4497-P4/smt4497-P4.h create mode 100644 P4/smt4497-P4/smt4497-P4.vcxproj create mode 100644 P4/smt4497-P4/smt4497-P4.vcxproj.filters create mode 100644 P4/smt4497-P4/smt4497-P4.vcxproj.user create mode 100644 P5/P5.sln create mode 100644 P5/smt4497-P5/smt4497-P5.cpp create mode 100644 P5/smt4497-P5/smt4497-P5.vcxproj create mode 100644 P5/smt4497-P5/smt4497-P5.vcxproj.filters create mode 100644 P5/smt4497-P5/smt4497-P5.vcxproj.user create mode 100644 P5/smt4497-P5/smt4497-p5.h create mode 100644 README.md create mode 100644 SSRepo/SSRepo.sln create mode 100644 SSRepo/SSRepo/SSRepo.vcxproj create mode 100644 SSRepo/SSRepo/SSRepo.vcxproj.filters create mode 100644 SSRepo/SSRepo/SSRepo.vcxproj.user diff --git a/P0/smt4497-P0/smt4497-P0/smt4497-P0.cpp b/P0/smt4497-P0/smt4497-P0/smt4497-P0.cpp new file mode 100644 index 0000000..963b377 --- /dev/null +++ b/P0/smt4497-P0/smt4497-P0/smt4497-P0.cpp @@ -0,0 +1,23 @@ +// Uso de _CRT_SECURE_NO_WARNINGS. Ver https://t.ly/aZuv +#define _CRT_SECURE_NO_WARNINGS +#include +#include + +/* Definiciones válidas +* +* void main() +* int main() con return +* int main(int argc, char* argv[]) +* +*/ + +int main(int argc, char* argv[], char* envp[]) +{ + setlocale(LC_ALL, "Spanish"); + + printf("\Hola mundo!\n"); + + printf("\nPor favor, pulse la tecla ENTRAR para terminar ...\n"); + (void)getchar(); + return 0; +} \ No newline at end of file diff --git a/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj b/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj new file mode 100644 index 0000000..c118059 --- /dev/null +++ b/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj @@ -0,0 +1,135 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {77cc3bb4-6597-4cd4-be06-96ad21d43458} + smt4497P0 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj.filters b/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj.filters new file mode 100644 index 0000000..8219e28 --- /dev/null +++ b/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj.filters @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj.user b/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/P0/smt4497-P0/smt4497-P0/smt4497-P0.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/P0/smt4497-P0/smt4497-SolP0.sln b/P0/smt4497-P0/smt4497-SolP0.sln new file mode 100644 index 0000000..45c6d89 --- /dev/null +++ b/P0/smt4497-P0/smt4497-SolP0.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35303.130 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P0", "smt4497-P0\smt4497-P0.vcxproj", "{77CC3BB4-6597-4CD4-BE06-96AD21D43458}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Debug|x64.ActiveCfg = Debug|x64 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Debug|x64.Build.0 = Debug|x64 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Debug|x86.ActiveCfg = Debug|Win32 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Debug|x86.Build.0 = Debug|Win32 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Release|x64.ActiveCfg = Release|x64 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Release|x64.Build.0 = Release|x64 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Release|x86.ActiveCfg = Release|Win32 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {90421DA3-D208-47B9-B342-97D7AC022EFB} + EndGlobalSection +EndGlobal diff --git a/P1/P1.sln b/P1/P1.sln new file mode 100644 index 0000000..6f8d864 --- /dev/null +++ b/P1/P1.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35303.130 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P1", "smt4497-P1\smt4497-P1.vcxproj", "{BE550ACF-1308-4287-B9D9-01ACC6935D03}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Debug|x64.ActiveCfg = Debug|x64 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Debug|x64.Build.0 = Debug|x64 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Debug|x86.ActiveCfg = Debug|Win32 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Debug|x86.Build.0 = Debug|Win32 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Release|x64.ActiveCfg = Release|x64 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Release|x64.Build.0 = Release|x64 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Release|x86.ActiveCfg = Release|Win32 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FB74D9CC-E610-4A76-B2DB-3A3BA54988C8} + EndGlobalSection +EndGlobal diff --git a/P1/smt4497-P1/smt4497-P1-matrices.cpp b/P1/smt4497-P1/smt4497-P1-matrices.cpp new file mode 100644 index 0000000..1c0afd4 --- /dev/null +++ b/P1/smt4497-P1/smt4497-P1-matrices.cpp @@ -0,0 +1,24 @@ +#include "smt4497-P1.h" + +void LeeFabricanteCPU(char fabricante[], int tamfabricante) +{ + + int info[4]; + __cpuid(info, 0); + int* p; + p = (int*) fabricante; + + //usando puntero interpretando como int + p[0] = info[1]; + p[1] = info[3]; + p[2] = info[2]; + + //p[3] = 0; // puede ser un error porque "rellena mas 0's" + + //usando memcpy interpretando como char + //memcpy(&fabricante[0], &info[1], 4); // == &fabricante + //memcpy(&fabricante[4], &info[3], 4); + //memcpy(&fabricante[8], &info[2], 4); + + fabricante[12] = 0; +} diff --git a/P1/smt4497-P1/smt4497-P1.cpp b/P1/smt4497-P1/smt4497-P1.cpp new file mode 100644 index 0000000..cb30c43 --- /dev/null +++ b/P1/smt4497-P1/smt4497-P1.cpp @@ -0,0 +1,30 @@ +#include "smt4497-P1.h" +#define TAM_NOMBRE_FABRICANTE 37 + +/*int main(int argc, char* argv[], char* emvp[]) +{ + setlocale(LC_ALL, "Spanish"); + + char nombreFabricante[TAM_NOMBRE_FABRICANTE]; + LeeFabricanteCPU(nombreFabricante, TAM_NOMBRE_FABRICANTE); + + printf("Fabricante: %s\n", nombreFabricante); + + printf("Por favor pulse la tecla ENTER para terminar ... \n"); + (void)getchar(); + return 0; +}*/ + +int main(int argc, char* argv[], char* emvp[]) +{ + setlocale(LC_ALL, "Spanish"); + + for (int i = 0; i < argc; i++) + { + printf("Arg %d: %s\n", i, argv[i]); + } + + printf("Por favor pulse la tecla ENTER para terminar ... \n"); + (void)getchar(); + return 0; +} \ No newline at end of file diff --git a/P1/smt4497-P1/smt4497-P1.h b/P1/smt4497-P1/smt4497-P1.h new file mode 100644 index 0000000..63d7680 --- /dev/null +++ b/P1/smt4497-P1/smt4497-P1.h @@ -0,0 +1,11 @@ +#pragma once + +#define _CRT_SECURE_NO_WARNINGS +#include +#include +#include +#include +#include + +int esperaPulseTecla(int toutMs); +void LeeFabricanteCPU(char fabricante[], int tamfabricante); \ No newline at end of file diff --git a/P1/smt4497-P1/smt4497-P1.vcxproj b/P1/smt4497-P1/smt4497-P1.vcxproj new file mode 100644 index 0000000..7a27b8e --- /dev/null +++ b/P1/smt4497-P1/smt4497-P1.vcxproj @@ -0,0 +1,140 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {be550acf-1308-4287-b9d9-01acc6935d03} + smt4497P1 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + \ No newline at end of file diff --git a/P1/smt4497-P1/smt4497-P1.vcxproj.filters b/P1/smt4497-P1/smt4497-P1.vcxproj.filters new file mode 100644 index 0000000..d757fb2 --- /dev/null +++ b/P1/smt4497-P1/smt4497-P1.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Archivos de origen + + + Archivos de origen + + + Archivos de origen + + + + + Archivos de encabezado + + + \ No newline at end of file diff --git a/P1/smt4497-P1/smt4497-P1.vcxproj.user b/P1/smt4497-P1/smt4497-P1.vcxproj.user new file mode 100644 index 0000000..57a9012 --- /dev/null +++ b/P1/smt4497-P1/smt4497-P1.vcxproj.user @@ -0,0 +1,8 @@ + + + + + + WindowsLocalDebugger + + \ No newline at end of file diff --git a/P1/smt4497-P1/smt4497-P1a.cpp b/P1/smt4497-P1/smt4497-P1a.cpp new file mode 100644 index 0000000..6ee5b72 --- /dev/null +++ b/P1/smt4497-P1/smt4497-P1a.cpp @@ -0,0 +1,21 @@ +#include "smt4497-P1.h" + +int esperaPulseTecla(int toutMs) +{ + int res = 0; + int antes = GetTickCount(); + int ahora; + + do { + if (_kbhit()) + { + res = _getch(); + break; + } + if (toutMs > 0) + Sleep(1); + ahora = GetTickCount(); + } while (ahora - antes < toutMs); + + return res; +} \ No newline at end of file diff --git a/P1/smt4497-P1/smt4497-P1b.cpp b/P1/smt4497-P1/smt4497-P1b.cpp new file mode 100644 index 0000000..494f7fd --- /dev/null +++ b/P1/smt4497-P1/smt4497-P1b.cpp @@ -0,0 +1,14 @@ +#include "smt4497-P1.h" + +int ej1_8() +{ + printf("Pulsa una tecla para salir \n"); + int contador = 0; + int tecla = 0; + printf("Tam. contador: %d bytes\n", sizeof(contador)); + while (tecla = 0) + { + printf("\r%d ", ++contador); + tecla = esperaPulseTecla(0); + } +} \ No newline at end of file diff --git a/P2/P2.sln b/P2/P2.sln new file mode 100644 index 0000000..a06200b --- /dev/null +++ b/P2/P2.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35303.130 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P2", "smt4497-P2\smt4497-P2.vcxproj", "{F2876C30-95C1-42D2-B434-6CE7CA561024}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Debug|x64.ActiveCfg = Debug|x64 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Debug|x64.Build.0 = Debug|x64 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Debug|x86.ActiveCfg = Debug|Win32 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Debug|x86.Build.0 = Debug|Win32 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Release|x64.ActiveCfg = Release|x64 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Release|x64.Build.0 = Release|x64 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Release|x86.ActiveCfg = Release|Win32 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {46966ECB-4E2E-4549-94F4-D4DA31B33174} + EndGlobalSection +EndGlobal diff --git a/P2/smt4497-P2/Crono.cpp b/P2/smt4497-P2/Crono.cpp new file mode 100644 index 0000000..0c97b5e --- /dev/null +++ b/P2/smt4497-P2/Crono.cpp @@ -0,0 +1,66 @@ +#include "Crono.h" + +// agrupación de clases, funciones y variables globales +namespace ss { + + Crono::Crono() // constructor + { + // Paso 1: Obtiene la frecuencia del timer del PC en tics/segundo usando QueryPerformanceFrequency + if (_ticsPorSegundoDelTimerDelPC < 0) { + // No se ha calculado la frecuencia aún. Se calcula ahora + LARGE_INTEGER frecuencia; + char _cadDbg[TAM_CADENA_DEBUG]; // snprintf almacena en una matriz intermedia y al pasar + // _cadDbg es un puntero a _cadDbg[0] + + if (QueryPerformanceFrequency(&frecuencia)) { + _ticsPorSegundoDelTimerDelPC = frecuencia.QuadPart; + + snprintf(_cadDbg, sizeof(_cadDbg), "La frecuencia del contador del PC es %d Hz\n", + _ticsPorSegundoDelTimerDelPC); + OutputDebugStringA(_cadDbg); + } + else { + OutputDebugStringA("Error al ejecutar QueryPerformanceFrequency en " __FUNCTION__); + } + } + } + + Crono::~Crono() // destructor + { + } + + bool Crono::Inicio() + { + bool res = false; + + if (_ticsPorSegundoDelTimerDelPC > 0) { + // Paso 2: guarda el valor actual del timer del PC en tics usando QueryPerformanceCounter + LARGE_INTEGER ticks; + if (QueryPerformanceCounter(&ticks)) { + _ticsAntes = ticks.QuadPart; + res = true; + } + else { + OutputDebugStringA("Error al ejecutar QueryPerformanceCounter en " __FUNCTION__); + } + } + return res; + } + + double Crono::Lee() + { + double segundos = -1.0; + + // Paso 3: Obtiene el valor actual del timer del PC en tics usando QueryPerformanceCounter + LARGE_INTEGER ticks; + if (QueryPerformanceCounter(&ticks)) { + int64_t ahora = ticks.QuadPart; + segundos = (double)(ahora - _ticsAntes) / _ticsPorSegundoDelTimerDelPC; + } + else { + printf("Error al ejecutar QueryPerformanceCounter en " __FUNCTION__); + } + return segundos; + } + +} \ No newline at end of file diff --git a/P2/smt4497-P2/Crono.h b/P2/smt4497-P2/Crono.h new file mode 100644 index 0000000..4a4dd6c --- /dev/null +++ b/P2/smt4497-P2/Crono.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include +#include +#include + +namespace ss { + class Crono { + + private: // por defecto todo es private + int64_t _ticsAntes = 0; + int64_t _ticsPorSegundoDelTimerDelPC = -1; + static const int TAM_CADENA_DEBUG = 64; + public: + Crono(); + ~Crono(); + bool Inicio(); + double Lee(); + }; +} \ No newline at end of file diff --git a/P2/smt4497-P2/smt4497-P2-classes.cpp b/P2/smt4497-P2/smt4497-P2-classes.cpp new file mode 100644 index 0000000..83fcb12 --- /dev/null +++ b/P2/smt4497-P2/smt4497-P2-classes.cpp @@ -0,0 +1,11 @@ +#include "smt4497-P2.h" + +int p2_classes() +{ + ss::Crono crono; + crono.Inicio(); + Sleep(10000); + double segs = crono.Lee(); + printf("Segundos: %f\n", segs); + return 0; +} \ No newline at end of file diff --git a/P2/smt4497-P2/smt4497-P2-struct-union.cpp b/P2/smt4497-P2/smt4497-P2-struct-union.cpp new file mode 100644 index 0000000..6e85550 --- /dev/null +++ b/P2/smt4497-P2/smt4497-P2-struct-union.cpp @@ -0,0 +1,34 @@ +#include "smt4497-P2.h" + +int p2_struct_union() +{ + setlocale(LC_ALL, "spanish"); + + printf("\nEstructuras | PRÁCTICA 2 | SS\n"); + printf("---------------------------------\n"); + + struct { + int entero; + char car; + } vEstructura = { 256, 1 }; // Define + inicializa la estructura + + union { + int entero; + unsigned char car[4]; + } vUnion = { 256 }; // Define + inicializa la unión + + vUnion.entero = 0x89abcdef; // byte 0: 0xef, byte 1: 0xcd, byte 2: 0xab, byte 3: 0x89 + + printf("vUnion.entero vale 0x%x\n", vUnion.entero); + printf("El valor del byte 2 de vUnion.entero es: 0x%x\n", + // (vUnion.entero & 0x00ff0000) >> 16); también es válido hacer primero la máscara y luego shift + (vUnion.entero >> (8 * 2) & 0xff)); + + printf("El valor del byte 2 de vUnion.entero es: 0x%x\n", + vUnion.car[2]); + + // printf("Estructura: %d Tam: %d\n", vEstructura.entero, sizeof(vEstructura)); + // printf("Union: %d Tam: %d\n", vUnion.entero, sizeof(vUnion)); + + return 0; +} \ No newline at end of file diff --git a/P2/smt4497-P2/smt4497-P2-typedef.cpp b/P2/smt4497-P2/smt4497-P2-typedef.cpp new file mode 100644 index 0000000..7d11f0c --- /dev/null +++ b/P2/smt4497-P2/smt4497-P2-typedef.cpp @@ -0,0 +1,25 @@ +#include "smt4497-P2.h" + +typedef struct { + int entero; + char car; +} tEstructura_t; + +tEstructura_t var1 = { 100, 1 }; +tEstructura_t var2 = { 100, 1 }; + +int p2_typedef() +{ + printf("\nEstructuras Personalizadas | PRÁCTICA 2 | SS\n"); + printf("------------------------------------------------\n"); + + tEstructura_t var3 = { 100, 1 }; + + int comparacion = memcmp(&var1, &var2, sizeof(tEstructura_t)); + printf("resultado de comparar var1 y var2: %d\n", comparacion); + + comparacion = memcmp(&var1, &var3, sizeof(tEstructura_t)); + printf("resultado de comparar var1 y var3: %d\n", comparacion); + + return 0; +} \ No newline at end of file diff --git a/P2/smt4497-P2/smt4497-P2.cpp b/P2/smt4497-P2/smt4497-P2.cpp new file mode 100644 index 0000000..ca4b87f --- /dev/null +++ b/P2/smt4497-P2/smt4497-P2.cpp @@ -0,0 +1,12 @@ +#include "smt4497-P2.h" + +int main(int argc, char* argv[], char* envp[]) +{ + setlocale(LC_ALL, "Spanish"); + + // p2_struct_union(); + // p2_typedef(); + p2_classes(); + + return 0; +} \ No newline at end of file diff --git a/P2/smt4497-P2/smt4497-P2.h b/P2/smt4497-P2/smt4497-P2.h new file mode 100644 index 0000000..31592e6 --- /dev/null +++ b/P2/smt4497-P2/smt4497-P2.h @@ -0,0 +1,11 @@ +#pragma once + +#include +#include +#include +#include "Crono.h" + +int p2_struct_union(); +int p2_typedef(); +int p2_crono(); +int p2_classes(); \ No newline at end of file diff --git a/P2/smt4497-P2/smt4497-P2.vcxproj b/P2/smt4497-P2/smt4497-P2.vcxproj new file mode 100644 index 0000000..6a61013 --- /dev/null +++ b/P2/smt4497-P2/smt4497-P2.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {f2876c30-95c1-42d2-b434-6ce7ca561024} + smt4497P2 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/P2/smt4497-P2/smt4497-P2.vcxproj.filters b/P2/smt4497-P2/smt4497-P2.vcxproj.filters new file mode 100644 index 0000000..2cfdc8b --- /dev/null +++ b/P2/smt4497-P2/smt4497-P2.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Archivos de origen + + + Archivos de origen + + + Archivos de origen + + + Archivos de origen + + + Archivos de origen + + + + + Archivos de encabezado + + + Archivos de encabezado + + + \ No newline at end of file diff --git a/P2/smt4497-P2/smt4497-P2.vcxproj.user b/P2/smt4497-P2/smt4497-P2.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/P2/smt4497-P2/smt4497-P2.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/P3/P3.sln b/P3/P3.sln new file mode 100644 index 0000000..1331788 --- /dev/null +++ b/P3/P3.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35303.130 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P3", "smt4497-P3\smt4497-P3.vcxproj", "{EF4E367F-B23F-4DDC-B32E-2493139B05C2}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Debug|x64.ActiveCfg = Debug|x64 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Debug|x64.Build.0 = Debug|x64 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Debug|x86.ActiveCfg = Debug|Win32 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Debug|x86.Build.0 = Debug|Win32 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Release|x64.ActiveCfg = Release|x64 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Release|x64.Build.0 = Release|x64 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Release|x86.ActiveCfg = Release|Win32 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B77201B5-D64F-4728-842F-CA7B8D01EC82} + EndGlobalSection +EndGlobal diff --git a/P3/smt4497-P3/smt4497-P3.cpp b/P3/smt4497-P3/smt4497-P3.cpp new file mode 100644 index 0000000..d52e859 --- /dev/null +++ b/P3/smt4497-P3/smt4497-P3.cpp @@ -0,0 +1,27 @@ +#include "smt4497-P3.h" +#include + +using namespace ss; + +int main(int argc, char* argv[], char* envp[]) +{ + setlocale(LC_ALL, "Spanish"); + + Dbg dbg(true, true); + + dbg.CheckError(argc < 2, + "Error: Debe indicar el nombre del directorio a procesar\n"); + + DWORD atributos = GetFileAttributesA(argv[1]); + + printf("Mostrando los archivos del directorio:\n%s\n\n", argv[1]); + + dbg.CheckError(atributos == INVALID_FILE_ATTRIBUTES, + "Error: No se ha dado un nombre de directorio correcto:\n(%s)\n"); + dbg.CheckError((atributos & FILE_ATTRIBUTE_DIRECTORY) != 0, + "Error: No es un directorio:\n(%s)\n", argv[1]); + + printf("\nPor favor pulse ENTRAR para terminar...\n"); + (void)getchar(); + return 0; +} \ No newline at end of file diff --git a/P3/smt4497-P3/smt4497-P3.h b/P3/smt4497-P3/smt4497-P3.h new file mode 100644 index 0000000..7ed11c8 --- /dev/null +++ b/P3/smt4497-P3/smt4497-P3.h @@ -0,0 +1,3 @@ +#include +#include +#include \ No newline at end of file diff --git a/P3/smt4497-P3/smt4497-P3.vcxproj b/P3/smt4497-P3/smt4497-P3.vcxproj new file mode 100644 index 0000000..69a17d6 --- /dev/null +++ b/P3/smt4497-P3/smt4497-P3.vcxproj @@ -0,0 +1,152 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {ef4e367f-b23f-4ddc-b32e-2493139b05c2} + smt4497P3 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(AAComm)inc\ + + + $(AAComm)inc\ + + + $(AAComm)inc\ + + + $(AAComm)inc\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + $(AAComm)lib\sslib\x64\SSLib.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + $(AAComm)lib\sslib\x64\SSLib.lib;%(AdditionalDependencies) + + + + + + + + + + + + \ No newline at end of file diff --git a/P3/smt4497-P3/smt4497-P3.vcxproj.filters b/P3/smt4497-P3/smt4497-P3.vcxproj.filters new file mode 100644 index 0000000..36c2476 --- /dev/null +++ b/P3/smt4497-P3/smt4497-P3.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Archivos de origen + + + + + Archivos de encabezado + + + \ No newline at end of file diff --git a/P3/smt4497-P3/smt4497-P3.vcxproj.user b/P3/smt4497-P3/smt4497-P3.vcxproj.user new file mode 100644 index 0000000..c482daa --- /dev/null +++ b/P3/smt4497-P3/smt4497-P3.vcxproj.user @@ -0,0 +1,13 @@ + + + + PATH=$(AAComm)bin\sslib\x64\;PATH +$(LocalDebuggerEnvironment) + WindowsLocalDebugger + + + PATH=$(AAComm)bin\sslib\x64\;PATH +$(LocalDebuggerEnvironment) + WindowsLocalDebugger + + \ No newline at end of file diff --git a/P4/P4.sln b/P4/P4.sln new file mode 100644 index 0000000..663b57b --- /dev/null +++ b/P4/P4.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P4", "smt4497-P4\smt4497-P4.vcxproj", "{26268DC2-B4EF-4EB4-A028-7FCE3264D50D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Debug|x64.ActiveCfg = Debug|x64 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Debug|x64.Build.0 = Debug|x64 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Debug|x86.ActiveCfg = Debug|Win32 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Debug|x86.Build.0 = Debug|Win32 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Release|x64.ActiveCfg = Release|x64 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Release|x64.Build.0 = Release|x64 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Release|x86.ActiveCfg = Release|Win32 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {03E5163E-88C0-4721-A68B-5902660D19FD} + EndGlobalSection +EndGlobal diff --git a/P4/smt4497-P4/smt4497-P4.cpp b/P4/smt4497-P4/smt4497-P4.cpp new file mode 100644 index 0000000..3ed97dc --- /dev/null +++ b/P4/smt4497-P4/smt4497-P4.cpp @@ -0,0 +1,180 @@ +#include "smt4497-P4.h" + +using namespace ss; +using namespace std; + +extern Dbg _dbg(true); +static size_t accSize = 0; + +int main(int argc, char* argv[], char* envp[]) +{ + setlocale(LC_ALL, "spanish"); + + const char* pDir = argv[1]; + int found; + char** pfileList; + static FileSys fs; + + pfileList = fs.ArchivosEnDirectorio(&found, pDir, false); + + _dbg.CheckError(argc < 2, 1, "Error en argumentos\n"); + SearchTextInFile(argv[1], argv[2]); + + printf("\nPor favor, pulse la tecla ENTRAR para terminar...\n"); + (void)getchar(); + return 0; +} + +BOOL ShowFilesInDirectory(int found, char* pName) +{ + BOOL res = FALSE; + CHAR buffer[MAX_PATH]; + + DWORD win32APIResponse = GetFullPathNameA(pName, sizeof(buffer), buffer, NULL); + + if (!_dbg.CheckError(win32APIResponse == 0, "Error al llamar a GetFullPathNameA()")) + { + res = TRUE; + printf("Se han encontrado %d archivos en la carpeta %s\n", found, buffer); + } + + return res; +} + +size_t GetFileSize(char* pfileName) +{ + WIN32_FILE_ATTRIBUTE_DATA info; + BOOL attrs = GetFileAttributesExA(pfileName, GetFileExInfoStandard, &info); + return info.nFileSizeLow + ((int64_t)info.nFileSizeHigh << 32); +} + +VOID PrintFilesInDirectory(char* pfileList[]) +{ + int i = 0; + // prints file list while a null pointer isn't found + while (pfileList[i] != nullptr) + { + CHAR buffer[64]; + PSTR formatted = StrFormatByteSize64A(GetFileSize(pfileList[i]), buffer, sizeof(buffer)); + printf("#%d: %s (%s)\n", i, pfileList[i], formatted); + i++; + } +} + +static size_t BytesInFile(char* listaArchivos[], int nroArchivos) +{ + size_t total = 0; + int i = 0; + WIN32_FILE_ATTRIBUTE_DATA info; + for (i = 0; i < nroArchivos; i++) { + if (_dbg.CheckError(FALSE == + GetFileAttributesExA(listaArchivos[i], GetFileExInfoStandard, &info), + "Error en GetFileAttributesExA para el archivo %s\n", listaArchivos[i])) + continue; // Salta a la siguiente iteración del bucle si hay error + int64_t tam = ((int64_t)info.nFileSizeHigh >> 32) + info.nFileSizeLow; + total += tam; + } + return total; +} + +static size_t BytesInFileThread(char* listaArchivos[], int nroArchivos, size_t* pTotal) +{ + size_t total = 0; + int i = 0; + WIN32_FILE_ATTRIBUTE_DATA info; + for (i = 0; i < nroArchivos; i++) { + if (_dbg.CheckError(FALSE == + GetFileAttributesExA(listaArchivos[i], GetFileExInfoStandard, &info), + "Error en GetFileAttributesExA para el archivo %s\n", listaArchivos[i])) + continue; // Salta a la siguiente iteración del bucle si hay error + int64_t tam = ((int64_t)info.nFileSizeHigh >> 32) + info.nFileSizeLow; + total += tam; + } + *pTotal += total; + return total; +} + +static size_t BytesInFileMultithread(char* path, + unsigned int additionalThreads, bool useLastSearch) +{ + static FileSys fs; + static int found = 0; + static char** pfileList = nullptr; + + if (!useLastSearch) + { + pfileList = fs.ArchivosEnDirectorio(&found, path, false); + if (!ShowFilesInDirectory(found, path)) + { + return 0; + printf("\t\tLa búsqueda de archivos ha tardado %f segs\n", fs.TiempoUltimoMetodo()); + } + } + + _dbg.CronoInicio(); + size_t totalSize = 0; + if (additionalThreads == 0) + { + totalSize = BytesInFile(pfileList, found); + } + else + { + thread* threads = new thread[additionalThreads]; + for (int i = 0; i < additionalThreads; i++) + { + threads[i] = thread(BytesInFileThread, pfileList, found, &totalSize); + _dbg.CheckError(threads[i].native_handle() == NULL, "Error creando hilo %d", i); + } + for (int i = 0; i < additionalThreads; i++) + { + threads[i].join(); + } + delete[] threads; + } + + auto secs = _dbg.CronoLee(); + printf("\tCalculados %lld bytes\n", totalSize); + printf("\t\tCalculado en: %f segs por %s (%d hilos adicionales).\n\n", secs, __FUNCTION__, additionalThreads); + return totalSize; +} + +static int SearchTextInFile(const char* dirBusqueda, const char* textoABuscar) { + Dbg dbg; + FileSys fs; + int ocurrencias, encontrados = 0, nroArchivos, idxMarca = 0; + char** listaArchivos = fs.ArchivosEnDirectorio(&nroArchivos, dirBusqueda, false); + if (dbg.CheckError(listaArchivos == nullptr, "No se han encontrado archivos en la carpeta %s\n", dirBusqueda)) { + return -1; + } + char marcasAvance[] = "-\\|/"; // Para animación simple + size_t bytesTotal, bytesAcumulados = 0; + bytesTotal = BytesInFile(listaArchivos, nroArchivos); + if (dbg.CheckError(bytesTotal == 0, "No se han encontrado archivos en la carpeta %s\n", dirBusqueda)) { + return -1; + } + ShowFilesInDirectory(nroArchivos, (char*)dirBusqueda); + printf("\nBuscando texto \"%s\" en %lld bytes\n", textoABuscar, bytesTotal); + + dbg.CronoInicio(); + for (int i = 0; i < nroArchivos; i++) { + // Busca el texto en el archivo usando un método de FileSys + ocurrencias = fs.BuscaDatoEnArchivo(textoABuscar, strlen(textoABuscar), + listaArchivos[i], &bytesAcumulados, 10000); + if (ocurrencias > 0) { + encontrados++; + dbg.DbgPrint("#%d: %d ocurrencias en %s\n", encontrados, ocurrencias, listaArchivos[i]); + } + else if (ocurrencias < 0) { + dbg.DbgPrint("Error %s\n", listaArchivos[i]); + } + // Muestra el avance del proceso + if (i == nroArchivos - 1) + bytesAcumulados = bytesTotal; // Para que muestre 100% al final, aunque no sea exacto + printf("\r%c %.02f %% %d/%d ", marcasAvance[idxMarca++ % (sizeof(marcasAvance) - 1)], + (double)bytesAcumulados * 100 / bytesTotal, i + 1, nroArchivos); + } + double segs = dbg.CronoLee(); + printf("\nSe han encontrado %d archivos con el texto\n", encontrados, textoABuscar, dirBusqueda); + printf("\t\tCalculado en: %f segs por %s\n", segs, __FUNCTION__); + return encontrados; +} \ No newline at end of file diff --git a/P4/smt4497-P4/smt4497-P4.h b/P4/smt4497-P4/smt4497-P4.h new file mode 100644 index 0000000..9efde55 --- /dev/null +++ b/P4/smt4497-P4/smt4497-P4.h @@ -0,0 +1,18 @@ +#pragma once + +#include +#include +#include +#include + +#include + +#pragma comment(lib, "Shlwapi.lib") // Link against Shlwapi.lib + +static BOOL ShowFilesInDirectory(int found, char* pdirName); +static void PrintFilesInDirectory(char* fileList[]); +static size_t GetFileSize(char* pfileName); +static size_t BytesInFile(char* listaArchivos[], int nroArchivos); +static size_t BytesInFileThread(char* listaArchivos[], int nroArchivos, size_t* pTotal); +static size_t BytesInFileMultithread(char* path, unsigned int additionalThreads, bool useLastSearch); +static int SearchTextInFile(const char* dirBusqueda, const char* textoABuscar); \ No newline at end of file diff --git a/P4/smt4497-P4/smt4497-P4.vcxproj b/P4/smt4497-P4/smt4497-P4.vcxproj new file mode 100644 index 0000000..1dc8f81 --- /dev/null +++ b/P4/smt4497-P4/smt4497-P4.vcxproj @@ -0,0 +1,154 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {26268dc2-b4ef-4eb4-a028-7fce3264d50d} + smt4497P4 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(AAComm)inc;$(VC_IncludePath);$(WindowsSDK_IncludePath); + + + $(AAComm)inc;$(VC_IncludePath);$(WindowsSDK_IncludePath); + + + $(AAComm)inc;$(VC_IncludePath);$(WindowsSDK_IncludePath); + + + $(AAComm)inc;$(VC_IncludePath);$(WindowsSDK_IncludePath); + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + $(AAComm)lib\sslib\x86\SSLib.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + $(AAComm)lib\sslib\x86\SSLib.lib;%(AdditionalDependencies) + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + $(AAComm)lib\sslib\x64\SSLib.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + $(AAComm)lib\sslib\x64\SSLib.lib;%(AdditionalDependencies) + + + + + + + + + + + + \ No newline at end of file diff --git a/P4/smt4497-P4/smt4497-P4.vcxproj.filters b/P4/smt4497-P4/smt4497-P4.vcxproj.filters new file mode 100644 index 0000000..1cf72e3 --- /dev/null +++ b/P4/smt4497-P4/smt4497-P4.vcxproj.filters @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/P4/smt4497-P4/smt4497-P4.vcxproj.user b/P4/smt4497-P4/smt4497-P4.vcxproj.user new file mode 100644 index 0000000..b000778 --- /dev/null +++ b/P4/smt4497-P4/smt4497-P4.vcxproj.user @@ -0,0 +1,23 @@ + + + + PATH=$(AAComm)bin\sslib\$(PlatformTarget);%PATH% + WindowsLocalDebugger + . BuscaTextoEnArchivos + + + PATH=$(AAComm)bin\sslib\$(PlatformTarget);%PATH% + WindowsLocalDebugger + . BuscaTextoEnArchivos + + + PATH=$(AAComm)bin\sslib\$(PlatformTarget);%PATH% + WindowsLocalDebugger + . BuscaTextoEnArchivos + + + PATH=$(AAComm)bin\sslib\$(PlatformTarget);%PATH% + WindowsLocalDebugger + . BuscaTextoEnArchivos + + \ No newline at end of file diff --git a/P5/P5.sln b/P5/P5.sln new file mode 100644 index 0000000..025853c --- /dev/null +++ b/P5/P5.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P5", "smt4497-P5\smt4497-P5.vcxproj", "{B823A30A-0FA2-4E84-99F8-5A5B241871FD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Debug|x64.ActiveCfg = Debug|x64 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Debug|x64.Build.0 = Debug|x64 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Debug|x86.ActiveCfg = Debug|Win32 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Debug|x86.Build.0 = Debug|Win32 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Release|x64.ActiveCfg = Release|x64 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Release|x64.Build.0 = Release|x64 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Release|x86.ActiveCfg = Release|Win32 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A5FD762A-271B-490E-9D8C-A719EDCC3EF4} + EndGlobalSection +EndGlobal diff --git a/P5/smt4497-P5/smt4497-P5.cpp b/P5/smt4497-P5/smt4497-P5.cpp new file mode 100644 index 0000000..e0a77d4 --- /dev/null +++ b/P5/smt4497-P5/smt4497-P5.cpp @@ -0,0 +1,129 @@ +#include "smt4497-p5.h" +#define INCREMENTS (100*1000) +#define THREADS 20 +#define ITERATIONS 100 + +using namespace ss; + +static HANDLE mutex; +static HANDLE* turn_events; +static Dbg _dbg(true); + +int main(int argc, char* argv[], char* envp[]) +{ + setlocale(LC_ALL, "Spanish"); + + /*printf("\nEmpezando sin mutex...\n"); + for (int i = 1; i <= ITERATIONS; i++) + { + test_simple_non_reentrant_thread(INCREMENTS, THREADS); + } + printf("\nEmpezando con mutex...\n"); + for (int i = 1; i <= ITERATIONS; i++) + { + test_simple_non_reentrant_thread_mutex(INCREMENTS, THREADS); + }*/ + + test_thread_turns(THREADS); + + printf("\nPor favor pulse ENTER para terminar..."); + (void)getchar(); + return 0; +} + +VOID simple_non_reentrant_thread(int times, int* pCounter) +{ + for (int i = 0; i < times; i++) + { + *pCounter += times + 1; + *pCounter -= times + 1; + } +} + +static BOOL test_simple_non_reentrant_thread(int increments, int threads_number) +{ + int counter = 0; + _dbg.CronoInicio(); + thread* threads = new thread[threads_number]; + for (int i = 0; i < threads_number; i++) + { + threads[i] = thread(simple_non_reentrant_thread, increments, &counter); + _dbg.CheckError(threads[i].native_handle() == NULL, "No se pudo crear el hilo"); + } + for (int i = 0; i < threads_number; i++) + threads[i].join(); + double secs = _dbg.CronoLee(); + printf("[SIN MUTEX] Contador vale: %d (calculado con %d hilos, en %f segundos)\n", counter, threads_number, secs); + return counter == 0; +} + +VOID simple_non_reentrant_thread_mutex(int times, int* pCounter) +{ + DWORD res = WaitForSingleObject(mutex, INFINITE); // critical section begins + _dbg.CheckError(res != 0, 2, "Error en el bloqueo\n"); + for (int i = 0; i < times; i++) + { + *pCounter += times + 1; + *pCounter -= times + 1; + } + _dbg.CheckError(ReleaseMutex(mutex) == FALSE, 1, "Error liberando mutex\n"); // critical section ends + +} +static BOOL test_simple_non_reentrant_thread_mutex(int increments, int threads_number) +{ + int counter = 0; + _dbg.CronoInicio(); + mutex = CreateMutexA(NULL, FALSE, NULL); + _dbg.CheckError(mutex == NULL, 1, "Error creando el mutex\n"); + thread* threads = new thread[threads_number]; + for (int i = 0; i < threads_number; i++) + { + threads[i] = thread(simple_non_reentrant_thread_mutex, increments, &counter); + _dbg.CheckError(threads[i].native_handle() == NULL, "No se pudo crear el hilo"); + } + for (int i = 0; i < threads_number; i++) + threads[i].join(); + double secs = _dbg.CronoLee(); + printf("[CON MUTEX] Contador vale: %d (calculado con %d hilos, en %f segundos)\n", counter, threads_number, secs); + return counter == 0; +} + +static VOID thread_turns(int thread_number) +{ + WaitForSingleObject(turn_events[thread_number], INFINITE); + for (int i = 0; i < thread_number; i++) + printf(" "); + printf("hilo %i iniciado >>", thread_number); + for (int i = 0; i < thread_number; i++) + printf(" "); + printf("<< hilo %i finalizado\n", thread_number); + SetEvent(turn_events[thread_number + 1]); +} + +static VOID test_thread_turns(int thread_numbers) +{ + turn_events = new HANDLE[thread_numbers + 1]; + for (int i = 0; i <= thread_numbers; i++) + { + turn_events[i] = CreateEventA(NULL, FALSE, FALSE, NULL); + _dbg.CheckError(turn_events[i] == NULL, 1, "Error creando el evento\n"); + } + + thread* threads = new thread[thread_numbers]; + for (int i = 0; i < thread_numbers; i++) + { + threads[i] = thread(thread_turns, i); + _dbg.CheckError(threads[i].native_handle() == NULL, "No se pudo crear el hilo"); + } + + SetEvent(turn_events[0]); + + for (int i = 0; i < thread_numbers; i++) + threads[i].join(); + + for (int i = 0; i <= thread_numbers; i++) + CloseHandle(turn_events[i]); + + delete[] turn_events; + delete[] threads; +} diff --git a/P5/smt4497-P5/smt4497-P5.vcxproj b/P5/smt4497-P5/smt4497-P5.vcxproj new file mode 100644 index 0000000..fdf86ec --- /dev/null +++ b/P5/smt4497-P5/smt4497-P5.vcxproj @@ -0,0 +1,154 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {b823a30a-0fa2-4e84-99f8-5a5b241871fd} + smt4497P5 + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(AAComm)inc + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(AAComm)inc + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(AAComm)inc + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);$(AAComm)inc + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + $(AAComm)lib\sslib\x86\SSLib.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + $(AAComm)lib\sslib\x86\SSLib.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + $(AAComm)lib\sslib\x64\SSLib.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + $(AAComm)lib\sslib\x64\SSLib.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) + + + + + + + + + + + + \ No newline at end of file diff --git a/P5/smt4497-P5/smt4497-P5.vcxproj.filters b/P5/smt4497-P5/smt4497-P5.vcxproj.filters new file mode 100644 index 0000000..89be1ce --- /dev/null +++ b/P5/smt4497-P5/smt4497-P5.vcxproj.filters @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/P5/smt4497-P5/smt4497-P5.vcxproj.user b/P5/smt4497-P5/smt4497-P5.vcxproj.user new file mode 100644 index 0000000..abf43ac --- /dev/null +++ b/P5/smt4497-P5/smt4497-P5.vcxproj.user @@ -0,0 +1,19 @@ + + + + PATH=$(AAComm)bin\sslib\$(PlatformTarget);%PATH%$(LocalDebuggerEnvironment) + WindowsLocalDebugger + + + PATH=$(AAComm)bin\sslib\$(PlatformTarget);%PATH%$(LocalDebuggerEnvironment) + WindowsLocalDebugger + + + PATH=$(AAComm)bin\sslib\$(PlatformTarget);%PATH%$(LocalDebuggerEnvironment) + WindowsLocalDebugger + + + PATH=$(AAComm)bin\sslib\$(PlatformTarget);%PATH%$(LocalDebuggerEnvironment) + WindowsLocalDebugger + + \ No newline at end of file diff --git a/P5/smt4497-P5/smt4497-p5.h b/P5/smt4497-P5/smt4497-p5.h new file mode 100644 index 0000000..0a57b00 --- /dev/null +++ b/P5/smt4497-P5/smt4497-p5.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include +#include +#include +#include + +VOID simple_non_reentrant_thread(int times, int* pCounter); +VOID simple_non_reentrant_thread_mutex(int times, int* pCounter); +static BOOL test_simple_non_reentrant_thread(int increments, int threads_number); +static BOOL test_simple_non_reentrant_thread_mutex(int increments, int threads_number); +static VOID thread_turns(int thread_number); +static VOID test_thread_turns(int thread_numbers); \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3832bd7 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Software de Sistemas. Curso 2024/25. diff --git a/SSRepo/SSRepo.sln b/SSRepo/SSRepo.sln new file mode 100644 index 0000000..3aa688e --- /dev/null +++ b/SSRepo/SSRepo.sln @@ -0,0 +1,81 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P0", "..\P0\smt4497-P0\smt4497-P0\smt4497-P0.vcxproj", "{77CC3BB4-6597-4CD4-BE06-96AD21D43458}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P1", "..\P1\smt4497-P1\smt4497-P1.vcxproj", "{BE550ACF-1308-4287-B9D9-01ACC6935D03}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P2", "..\P2\smt4497-P2\smt4497-P2.vcxproj", "{F2876C30-95C1-42D2-B434-6CE7CA561024}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P3", "..\P3\smt4497-P3\smt4497-P3.vcxproj", "{EF4E367F-B23F-4DDC-B32E-2493139B05C2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P4", "..\P4\smt4497-P4\smt4497-P4.vcxproj", "{26268DC2-B4EF-4EB4-A028-7FCE3264D50D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smt4497-P5", "..\P5\smt4497-P5\smt4497-P5.vcxproj", "{B823A30A-0FA2-4E84-99F8-5A5B241871FD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Debug|x64.ActiveCfg = Debug|x64 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Debug|x64.Build.0 = Debug|x64 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Debug|x86.ActiveCfg = Debug|Win32 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Debug|x86.Build.0 = Debug|Win32 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Release|x64.ActiveCfg = Release|x64 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Release|x64.Build.0 = Release|x64 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Release|x86.ActiveCfg = Release|Win32 + {77CC3BB4-6597-4CD4-BE06-96AD21D43458}.Release|x86.Build.0 = Release|Win32 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Debug|x64.ActiveCfg = Debug|x64 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Debug|x64.Build.0 = Debug|x64 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Debug|x86.ActiveCfg = Debug|Win32 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Debug|x86.Build.0 = Debug|Win32 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Release|x64.ActiveCfg = Release|x64 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Release|x64.Build.0 = Release|x64 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Release|x86.ActiveCfg = Release|Win32 + {BE550ACF-1308-4287-B9D9-01ACC6935D03}.Release|x86.Build.0 = Release|Win32 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Debug|x64.ActiveCfg = Debug|x64 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Debug|x64.Build.0 = Debug|x64 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Debug|x86.ActiveCfg = Debug|Win32 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Debug|x86.Build.0 = Debug|Win32 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Release|x64.ActiveCfg = Release|x64 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Release|x64.Build.0 = Release|x64 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Release|x86.ActiveCfg = Release|Win32 + {F2876C30-95C1-42D2-B434-6CE7CA561024}.Release|x86.Build.0 = Release|Win32 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Debug|x64.ActiveCfg = Debug|x64 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Debug|x64.Build.0 = Debug|x64 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Debug|x86.ActiveCfg = Debug|Win32 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Debug|x86.Build.0 = Debug|Win32 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Release|x64.ActiveCfg = Release|x64 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Release|x64.Build.0 = Release|x64 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Release|x86.ActiveCfg = Release|Win32 + {EF4E367F-B23F-4DDC-B32E-2493139B05C2}.Release|x86.Build.0 = Release|Win32 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Debug|x64.ActiveCfg = Debug|x64 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Debug|x64.Build.0 = Debug|x64 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Debug|x86.ActiveCfg = Debug|Win32 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Debug|x86.Build.0 = Debug|Win32 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Release|x64.ActiveCfg = Release|x64 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Release|x64.Build.0 = Release|x64 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Release|x86.ActiveCfg = Release|Win32 + {26268DC2-B4EF-4EB4-A028-7FCE3264D50D}.Release|x86.Build.0 = Release|Win32 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Debug|x64.ActiveCfg = Debug|x64 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Debug|x64.Build.0 = Debug|x64 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Debug|x86.ActiveCfg = Debug|Win32 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Debug|x86.Build.0 = Debug|Win32 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Release|x64.ActiveCfg = Release|x64 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Release|x64.Build.0 = Release|x64 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Release|x86.ActiveCfg = Release|Win32 + {B823A30A-0FA2-4E84-99F8-5A5B241871FD}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {36DF339F-5BA3-4543-BC69-8F515A45EC97} + EndGlobalSection +EndGlobal diff --git a/SSRepo/SSRepo/SSRepo.vcxproj b/SSRepo/SSRepo/SSRepo.vcxproj new file mode 100644 index 0000000..7fdd7cb --- /dev/null +++ b/SSRepo/SSRepo/SSRepo.vcxproj @@ -0,0 +1,138 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + 17.0 + Win32Proj + {d1f696b6-4f15-430e-b752-73c602d4464d} + SSRepo + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + diff --git a/SSRepo/SSRepo/SSRepo.vcxproj.filters b/SSRepo/SSRepo/SSRepo.vcxproj.filters new file mode 100644 index 0000000..9cd8510 --- /dev/null +++ b/SSRepo/SSRepo/SSRepo.vcxproj.filters @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/SSRepo/SSRepo/SSRepo.vcxproj.user b/SSRepo/SSRepo/SSRepo.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/SSRepo/SSRepo/SSRepo.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file