diff --git a/INSTALL.SVN b/INSTALL.SVN
index cd6a95b54..e61794051 100644
--- a/INSTALL.SVN
+++ b/INSTALL.SVN
@@ -15,7 +15,7 @@ So, the steps for making Tesseract are:
$ sudo make install
$ sudo make install-langs
$ make training
- $ sudo make training-installation
+ $ sudo make training-install
'sudo make install-langs' or 'sudo make install LANGS=' will install all
available language data files in tessdata directory.
diff --git a/vs2008/ambiguous_words/ambiguous_words.rc b/vs2008/ambiguous_words/ambiguous_words.rc
index 0c10ee8f3..0ee21130d 100644
--- a/vs2008/ambiguous_words/ambiguous_words.rc
+++ b/vs2008/ambiguous_words/ambiguous_words.rc
@@ -53,8 +53,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,2,0,0
- PRODUCTVERSION 3,2,0,0
+ FILEVERSION 3,3,0,0
+ PRODUCTVERSION 3,3,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -70,12 +70,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Generate sets of words Tesseract is likely to find ambiguous"
- VALUE "FileVersion", "3,2,0,0"
+ VALUE "FileVersion", "3,3,0,0"
VALUE "InternalName", "ambiguous_words"
- VALUE "LegalCopyright", "Copyright (C) 2012 Google, Inc. Licensed under the Apache License, Version 2.0"
+ VALUE "LegalCopyright", "Copyright (C) 2013 Google, Inc. Licensed under the Apache License, Version 2.0"
VALUE "OriginalFilename", "ambiguous_words.exe"
VALUE "ProductName", "Tesseract-OCR"
- VALUE "ProductVersion", "3.02"
+ VALUE "ProductVersion", "3.03"
END
END
BLOCK "VarFileInfo"
diff --git a/vs2008/classifier_tester/classifier_tester.rc b/vs2008/classifier_tester/classifier_tester.rc
index 577eb308c..e827b9c63 100644
--- a/vs2008/classifier_tester/classifier_tester.rc
+++ b/vs2008/classifier_tester/classifier_tester.rc
@@ -53,8 +53,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,2,0,0
- PRODUCTVERSION 3,2,0,0
+ FILEVERSION 3,3,0,0
+ PRODUCTVERSION 3,3,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -70,12 +70,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Tests a Tesseract character classifier on data formatted for training"
- VALUE "FileVersion", "3,2,0,0"
+ VALUE "FileVersion", "3,3,0,0"
VALUE "InternalName", "classifier_tester"
- VALUE "LegalCopyright", "Copyright (C) 2012 Google, Inc. Licensed under the Apache License, Version 2.0"
+ VALUE "LegalCopyright", "Copyright (C) 2013 Google, Inc. Licensed under the Apache License, Version 2.0"
VALUE "OriginalFilename", "classifier_tester.exe"
VALUE "ProductName", "Tesseract OCR"
- VALUE "ProductVersion", "3.02"
+ VALUE "ProductVersion", "3.03"
END
END
BLOCK "VarFileInfo"
diff --git a/vs2008/cntraining/cntraining.rc b/vs2008/cntraining/cntraining.rc
index 289d7b53a..08305a74f 100644
--- a/vs2008/cntraining/cntraining.rc
+++ b/vs2008/cntraining/cntraining.rc
@@ -53,8 +53,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,2,0,0
- PRODUCTVERSION 3,2,0,0
+ FILEVERSION 3,3,0,0
+ PRODUCTVERSION 3,3,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -70,12 +70,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Character normalization training for Tesseract"
- VALUE "FileVersion", "3,2,0,0"
+ VALUE "FileVersion", "3,3,0,0"
VALUE "InternalName", "cntraining"
- VALUE "LegalCopyright", "Copyright (C) 2012 Google, Inc. Licensed under the Apache License, Version 2.0"
+ VALUE "LegalCopyright", "Copyright (C) 2013 Google, Inc. Licensed under the Apache License, Version 2.0"
VALUE "OriginalFilename", "cntraining.exe"
VALUE "ProductName", "Tesseract OCR"
- VALUE "ProductVersion", "3.02"
+ VALUE "ProductVersion", "3.03"
END
END
BLOCK "VarFileInfo"
diff --git a/vs2008/combine_tessdata/combine_tessdata.rc b/vs2008/combine_tessdata/combine_tessdata.rc
index 62e42765b..c7721db6d 100644
--- a/vs2008/combine_tessdata/combine_tessdata.rc
+++ b/vs2008/combine_tessdata/combine_tessdata.rc
@@ -53,8 +53,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,2,0,0
- PRODUCTVERSION 3,2,0,0
+ FILEVERSION 3,3,0,0
+ PRODUCTVERSION 3,3,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -70,12 +70,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Combine/extract/overwrite Tesseract data"
- VALUE "FileVersion", "3,2,0,0"
+ VALUE "FileVersion", "3,3,0,0"
VALUE "InternalName", "combine_tessdata"
- VALUE "LegalCopyright", "Copyright (C) 2012 Google, Inc. Licensed under the Apache License, Version 2.0"
+ VALUE "LegalCopyright", "Copyright (C) 2013 Google, Inc. Licensed under the Apache License, Version 2.0"
VALUE "OriginalFilename", "combine_tessdata.exe"
VALUE "ProductName", "Tesseract OCR"
- VALUE "ProductVersion", "3.02"
+ VALUE "ProductVersion", "3.03"
END
END
BLOCK "VarFileInfo"
diff --git a/vs2008/dawg2wordlist/dawg2wordlist.rc b/vs2008/dawg2wordlist/dawg2wordlist.rc
index 688a3a48d..602756c3e 100644
--- a/vs2008/dawg2wordlist/dawg2wordlist.rc
+++ b/vs2008/dawg2wordlist/dawg2wordlist.rc
@@ -53,8 +53,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,2,0,0
- PRODUCTVERSION 3,2,0,0
+ FILEVERSION 3,3,0,0
+ PRODUCTVERSION 3,3,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -70,12 +70,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Converts a Tesseract DAWG to a wordlist"
- VALUE "FileVersion", "3,2,0,0"
+ VALUE "FileVersion", "3,3,0,0"
VALUE "InternalName", "dawg2wordlist"
- VALUE "LegalCopyright", "Copyright (C) 2012 Google, Inc. Licensed under the Apache License, Version 2.0"
+ VALUE "LegalCopyright", "Copyright (C) 2013 Google, Inc. Licensed under the Apache License, Version 2.0"
VALUE "OriginalFilename", "dawg2wordlist.exe"
VALUE "ProductName", "Tesseract OCR"
- VALUE "ProductVersion", "3.02"
+ VALUE "ProductVersion", "3.03"
END
END
BLOCK "VarFileInfo"
diff --git a/vs2008/include/tesseract_versionnumbers.vsprops b/vs2008/include/tesseract_versionnumbers.vsprops
index 3c6b3d871..77156fab6 100644
--- a/vs2008/include/tesseract_versionnumbers.vsprops
+++ b/vs2008/include/tesseract_versionnumbers.vsprops
@@ -7,14 +7,14 @@
>
diff --git a/vs2008/libtesseract/libtesseract.vcproj b/vs2008/libtesseract/libtesseract.vcproj
index e5617a798..78aa37156 100644
--- a/vs2008/libtesseract/libtesseract.vcproj
+++ b/vs2008/libtesseract/libtesseract.vcproj
@@ -2,7 +2,7 @@
+
+
+ 416
+ 8c
+ 168
+ 1,68,0,0
+ 1.68
+ 143
+ 394
+ 125
+
+
+ <_ProjectFileVersion>10.0.40219.1
+
+
+
+ $(GIFLIB_VERSION)
+
+
+ $(LIBJPEG_VERSION)
+
+
+ $(LIBLEPT_VERSION)
+
+
+ $(LIBLEPT_VERSION_R)
+
+
+ $(LIBLEPT_NUMBER)
+
+
+ $(LIBPNG_VERSION)
+
+
+ $(LIBTIFF_VERSION)
+
+
+ $(ZLIB_VERSION)
+
+
+
\ No newline at end of file
diff --git a/vs2010/include/tesseract_versionnumbers.props b/vs2010/include/tesseract_versionnumbers.props
new file mode 100644
index 000000000..e16989d0e
--- /dev/null
+++ b/vs2010/include/tesseract_versionnumbers.props
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ 303
+ 3,3,0,0
+ 3.03
+
+
+ <_ProjectFileVersion>10.0.40219.1
+
+
+
+ $(LIBTESS_VERSION)
+
+
+ $(LIBTESS_VERSION_R)
+
+
+ $(LIBTESS_NUMBER)
+
+
+
\ No newline at end of file
diff --git a/vs2010/libtesseract/libtesseract.vcxproj b/vs2010/libtesseract/libtesseract.vcxproj
new file mode 100644
index 000000000..fdae96835
--- /dev/null
+++ b/vs2010/libtesseract/libtesseract.vcxproj
@@ -0,0 +1,788 @@
+
+
+
+
+ DLL_Debug
+ Win32
+
+
+ DLL_Release
+ Win32
+
+
+ LIB_Debug
+ Win32
+
+
+ LIB_Release
+ Win32
+
+
+
+ libtesseract303
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}
+ libtesseract
+
+
+
+ DynamicLibrary
+ MultiByte
+
+
+ DynamicLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+ StaticLibrary
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ ..\$(Configuration)\
+ $(Configuration)\
+ false
+ ..\$(Configuration)\
+ $(Configuration)\
+ false
+ ..\$(Configuration)\
+ $(Configuration)\
+ false
+ ..\$(Configuration)\
+ $(Configuration)\
+ false
+ $(ProjectName)-static-debug
+ $(ProjectName)-static
+ $(ProjectName)d
+
+
+
+
+
+
+
+ %(Outputs)
+
+
+ Disabled
+ ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;_DEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)
+ false
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level3
+ OldStyle
+ Default
+ 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings)
+ false
+
+
+ $(OutDir)$(TargetName)$(TargetExt)
+
+
+ copy library to lib directory
+ if not exist ..\..\..\lib md ..\..\..\lib
+copy "$(TargetPath)" ..\..\..\lib
+
+
+
+
+
+
+
+
+
+ %(Outputs)
+
+
+ MaxSpeed
+ ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;NDEBUG;_LIB;USE_STD_NAMESPACE;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level3
+
+
+ Default
+ 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings)
+
+
+ $(OutDir)$(TargetName)$(TargetExt)
+
+
+
+
+ copy library to lib directory
+ if not exist ..\..\..\lib md ..\..\..\lib
+copy "$(TargetPath)" ..\..\..\lib
+
+
+
+
+
+
+
+
+
+ %(Outputs)
+
+
+ MaxSpeed
+ ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;NDEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level3
+
+
+ Default
+ 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings)
+
+
+ ws2_32.lib;user32.lib;liblept$(LIBLEPT_VERSION).lib
+ $(OutDir)$(TargetName)$(TargetExt)
+ $(LIBTESS_NUMBER)
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+
+
+ MachineX86
+
+
+ copy library to lib directory
+ if not exist ..\..\..\lib md ..\..\..\lib
+copy "$(TargetPath)" ..\..\..\lib
+copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
+
+
+
+
+
+
+
+
+
+ %(Outputs)
+
+
+ Disabled
+ ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;_DEBUG;_USRDLL;_WINDLL;USE_STD_NAMESPACE;TESS_EXPORTS;LIBLEPT_IMPORTS;WINDLLNAME="$(TargetFileName)";%(PreprocessorDefinitions)
+ false
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level3
+ OldStyle
+ Default
+ 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings)
+ false
+
+
+ ws2_32.lib;user32.lib;liblept$(LIBLEPT_VERSION)d.lib
+ $(OutDir)$(TargetName)$(TargetExt)
+ $(LIBTESS_NUMBER)
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ MachineX86
+
+
+ copy library to lib directory
+ if not exist ..\..\..\lib md ..\..\..\lib
+copy "$(TargetPath)" ..\..\..\lib
+copy "$(TargetDir)$(TargetName).lib" ..\..\..\lib
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/vs2010/libtesseract/libtesseract303.rc b/vs2010/libtesseract/libtesseract303.rc
new file mode 100644
index 000000000..141c8d9ce
--- /dev/null
+++ b/vs2010/libtesseract/libtesseract303.rc
@@ -0,0 +1,101 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "windows.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 3,2,3,0
+ PRODUCTVERSION 3,2,3,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x7L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "Tesseract OCR library"
+ VALUE "FileVersion", "3, 3, 0, 0"
+ VALUE "InternalName", "libtesseract"
+ VALUE "LegalCopyright", "Copyright (C) 2012 Google, Inc. Licensed under the Apache License, Version 2.0"
+ VALUE "OriginalFilename", "libtesseract"
+ VALUE "ProductName", "Tesseract OCR Library"
+ VALUE "ProductVersion", "3, 3, 0, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/vs2010/libtesseract/resource.h b/vs2010/libtesseract/resource.h
new file mode 100644
index 000000000..a054e1ad4
--- /dev/null
+++ b/vs2010/libtesseract/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by libtesseract303.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/vs2010/port/gettimeofday.cpp b/vs2010/port/gettimeofday.cpp
new file mode 100644
index 000000000..b78524536
--- /dev/null
+++ b/vs2010/port/gettimeofday.cpp
@@ -0,0 +1,32 @@
+///////////////////////////////////////////////////////////////////////
+// File: gettimeofday.cpp
+// Description: Implementation of gettimeofday based on leptonica
+// Author: tomp2010, zdenop
+// Created: Tue Feb 21 21:38:00 CET 2012
+//
+// (C) Copyright 2012, Google Inc.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+///////////////////////////////////////////////////////////////////////
+
+#include
+#include "gettimeofday.h"
+
+int gettimeofday(struct timeval *tp, struct timezone *tzp) {
+ l_int32 sec, usec;
+ if (tp == NULL)
+ return -1;
+
+ l_getCurrentTime(&sec, &usec);
+ tp->tv_sec = sec;
+ tp->tv_usec = usec;
+ return 0;
+}
diff --git a/vs2010/port/gettimeofday.h b/vs2010/port/gettimeofday.h
new file mode 100644
index 000000000..c34215b1e
--- /dev/null
+++ b/vs2010/port/gettimeofday.h
@@ -0,0 +1,31 @@
+///////////////////////////////////////////////////////////////////////
+// File: gettimeofday.h
+// Description: Header file for gettimeofday.cpp
+// Author: tomp2010, zdenop
+// Created: Tue Feb 21 21:38:00 CET 2012
+//
+// (C) Copyright 2012, Google Inc.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+///////////////////////////////////////////////////////////////////////
+
+#ifndef VS2008_PORT_GETTIMEOFDAY_H_
+#define VS2008_PORT_GETTIMEOFDAY_H_
+
+#ifdef _WIN32
+#include // timeval is defined in here.
+#endif
+
+typedef struct timezone tz;
+
+int gettimeofday(struct timeval * tp, struct timezone * tzp);
+
+#endif // VS2008_PORT_GETTIMEOFDAY_H_
diff --git a/vs2010/port/mathfix.h b/vs2010/port/mathfix.h
new file mode 100644
index 000000000..ac294e777
--- /dev/null
+++ b/vs2010/port/mathfix.h
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////
+// File: mathfix.h
+// Description: Implement missing math functions
+// Author: zdenop
+// Created: Fri Feb 03 06:45:06 CET 2012
+//
+// (C) Copyright 2012, Google Inc.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+///////////////////////////////////////////////////////////////////////
+
+
+#ifndef VS2008_INCLUDE_MATHFIX_H_
+#define VS2008_INCLUDE_MATHFIXT_H_
+
+#ifndef _MSC_VER
+#error "Use this header only with Microsoft Visual C++ compilers!"
+#endif
+
+#include
+#include // for _isnan(), _finite() on VC++
+#define isnan(x) _isnan(x)
+#define isinf(x) (!_finite(x))
+#define fmax max //VC++ does not implement all the provisions of C99 Standard
+inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); }
+
+#endif // VS2008_INCLUDE_MATHFIXT_H_
diff --git a/vs2010/port/strtok_r.cpp b/vs2010/port/strtok_r.cpp
new file mode 100644
index 000000000..a89b50f1c
--- /dev/null
+++ b/vs2010/port/strtok_r.cpp
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the Institute nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+// source: https://github.com/heimdal/heimdal/blob/master/lib/roken/strtok_r.c
+
+#include
+
+char *strtok_r(char *s1, const char *s2, char **lasts) {
+ char *ret;
+
+ if (s1 == NULL)
+ s1 = *lasts;
+ while (*s1 && strchr(s2, *s1))
+ ++s1;
+ if (*s1 == '\0')
+ return NULL;
+ ret = s1;
+ while (*s1 && !strchr(s2, *s1))
+ ++s1;
+ if (*s1)
+ *s1++ = '\0';
+ *lasts = s1;
+ return ret;
+}
+
diff --git a/vs2010/port/strtok_r.h b/vs2010/port/strtok_r.h
new file mode 100644
index 000000000..15cec6aae
--- /dev/null
+++ b/vs2010/port/strtok_r.h
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////
+// File: strtok_r.h
+// Description: Header file for strtok_r.cpp
+// source: https://github.com/heimdal/heimdal/blob/master/lib/roken/
+// strtok_r.c
+// Author: zdenop
+// Created: Fri Aug 12 23:55:06 CET 2011
+//
+// (C) Copyright 2011, Google Inc.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+///////////////////////////////////////////////////////////////////////
+
+#ifndef VS2008_PORT_STRTOK_R_H_
+#define VS2008_PORT_STRTOK_R_H_
+
+char *strtok_r(char *s1, const char *s2, char **lasts);
+
+#endif // VS2008_PORT_STRTOK_R_H_
diff --git a/vs2010/port/version.h b/vs2010/port/version.h
new file mode 100644
index 000000000..b1bdf4ceb
--- /dev/null
+++ b/vs2010/port/version.h
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////
+// File: version.h
+// Description: define version identifier for Windows
+// Author: zdenop@gmail.com
+// Created: Fri Nov 19 21:05:06 CET 2010
+//
+// (C) Copyright 2010, Google Inc.
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+///////////////////////////////////////////////////////////////////////
+
+#ifndef VS2008_PORT_VERSION_H_
+#define VS2008_PORT_VERSION_H_
+
+#define VERSION "3.03"
+
+#endif // VS2008_PORT_VERSION_H_
diff --git a/vs2010/tesseract.sln b/vs2010/tesseract.sln
new file mode 100644
index 000000000..014a4abc7
--- /dev/null
+++ b/vs2010/tesseract.sln
@@ -0,0 +1,36 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtesseract303", "libtesseract\libtesseract.vcxproj", "{D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tesseract", "tesseract\tesseract.vcxproj", "{C76996CB-C4CB-4D89-9F67-F605DF129618}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ DLL_Debug|Win32 = DLL_Debug|Win32
+ DLL_Release|Win32 = DLL_Release|Win32
+ LIB_Debug|Win32 = LIB_Debug|Win32
+ LIB_Release|Win32 = LIB_Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.DLL_Debug|Win32.ActiveCfg = DLL_Debug|Win32
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.DLL_Debug|Win32.Build.0 = DLL_Debug|Win32
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.DLL_Release|Win32.ActiveCfg = DLL_Release|Win32
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.DLL_Release|Win32.Build.0 = DLL_Release|Win32
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_Debug|Win32.ActiveCfg = LIB_Debug|Win32
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_Debug|Win32.Build.0 = LIB_Debug|Win32
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_Release|Win32.ActiveCfg = LIB_Release|Win32
+ {D14F28C7-0CAE-4C37-B174-40FDEFBD4FE0}.LIB_Release|Win32.Build.0 = LIB_Release|Win32
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}.DLL_Debug|Win32.ActiveCfg = DLL_Debug|Win32
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}.DLL_Debug|Win32.Build.0 = DLL_Debug|Win32
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}.DLL_Release|Win32.ActiveCfg = DLL_Release|Win32
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}.DLL_Release|Win32.Build.0 = DLL_Release|Win32
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_Debug|Win32.ActiveCfg = LIB_Debug|Win32
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_Debug|Win32.Build.0 = LIB_Debug|Win32
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_Release|Win32.ActiveCfg = LIB_Release|Win32
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}.LIB_Release|Win32.Build.0 = LIB_Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/vs2010/tesseract.suo b/vs2010/tesseract.suo
new file mode 100644
index 000000000..c7fc73b3e
Binary files /dev/null and b/vs2010/tesseract.suo differ
diff --git a/vs2010/tesseract/resource.h b/vs2010/tesseract/resource.h
new file mode 100644
index 000000000..25e0730f1
--- /dev/null
+++ b/vs2010/tesseract/resource.h
@@ -0,0 +1,14 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by tesseract.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/vs2010/tesseract/tesseract.rc b/vs2010/tesseract/tesseract.rc
new file mode 100644
index 000000000..85cf8695d
--- /dev/null
+++ b/vs2010/tesseract/tesseract.rc
@@ -0,0 +1,101 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "windows.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 3,3,0,0
+ PRODUCTVERSION 3,3,0,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "Tesseract command-line OCR engine"
+ VALUE "FileVersion", "3,3,0,0"
+ VALUE "InternalName", "tesseract"
+ VALUE "LegalCopyright", "Copyright (C) 2013 Google, Inc. Licensed under the Apache License, Version 2.0"
+ VALUE "OriginalFilename", "tesseract.exe"
+ VALUE "ProductName", "Tesseract-OCR"
+ VALUE "ProductVersion", "3.03"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/vs2010/tesseract/tesseract.vcxproj b/vs2010/tesseract/tesseract.vcxproj
new file mode 100644
index 000000000..0f20e7c67
--- /dev/null
+++ b/vs2010/tesseract/tesseract.vcxproj
@@ -0,0 +1,234 @@
+
+
+
+
+ DLL_Debug
+ Win32
+
+
+ DLL_Release
+ Win32
+
+
+ LIB_Debug
+ Win32
+
+
+ LIB_Release
+ Win32
+
+
+
+ {C76996CB-C4CB-4D89-9F67-F605DF129618}
+ tesseract
+
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.40219.1
+ ..\$(Configuration)\
+ $(Configuration)\
+ false
+ ..\$(Configuration)\
+ $(Configuration)\
+ false
+ ..\$(Configuration)\
+ $(Configuration)\
+ false
+ ..\$(Configuration)\
+ $(Configuration)\
+ false
+ $(ProjectName)d
+ $(ProjectName)-dll
+ $(ProjectName)-dlld
+
+
+
+
+
+
+
+ %(Outputs)
+
+
+ Disabled
+ ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;_DEBUG;USE_STD_NAMESPACE;%(PreprocessorDefinitions)
+ false
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level3
+ OldStyle
+ Default
+ 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings)
+ false
+
+
+ MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions)
+
+
+ ws2_32.lib;user32.lib;zlib$(ZLIB_VERSION)-static-mtdll-debug.lib;libpng$(LIBPNG_VERSION)-static-mtdll-debug.lib;libjpeg$(LIBJPEG_VERSION)-static-mtdll-debug.lib;giflib$(GIFLIB_VERSION)-static-mtdll-debug.lib;libtiff$(LIBTIFF_VERSION)-static-mtdll-debug.lib;liblept$(LIBLEPT_VERSION)-static-mtdll-debug.lib
+ $(OutDir)$(TargetName)$(TargetExt)
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ Console
+
+
+
+
+
+
+
+
+ %(Outputs)
+
+
+ MaxSpeed
+ ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;NDEBUG;USE_STD_NAMESPACE;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level3
+
+
+ Default
+ 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings)
+
+
+ MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions)
+
+
+ ws2_32.lib;user32.lib;zlib$(ZLIB_VERSION)-static-mtdll.lib;libpng$(LIBPNG_VERSION)-static-mtdll.lib;libjpeg$(LIBJPEG_VERSION)-static-mtdll.lib;giflib$(GIFLIB_VERSION)-static-mtdll.lib;libtiff$(LIBTIFF_VERSION)-static-mtdll.lib;liblept$(LIBLEPT_VERSION)-static-mtdll.lib
+ $(OutDir)$(TargetName)$(TargetExt)
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+
+
+
+
+ %(Outputs)
+
+
+ MaxSpeed
+ ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;NDEBUG;USE_STD_NAMESPACE;TESS_IMPORTS;LIBLEPT_IMPORTS;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+
+
+ Level3
+
+
+ Default
+ 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings)
+
+
+ MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions)
+
+
+ ws2_32.lib;user32.lib;liblept$(LIBLEPT_VERSION).lib
+ $(OutDir)$(TargetName)$(TargetExt)
+ $(LIBTESS_NUMBER)
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ Console
+
+
+ MachineX86
+
+
+
+
+
+
+
+
+ %(Outputs)
+
+
+ Disabled
+ ..\..\api;..\..\ccmain;..\..\ccutil;..\..\ccstruct;..\..\classify;..\..\cube;..\..\cutil;..\..\dict;..\..\image;..\..\neural_networks\runtime;..\..\textord;..\..\viewer;..\..\wordrec;.;..\..\..\include;..\..\..\include\leptonica;..\port;%(AdditionalIncludeDirectories)
+ WIN32;_WINDOWS;_DEBUG;USE_STD_NAMESPACE;TESS_IMPORTS;LIBLEPT_IMPORTS;%(PreprocessorDefinitions)
+ false
+ EnableFastChecks
+ MultiThreadedDebugDLL
+
+
+ Level3
+ OldStyle
+ Default
+ 4244;4305;4018;4267;4996;4800;4005;4355;4099;4566;%(DisableSpecificWarnings)
+ false
+
+
+ MYVERSION=$(LIBTESS_VERSION_R);%(PreprocessorDefinitions)
+
+
+ ws2_32.lib;user32.lib;liblept$(LIBLEPT_VERSION)d.lib
+ $(OutDir)$(TargetName)$(TargetExt)
+ $(LIBLEPT_NUMBER)
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ Console
+ MachineX86
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {d14f28c7-0cae-4c37-b174-40fdefbd4fe0}
+ false
+
+
+
+
+
+
\ No newline at end of file