diff --git a/MSVC/.gitignore b/MSVC/.gitignore new file mode 100644 index 0000000..81015b5 --- /dev/null +++ b/MSVC/.gitignore @@ -0,0 +1,4 @@ +Debug +Release +*.iobj +*.ipdb diff --git a/MSVC/greg-vs150.sln b/MSVC/greg-vs150.sln new file mode 100644 index 0000000..a9e4f4d --- /dev/null +++ b/MSVC/greg-vs150.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "greg", "greg-vs150.vcxproj", "{DE253F1D-68B4-4A2B-A6FD-1A7176934DD1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DE253F1D-68B4-4A2B-A6FD-1A7176934DD1}.Debug|x86.ActiveCfg = Debug|Win32 + {DE253F1D-68B4-4A2B-A6FD-1A7176934DD1}.Debug|x86.Build.0 = Debug|Win32 + {DE253F1D-68B4-4A2B-A6FD-1A7176934DD1}.Release|x86.ActiveCfg = Release|Win32 + {DE253F1D-68B4-4A2B-A6FD-1A7176934DD1}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/MSVC/greg-vs150.vcxproj b/MSVC/greg-vs150.vcxproj new file mode 100644 index 0000000..1757f9b --- /dev/null +++ b/MSVC/greg-vs150.vcxproj @@ -0,0 +1,101 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {DE253F1D-68B4-4A2B-A6FD-1A7176934DD1} + Win32Proj + gregvs120 + greg + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + true + $(SolutionDir) + $(ProjectName)d + + + false + $(SolutionDir) + + + + + + Level3 + Disabled + WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + . + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + . + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/greg.c b/greg.c index 49b6f03..87e9782 100644 --- a/greg.c +++ b/greg.c @@ -327,7 +327,7 @@ YY_LOCAL(int) yyAccept(GREG *G, int tp0) } YY_LOCAL(void) yyPush(GREG *G, char *text, int count, yythunk *thunk, YY_XTYPE YY_XVAR) { - size_t off = (G->val - G->vals) + count; + int off = (G->val - G->vals) + count; if (off > G->valslen) { while (G->valslen < off + 1) G->valslen *= 2; diff --git a/greg.h b/greg.h index 89afc43..12d4d1a 100644 --- a/greg.h +++ b/greg.h @@ -23,6 +23,7 @@ #define strdup _strdup #define setmode _setmode #define fileno _fileno +#pragma warning(disable: 4996) // The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name #endif #define GREG_MAJOR 0