[Scribus] Bugfix wrong var type to compare with dlerror(3) - Incoming patch

Michael Schloh von Bennewitz michael.schloh
Wed Aug 20 13:31:16 CEST 2003


The variable defined as 'char *error' is compared against dlerror(3) which
returns a 'const char *' on most platforms. Even on platforms in which it
returns 'char *' it is safe to declare this variable as 'const char *error',
and by doing so the Scribus 1.0.1 code will build on more systems (like
BSD). See the following patch, which can be applied by typing

  'patch -p1 <nameofpatchfile'

after changing to the scribus-1.0.1 directory.

Regards,
Michael

diff -Naur scribus-1.0.1.orig/scribus/scribus.cpp scribus-1.0.1/scribus/scribus.cpp
--- scribus-1.0.1.orig/scribus/scribus.cpp	Wed Aug  6 12:51:44 2003
+++ scribus-1.0.1/scribus/scribus.cpp	Wed Aug 20 13:29:39 2003
@@ -3052,7 +3052,7 @@
 void ScribusApp::slotHelpAbout()
 {
 	void *mo;
-	char *error;
+	const char *error;
 	typedef About* (*sdem)(QWidget *d);
 	sdem demo;
 	QString pfad = PREL;
@@ -4696,7 +4696,7 @@
 void ScribusApp::slotPrefsOrg()
 {
 	void *mo;
-	char *error;
+	const char *error;
 	bool zChange = false;
 	typedef Preferences* (*sdem)(QWidget *d, preV *Vor);
 	sdem demo;
@@ -5158,7 +5158,7 @@
 
 PSLib* ScribusApp::getPSDriver(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf)
 {
-	char *error;
+	const char *error;
 	typedef PSLib* (*sdem)(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf);
 	sdem demo;
 	QString pfad = PREL;
@@ -5193,7 +5193,7 @@
 bool ScribusApp::getPDFDriver(QString fn, QString nam, int Components, int frPa, int toPa, QMap<int,QPixmap> thumbs)
 {
 	bool ret = false;
-	char *error;
+	const char *error;
 	void *PDFDriver;
 	typedef bool (*sdem)(ScribusApp *plug, QString fn, QString nam, int Components, int frPa, int toPa, QMap<int,QPixmap> thumbs);
 	sdem demo;
@@ -5740,7 +5740,7 @@
 
 void ScribusApp::FinalizePlugs()
 {
-	char *error;
+	const char *error;
 	QMap<QString, PlugData>::Iterator it;
 	struct PlugData pda;
 	typedef void (*sdem2)();
@@ -5810,7 +5810,7 @@
 void ScribusApp::CallDLL(QString name)
 {
 	void *mo;
-	char *error;
+	const char *error;
 	struct PlugData pda;
 	pda = PluginMap[name];
 	typedef void (*sdem)(QWidget *d, ScribusApp *plug);
@@ -5844,7 +5844,7 @@
 bool ScribusApp::DLLName(QString name, QString *PName, int *typ, void **Zeig)
 {
 	void *mo;
-	char *error;
+	const char *error;
 	typedef QString (*sdem0)();
 	typedef int (*sdem1)();
 	typedef void (*sdem2)(QWidget *d, ScribusApp *plug);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 467 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20030820/b25b9908/attachment.pgp 



More information about the scribus mailing list