summaryrefslogtreecommitdiff
path: root/toolbin
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2020-12-08 11:27:10 -0800
committerMichael Vrhel <michael.vrhel@artifex.com>2020-12-08 11:27:10 -0800
commit733a8f209ecce61f31621ab87d1d1a81f4935602 (patch)
tree1faa8587eac4659f94b1383101b360618bfd2e8c /toolbin
parenta1b4377ffe877fcd3ec2832ca670833cc45adb7a (diff)
downloadghostpdl-733a8f209ecce61f31621ab87d1d1a81f4935602.tar.gz
Bug 70716: ETS code clean up.
Add checking for memory allocation failures, static code analysis findings, and issue mentioned in 701716. Also update windows project to VS2019.
Diffstat (limited to 'toolbin')
-rw-r--r--toolbin/halftone/ETS/test_ets.c97
-rw-r--r--toolbin/halftone/ETS/win32/ETS.sln11
-rw-r--r--toolbin/halftone/ETS/win32/ETS.vcproj196
-rw-r--r--toolbin/halftone/ETS/win32/ETS.vcxproj93
-rw-r--r--toolbin/halftone/ETS/win32/ETS.vcxproj.filters33
5 files changed, 208 insertions, 222 deletions
diff --git a/toolbin/halftone/ETS/test_ets.c b/toolbin/halftone/ETS/test_ets.c
index 617f17948..22d1deaf4 100644
--- a/toolbin/halftone/ETS/test_ets.c
+++ b/toolbin/halftone/ETS/test_ets.c
@@ -222,7 +222,7 @@ static void read_psd_line16(ETS_SrcPixel **ibufs, int xs, FILE *fi, int planes,
{
temp_value1 = ibufs[psd_ctx->permute[kk]][i];
temp_value2 = ((temp_value1 & 0xff) << 8) + ((temp_value1 & 0xff00) >> 8);
- ibufs[psd_ctx->permute[kk]][i] = temp_value2;
+ ibufs[psd_ctx->permute[kk]][i] = (unsigned char) temp_value2;
}
#endif
/* Update where we are in each band */
@@ -310,11 +310,13 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
if (!(depth == 8 || depth == 16))
die("Only 8 or 16 bit PSD files supported");
- if (depth == 16 && (sizeof(ETS_SrcPixel) != 2 || ETS_SRC_MAX != 65535))
+#ifdef CHAR_SOURCE
+ if (depth == 16)
die("ETS_SrcPixel type and ETS_SRC_MAX in ets.h not set for 16 bit support!");
-
- if (depth == 8 && (sizeof(ETS_SrcPixel) != 1 || ETS_SRC_MAX != 255))
+#else
+ if (depth == 8)
die("ETS_SrcPixel type and ETS_SRC_MAX in ets.h not set for 8 bit support!");
+#endif
/* Dont handle duotone or indexed data at this time */
if (color_mode == 2 || color_mode == 8)
@@ -345,7 +347,11 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
fread(buf, 1, 4, fi);
get4(&size, buf);
fwrite(buf, 1, 4, fo);
+
temp_buff = (uchar*) malloc(size);
+ if (temp_buff == NULL)
+ die("Malloc failure in read_psd");
+
fread(temp_buff, 1, size, fi);
fwrite(temp_buff, 1, size, fo);
free(temp_buff);
@@ -355,7 +361,11 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
fread(buf, 1, 4, fi);
get4(&size, buf);
fwrite(buf, 1, 4, fo);
+
temp_buff = (uchar*) malloc(size);
+ if (temp_buff == NULL)
+ die("Malloc failure in read_psd");
+
fread(temp_buff, 1, size, fi);
fwrite(temp_buff, 1, size, fo);
free(temp_buff);
@@ -377,6 +387,8 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
/* Allocate the output buffer */
psd_ctx->output_buffer = malloc(num_channel * height * width * bytes);
+ if (psd_ctx->output_buffer == NULL)
+ die("Malloc failure in read_psd");
if (codec == 1)
{
@@ -384,8 +396,17 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
compressed. First read in the size for each compressed line */
data_size = num_channel * height;
psd_ctx->row_lengths = (int*) malloc(data_size * sizeof(int));
+ if (psd_ctx->row_lengths == NULL)
+ die("Malloc failure in read_psd");
+
psd_ctx->band_file_offset = (long*) malloc(num_channel * sizeof(long));
+ if (psd_ctx->band_file_offset == NULL)
+ die("Malloc failure in read_psd");
+
psd_ctx->band_row_length_index = (int*) malloc(num_channel * sizeof(int));
+ if (psd_ctx->band_row_length_index == NULL)
+ die("Malloc failure in read_psd");
+
count += (2 * data_size); /* This gets us to the start of the image data */
/* Here we compute where in the file we need to go, to get the start of
the scan line in each band, we compute the max length of all the
@@ -404,6 +425,9 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
}
}
psd_ctx->rle_row = (void*) malloc(maxlength);
+ if (psd_ctx->rle_row == NULL)
+ die("Malloc failure in read_psd");
+
psd_ctx->read_line = read_psd_line_rle8;
psd_ctx->write_line = write_psd_line8;
for (kk = 0; kk < num_channel; kk++)
@@ -413,7 +437,13 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
#ifdef TEST_PSD_DUMP
/* Now do the decode for testing */
in_buff = (uchar*) malloc(maxlength);
+ if (in_buff == NULL)
+ die("Malloc failure in read_psd");
+
out_buff = (uchar*) malloc(width);
+ if (out_buff == NULL)
+ die("Malloc failure in read_psd");
+
for (kk = 0; kk < data_size; kk++)
{
fread(in_buff, 1, (psd_ctx->row_lengths)[kk], fi);
@@ -433,9 +463,13 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
psd_ctx->rle_row = NULL;
psd_ctx->band_row_length_index = NULL;
psd_ctx->band_file_offset = (long*) malloc(num_channel * sizeof(long));
- for (kk = 0; kk < num_channel; kk++)
- {
- (psd_ctx->band_file_offset)[kk] = count + height * width * kk * bytes;
+ if (psd_ctx->band_file_offset == NULL)
+ die("Memory allocation failure in read_psd");
+ else {
+ for (kk = 0; kk < num_channel; kk++)
+ {
+ (psd_ctx->band_file_offset)[kk] = count + height * width * kk * bytes;
+ }
}
if (depth == 8)
{
@@ -449,11 +483,16 @@ static void read_psd(FILE *fi, psd_ctx_t *psd_ctx, FILE *fo)
}
}
psd_ctx->finalize = finalize_psd;
+
psd_ctx->permute = (uchar*) malloc(num_channel);
- /* A default initialization */
- for (kk = 0; kk < num_channel; kk++)
- {
- psd_ctx->permute[kk] = kk;
+ if (psd_ctx->permute == NULL) {
+ die("Memory allocation failure in read_psd");
+ } else {
+ /* A default initialization */
+ for (kk = 0; kk < num_channel; kk++)
+ {
+ psd_ctx->permute[kk] = kk;
+ }
}
}
@@ -461,22 +500,23 @@ static void read_pgm(FILE *fi, int *xs, int *ys, FILE *fo)
{
char buf[256];
int depth;
+ int count;
do
fgets(buf, sizeof(buf), fi);
while (buf[0] == '#');
- sscanf (buf, "%d", xs);
+ count = sscanf(buf, "%d", xs);
do
fgets (buf, sizeof(buf), fi);
while (buf[0] == '#');
- sscanf (buf, "%d", ys);
+ count = sscanf (buf, "%d", ys);
if (*xs <= 0 || *ys <= 0 || *xs > MAX_SIZE || *ys > MAX_SIZE)
die("Input image size out of range");
do
fgets(buf, sizeof(buf), fi);
while (buf[0] == '#');
- sscanf(buf, "%d", &depth);
+ count = sscanf(buf, "%d", &depth);
if (depth != 255)
die("Only works with depth=255 images");
@@ -529,7 +569,7 @@ static int read_pam(FILE *fi, int *xs, int *ys, FILE *fo)
{
fprintf(fo, "TUPLTYPE CMYK\n");
}
- else if (sscanf(buf, "TUPLTYP%c") && c == 'E')
+ else if (sscanf(buf, "TUPLTYP%c", &c) && c == 'E')
{
die("Only CMYK/DEVN pams supported");
}
@@ -540,7 +580,7 @@ static int read_pam(FILE *fi, int *xs, int *ys, FILE *fo)
}
else
{
- printf(stderr, "Unknown header field: %s\n", buf);
+ fprintf(stderr, "Unknown header field: %s\n", buf);
die("Unknown header field\n");
}
}
@@ -608,7 +648,7 @@ main(int argc, char **argv)
char buf[256];
int xs, ys;
int xsb;
- ETS_POLARITY polarity;
+ ETS_POLARITY polarity = ETS_BLACK_IS_ZERO;
ETS_Params params;
ETS_Ctx *ctx;
int lut[ETS_SRC_MAX+1], i;
@@ -637,11 +677,11 @@ main(int argc, char **argv)
int c1_scale[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1 };
ETS_SrcPixel *ibufs[M] = { 0 };
uchar *obufs[M] = { 0 };
- int planes;
+ int planes = 0;
void (*read_line)(ETS_SrcPixel **ibufs, int xs, FILE *fi, int planes, void *image_ctx);
void (*write_line)(uchar **obufs, int xs, FILE *fo, int planes, void *image_ctx);
- void (*finalize)(void *image_ctx);
- char *gamma_tab = NULL;
+ void (*finalize)(void *image_ctx) = NULL;
+ const char *gamma_tab = NULL;
int multiplane = 1;
int ets_style = 1;
int r_style = 1;
@@ -652,6 +692,7 @@ main(int argc, char **argv)
psd_ctx_t psd_ctx;
void *image_ctx = NULL;
uchar byte_count = 1;
+ int count;
int y;
@@ -696,7 +737,7 @@ main(int argc, char **argv)
noise = atoi(arg_value);
break;
case 'a':
- sscanf(arg_value, "%d:%d", &aspect_x, &aspect_y);
+ count = sscanf(arg_value, "%d:%d", &aspect_x, &aspect_y);
break;
default:
goto usage_exit;
@@ -756,7 +797,12 @@ main(int argc, char **argv)
for (i = 0; i < planes; i++)
{
ibufs[i] = (ETS_SrcPixel*) malloc(xs * byte_count);
+ if (ibufs[i] == NULL)
+ die("Malloc failure in main");
+
obufs[i] = (uchar*) ets_malloc_aligned(xsb + 16, 16);
+ if (obufs[i] == NULL)
+ die("Malloc failure in main");
}
/* This sets up a simple gamma lookup table. */
@@ -764,7 +810,7 @@ main(int argc, char **argv)
{
FILE *lutf = fopen(gamma_tab, "r");
for (i = 0; i < (ETS_SRC_MAX+1); i++)
- fscanf(lutf, "%d", &lut[i]);
+ count = fscanf(lutf, "%d", &lut[i]);
fclose(lutf);
}
else
@@ -794,7 +840,12 @@ main(int argc, char **argv)
for (i = 0; i < planes; i++)
luts[i] = lut;
params.luts = luts;
- params.strengths = (multiplane ? strengths[planes-1] : strengths[0]);
+
+ if (planes > 0)
+ params.strengths = (multiplane ? strengths[planes - 1] : strengths[0]);
+ else
+ params.strengths = strengths[0];
+
params.aspect_x = aspect_x;
params.aspect_y = aspect_y;
params.distscale = 0;
diff --git a/toolbin/halftone/ETS/win32/ETS.sln b/toolbin/halftone/ETS/win32/ETS.sln
index 63c293e38..3f2f644bf 100644
--- a/toolbin/halftone/ETS/win32/ETS.sln
+++ b/toolbin/halftone/ETS/win32/ETS.sln
@@ -1,7 +1,9 @@

-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ETS", "ETS.vcproj", "{9F937420-ED89-4C41-AED3-52937666B60E}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30611.23
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ETS", "ETS.vcxproj", "{9F937420-ED89-4C41-AED3-52937666B60E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -17,4 +19,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {0CA610AF-110F-439C-AD8A-ABED393D6C3C}
+ EndGlobalSection
EndGlobal
diff --git a/toolbin/halftone/ETS/win32/ETS.vcproj b/toolbin/halftone/ETS/win32/ETS.vcproj
deleted file mode 100644
index 09f6c14d2..000000000
--- a/toolbin/halftone/ETS/win32/ETS.vcproj
+++ /dev/null
@@ -1,196 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="ETS"
- ProjectGUID="{9F937420-ED89-4C41-AED3-52937666B60E}"
- RootNamespace="ETS"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- GenerateDebugInformation="true"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- GenerateDebugInformation="true"
- 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="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="..\ets.c"
- >
- </File>
- <File
- RelativePath="..\test_ets.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\ets.h"
- >
- </File>
- <File
- RelativePath="..\tm.h"
- >
- </File>
- </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>
diff --git a/toolbin/halftone/ETS/win32/ETS.vcxproj b/toolbin/halftone/ETS/win32/ETS.vcxproj
new file mode 100644
index 000000000..882b463d5
--- /dev/null
+++ b/toolbin/halftone/ETS/win32/ETS.vcxproj
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9F937420-ED89-4C41-AED3-52937666B60E}</ProjectGuid>
+ <RootNamespace>ETS</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" 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>
+ <_ProjectFileVersion>16.0.30523.133</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir>$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\ets.c" />
+ <ClCompile Include="..\test_ets.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\ets.h" />
+ <ClInclude Include="..\tm.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/toolbin/halftone/ETS/win32/ETS.vcxproj.filters b/toolbin/halftone/ETS/win32/ETS.vcxproj.filters
new file mode 100644
index 000000000..b25f8358e
--- /dev/null
+++ b/toolbin/halftone/ETS/win32/ETS.vcxproj.filters
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\ets.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\test_ets.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\ets.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\tm.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+</Project> \ No newline at end of file