Franz Bakan - 2007-02-21

Hi,

Two files need to be patched to make tesseract 1.03 work on OS/2.  Both in
tesseract-1.03\ccutil:

--- cut ---

--- platform.h.original    2007-02-01 17:57:02.000000000 +0100
+++ platform.h    2007-02-21 23:58:58.000000000 +0100
@@ -11,4 +11,11 @@
#define MAX_PATH PATH_MAX
#endif
#define SIGNED signed
+#ifdef __OS2__
+#define TESSERACT_PATHSEP ';'
+#define TESSERACT_DIRSEP '\\'
+#else
+#define TESSERACT_PATHSEP ':'
+#define TESSERACT_DIRSEP '/'
+#endif
#endif

--- cut ---

and

--- cut ---

--- basedir.cpp.original    2006-06-17 00:17:04.000000000 +0200
+++ basedir.cpp    2006-11-08 23:31:40.000000000 +0100
@@ -48,7 +48,9 @@

   strcpy(directory, code);  //get demo directory
   dirind = strlen (directory);
-  while (dirind > 0 && directory[dirind - 1] != '/')
+
+  while (dirind > 0 && directory[dirind - 1] != TESSERACT_DIRSEP )
+
     dirind--;                    //look back for dirname
   directory[dirind] = '\0';      //end at directory
   if (dirind != 0) {
@@ -57,15 +59,16 @@
   }
   pathlist = getenv ("PATH");    //find search path
   while (pathlist != NULL && *pathlist) {
-    for (dirind = 0; *pathlist != '\0' && *pathlist != ':';)
+
+    for (dirind = 0; *pathlist != '\0' && *pathlist != TESSERACT_PATHSEP ;)
                                  //copy a directory
       directory[dirind++] = *pathlist++;
-    if (*pathlist == ':')
+    if (*pathlist == TESSERACT_PATHSEP)
       pathlist++;
     if (dirind == 0)
       continue;
-    if (directory[dirind - 1] != '/');
-    directory[dirind++] = '/';   //add ending slash
+    if (directory[dirind - 1] != TESSERACT_DIRSEP);
+    directory[dirind++] = TESSERACT_DIRSEP ;   //add ending slash
     directory[dirind++] = '\0';
     path = directory;            //try this path
     strcat(directory, code);

--- cut ---

would be nice if these patches (or something with
equal functionality) could be included for 1.04.

Franz
--
fbakan@gmx.net
www,fbakan.de