forked from enlightenment/efl
Updated Evil VS project, added test project.
SVN revision: 36583
This commit is contained in:
parent
1571e802d8
commit
8ec181c8bc
|
@ -1,7 +1,7 @@
|
|||
@echo off
|
||||
|
||||
rem Set external libraries directory.
|
||||
set EXT_DIR=%cd%\..\..\..\..\extern
|
||||
set EXT_DIR=%cd%\..\..\..\..\..\extern
|
||||
|
||||
if not exist %EXT_DIR% (
|
||||
set EXT_DIR=
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="libevil"
|
||||
ProjectGUID="{689B4F2B-666D-439F-9BF3-1203D813DE3F}"
|
||||
RootNamespace="libevil"
|
||||
|
@ -41,7 +41,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(INCLUDE)"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;EFL_EVIL_BUILD;DLL_EXPORT;snprintf=_snprintf_c;__CRT_INLINE=__inline;inline=__inline"
|
||||
PreprocessorDefinitions="HAVE_ERRNO_H;SECURITY_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;EFL_EVIL_BUILD;DLL_EXPORT;snprintf=_snprintf_c;__CRT_INLINE=__inline;inline=__inline"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -64,7 +64,7 @@
|
|||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="false"
|
||||
LinkLibraryDependencies="true"
|
||||
AdditionalDependencies="wsock32.lib"
|
||||
AdditionalDependencies="wsock32.lib Secur32.lib"
|
||||
OutputFile="$(OutDir)\libevil.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="$(LIB); $(DebugLibraryDirectory)"
|
||||
|
@ -123,7 +123,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(INCLUDE)"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;EFL_EVIL_BUILD;DLL_EXPORT;snprintf=_snprintf_c;__CRT_INLINE=__inline;inline=__inline"
|
||||
PreprocessorDefinitions="HAVE_ERRNO_H;SECURITY_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;EFL_EVIL_BUILD;DLL_EXPORT;snprintf=_snprintf_c;__CRT_INLINE=__inline;inline=__inline"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
|
@ -144,7 +144,7 @@
|
|||
Name="VCLinkerTool"
|
||||
IgnoreImportLibrary="false"
|
||||
LinkLibraryDependencies="true"
|
||||
AdditionalDependencies="wsock32.lib"
|
||||
AdditionalDependencies="wsock32.lib Secur32.lib"
|
||||
OutputFile="$(OutDir)\libevil.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="$(LIB); $(ReleaseLibraryDirectory)"
|
||||
|
@ -192,6 +192,14 @@
|
|||
RelativePath="..\..\src\lib\evil.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\lib\evil_fnmatch.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\lib\evil_fnmatch_list_of_states.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\lib\evil_mman.c"
|
||||
>
|
||||
|
@ -222,6 +230,14 @@
|
|||
RelativePath="..\..\src\lib\Evil.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\lib\evil_fnmatch_private.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\lib\fnmatch.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="pwd"
|
||||
>
|
||||
|
@ -248,22 +264,6 @@
|
|||
RelativePath="..\common\dirent.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\fnmatch.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\fnmatch.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\fnmatch_list_of_states.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\common\fnmatch_private.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="sys"
|
||||
>
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
@echo off
|
||||
|
||||
set Target=%cd%
|
||||
set e17=%cd%\..\..\..\..\..\..
|
||||
set Libs=%e17%\libs
|
||||
set Proto=%e17%\proto
|
||||
set Extern=%e17%\..\extern
|
||||
|
||||
|
||||
rem Copy proto
|
||||
cd %Proto%\evil\win32\vs8\out
|
||||
xcopy libdl.dll %Target%\ /Q /Y
|
||||
if exist libdl.pdb xcopy libdl.pdb %Target%\ /Q /Y
|
||||
xcopy libevil.dll %Target%\ /Q /Y
|
||||
if exist libevil.pdb xcopy libevil.pdb %Target%\ /Q /Y
|
|
@ -0,0 +1,35 @@
|
|||
@echo off
|
||||
rem Warning: environment is set for Win32 platform.
|
||||
|
||||
set PROJECT_TYPE=vs8
|
||||
|
||||
pushd ..\..
|
||||
call set_env.bat
|
||||
popd
|
||||
|
||||
if "%EXT_DIR%" == "" goto END
|
||||
|
||||
rem Setup common Win32 environment variables
|
||||
|
||||
set SolutionDirectory=%cd%
|
||||
set DebugOutputDirectory=%SolutionDirectory%\out
|
||||
set ReleaseOutputDirectory=%SolutionDirectory%\out
|
||||
set DebugLibraryDirectory=%SolutionDirectory%\out
|
||||
set ReleaseLibraryDirectory=%SolutionDirectory%\out
|
||||
set TemporaryDirectory=%SolutionDirectory%\temp
|
||||
|
||||
rem Check for basic requirements
|
||||
if "%VS80COMNTOOLS%" == "" (
|
||||
echo ERROR: Microsoft Visual Studio 2005 is not installed.
|
||||
pause
|
||||
goto END
|
||||
)
|
||||
|
||||
rem Setting environment for using Microsoft Visual Studio 2005 x86 tools.
|
||||
call "%VS80COMNTOOLS%vsvars32.bat"
|
||||
|
||||
set LIB=%SolutionDirectory%\..\out;%LIB%
|
||||
|
||||
test.sln
|
||||
|
||||
:END
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{5C640EA7-6E65-46FF-A1FE-EB0955B0CC5A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5C640EA7-6E65-46FF-A1FE-EB0955B0CC5A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{5C640EA7-6E65-46FF-A1FE-EB0955B0CC5A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{5C640EA7-6E65-46FF-A1FE-EB0955B0CC5A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{5C640EA7-6E65-46FF-A1FE-EB0955B0CC5A}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,205 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="test"
|
||||
ProjectGUID="{5C640EA7-6E65-46FF-A1FE-EB0955B0CC5A}"
|
||||
RootNamespace="test"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(DebugOutputDirectory)"
|
||||
IntermediateDirectory="$(TemporaryDirectory)\$(TargetName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="$(INCLUDE)"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_EVIL;__CRT_INLINE=__inline;snprintf=_snprintf_c;PACKAGE_DATA_DIR=;HAVE_EVAS_DIRECT3D;HAVE_EVAS_SOFTWARE_DDRAW;_USE_MATH_DEFINES"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libevil.lib libdl.lib"
|
||||
OutputFile="$(OutDir)\test.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="$(LIB); $(DebugLibraryDirectory)"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(ReleaseOutputDirectory)"
|
||||
IntermediateDirectory="$(TemporaryDirectory)\$(TargetName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="$(INCLUDE)"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_EVIL;__CRT_INLINE=__inline;snprintf=_snprintf_c;PACKAGE_DATA_DIR=;HAVE_EVAS_DIRECT3D;HAVE_EVAS_SOFTWARE_DDRAW;_USE_MATH_DEFINES"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libevil.lib libdl.lib"
|
||||
OutputFile="$(OutDir)\test.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="$(LIB); $(ReleaseLibraryDirectory)"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\test_fnmatch.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -0,0 +1,85 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <Evil.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
const char *translate_return_value(int ret)
|
||||
{
|
||||
static char buf[256] = "";
|
||||
switch (ret)
|
||||
{
|
||||
case 0:
|
||||
strcpy(buf, "Match");
|
||||
break;
|
||||
case FNM_NOMATCH:
|
||||
strcpy(buf, "NoMatch");
|
||||
break;
|
||||
case FNM_SYNTAXERR:
|
||||
strcpy(buf, "SyntaxErr");
|
||||
break;
|
||||
case FNM_NOMEM:
|
||||
strcpy(buf, "NoMem");
|
||||
break;
|
||||
default:
|
||||
sprintf(buf, "%d", ret);
|
||||
break;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
#define TEST_CASE(a) printf(#a " = %s\n", translate_return_value(a));
|
||||
|
||||
int main()
|
||||
{
|
||||
TEST_CASE(fnmatch("", "", 0));
|
||||
TEST_CASE(fnmatch("a", "a", 0));
|
||||
TEST_CASE(fnmatch("a", "b", 0));
|
||||
TEST_CASE(fnmatch("a", "ba", 0));
|
||||
TEST_CASE(fnmatch("a", "ab", 0));
|
||||
TEST_CASE(fnmatch("a", "ba", 0));
|
||||
TEST_CASE(fnmatch("a", "b a", 0));
|
||||
TEST_CASE(fnmatch("a", "aa", 0));
|
||||
TEST_CASE(fnmatch("ab", "ab", 0));
|
||||
TEST_CASE(fnmatch("ab", "ab ", 0));
|
||||
TEST_CASE(fnmatch("ab", " ab", 0));
|
||||
TEST_CASE(fnmatch("ab", "abc", 0));
|
||||
TEST_CASE(fnmatch("ab", "ab c", 0));
|
||||
TEST_CASE(fnmatch("ab", "ba", 0));
|
||||
|
||||
TEST_CASE(fnmatch("a*", "a", 0));
|
||||
TEST_CASE(fnmatch("a*", "b", 0));
|
||||
TEST_CASE(fnmatch("a*", "ab", 0));
|
||||
TEST_CASE(fnmatch("a*", "ba", 0));
|
||||
TEST_CASE(fnmatch("a*", "aba", 0));
|
||||
|
||||
TEST_CASE(fnmatch("a?", "a", 0));
|
||||
TEST_CASE(fnmatch("a?", "b", 0));
|
||||
TEST_CASE(fnmatch("a?", "ab", 0));
|
||||
TEST_CASE(fnmatch("a?", "ba", 0));
|
||||
TEST_CASE(fnmatch("a?", "aa", 0));
|
||||
TEST_CASE(fnmatch("a?", "aba", 0));
|
||||
TEST_CASE(fnmatch("a?", "a a", 0));
|
||||
|
||||
TEST_CASE(fnmatch("*.*", "a", 0));
|
||||
TEST_CASE(fnmatch("*.*", "a.", 0));
|
||||
TEST_CASE(fnmatch("*.*", ".", 0));
|
||||
TEST_CASE(fnmatch("*.*", ".a", 0));
|
||||
TEST_CASE(fnmatch("*.*", " . ", 0));
|
||||
TEST_CASE(fnmatch("*.*", "aa.aa", 0));
|
||||
|
||||
TEST_CASE(fnmatch("*", "", 0));
|
||||
TEST_CASE(fnmatch("*", "a", 0));
|
||||
|
||||
TEST_CASE(fnmatch("*?", "", 0));
|
||||
TEST_CASE(fnmatch("*?", "a", 0));
|
||||
|
||||
TEST_CASE(fnmatch("*abc*", "aabbccabcaa", 0));
|
||||
|
||||
TEST_CASE(fnmatch("\\", "", 0));
|
||||
}
|
Loading…
Reference in New Issue