Filewatcher File Search
FTP Search
  
Directory (beta)
  
Content Search (beta)
   
pkg://Omni-0.5.0-4.src.rpm:1609263/Omni-0.5.0-Omni_path.patch  info  downloads

--- Omni/GhostscriptInterface.cpp.Omni_path	Thu Oct 18 19:43:41 2001
+++ Omni/GhostscriptInterface.cpp	Thu Oct 18 19:50:21 2001
@@ -336,13 +336,26 @@
 #endif
 
        char *pszDeviceLib = 0;
-       pszDeviceLib = (char *) malloc(strlen(cDeviceName)+strlen("/opt/Omni/bin/")+1);
+       pszDeviceLib = (char *) malloc(strlen(cDeviceName)+strlen("/usr/lib/Omni/")+1);
        if(pszDeviceLib)
-           sprintf(pszDeviceLib, "/opt/Omni/bin/%s", cDeviceName);
+           sprintf(pszDeviceLib, "/usr/lib/Omni/%s", cDeviceName);
        else
            return 0;
        *pvhDevice = g_module_open (pszDeviceLib, (GModuleFlags)0);
 
+       if (!*pvhDevice)
+       {
+           free(pszDeviceLib);
+
+           pszDeviceLib = (char *) malloc(strlen(cDeviceName)+strlen("/opt/Omni/bin/")+1);
+           if(pszDeviceLib)
+               sprintf(pszDeviceLib, "/opt/Omni/bin/%s", cDeviceName);
+           else
+               return 0;
+           *pvhDevice = g_module_open (pszDeviceLib, (GModuleFlags)0);
+       }
+
+
 #ifndef RETAIL
        if (DebugOutput::shouldOutputOmniInterface ())
           cerr << "GhostscriptInterface::" << __FUNCTION__ << ": *pvhDevice = " << hex << *pvhDevice << dec << endl;
--- Omni/Omni.cpp.Omni_path	Tue Jun 12 18:38:40 2001
+++ Omni/Omni.cpp	Thu Oct 18 19:50:20 2001
@@ -16,6 +16,9 @@
  *   along with this library; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
+
+#include <stdio.h>
+
 #include "Device.hpp"
 #include "Omni.hpp"
 #include <glob.h>
@@ -107,6 +110,9 @@
 openDeviceLibrary (char     *pszLibName,
                    GModule **phDevice)
 {
+   char path[1024];
+   int size;
+
 #ifndef RETAIL
    if (DebugOutput::shouldOutputOmni ()) cerr << "Omni::" << __FUNCTION__ << ": openDeviceLibrary: g_module_open (" << pszLibName << ") = ";
 #endif
@@ -117,7 +123,19 @@
       return false;
    }
 
-   *phDevice = g_module_open (pszLibName, (GModuleFlags)0);
+   size = snprintf(path, 1024, "/usr/lib/Omni/%s", pszLibName);
+   if (size < 1024) {
+      *phDevice = g_module_open (path, (GModuleFlags)0);
+   }
+   if (!*phDevice) {
+      size = snprintf(path, 1024, "/opt/Omni/bin/%s", pszLibName);
+      if (size < 1024) {
+        *phDevice = g_module_open (path, (GModuleFlags)0);
+      }
+   }
+   if (!*phDevice) {
+      *phDevice = g_module_open (pszLibName, (GModuleFlags)0);
+   }
 
 #ifndef RETAIL
    if (DebugOutput::shouldOutputOmni ()) cerr << hex << *phDevice << endl;
Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2008 Oliver Maruhn