[liblouis-liblouisxml] [liblouis] r731 committed - Fixed bugs table search and log printing

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 11 Jul 2012 00:47:07 +0000

Revision: 731
Author:   john.boyer@xxxxxxxxxxxxxxxxx
Date:     Tue Jul 10 17:46:56 2012
Log:      Fixed bugs table search and log printing
http://code.google.com/p/liblouis/source/detail?r=731

Modified:
 /trunk/liblouis/compileTranslationTable.c

=======================================
--- /trunk/liblouis/compileTranslationTable.c   Tue Jul 10 15:57:14 2012
+++ /trunk/liblouis/compileTranslationTable.c   Tue Jul 10 17:46:56 2012
@@ -188,7 +188,7 @@
     return;
   if (logFile == NULL && initialLogFileName[0] != 0)
     logFile = fopen (initialLogFileName, "wb");
-  if (logFile == NULL);
+  if (logFile == NULL)
   logFile = stderr;
   va_start (argp, format);
   vfprintf (logFile, format, argp);
@@ -4954,14 +4954,14 @@
     {
       /* See if table in current directory or on a path in
        * the table name*/
-      if (!(errorCount == 1 && fileCount == 1))
+      if (errorCount > 0 && (!(errorCount == 1 && fileCount == 1)))
         return NULL;
       table = getTable (tableList);
     }
   if (!table)
     {
 /* See if table on dataPath. */
-      if (!(errorCount == 1 && fileCount == 1))
+      if (errorCount > 0 && (!(errorCount == 1 && fileCount == 1)))
         return NULL;
       pathList = lou_getDataPath ();
       if (pathList)
@@ -4980,7 +4980,7 @@
   if (!table)
     {
       /* See if table on installed or program path. */
-      if (!(errorCount == 1 && fileCount == 1))
+      if (errorCount > 0 && (!(errorCount == 1 && fileCount == 1)))
         return NULL;
 #ifdef _WIN32
       strcpy (trialPath, lou_getProgramPath ());
@@ -4994,7 +4994,7 @@
     }
   if (!table)
     lou_logPrint ("%s could not be found", tableList);
-  return NULL;
+  return table;
 }

 static unsigned char *destSpacing = NULL;
For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts:

  • » [liblouis-liblouisxml] [liblouis] r731 committed - Fixed bugs table search and log printing - liblouis