[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    [PATCH] Compile fixes for MipsPro, aCC
From:       Marcus Camen <mcamen () mcamen ! de>
Date:       2003-09-20 7:47:14
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi *,

attached you find several patches for KDE_3_1_BRANCH / ARTS_1_1_BRANCH.
All of them are compile fixes IRIX / MipsPro and/or HP-UX / aCC and are 
tested on these platforms and on Linux / GCC 3.2.
Please review. Are there any objections? I would like to commit them to 
HEAD first and a few days later to the BRANCH.

Details:

- - kde-common-admin.patch:
If you use ./configure --disable-libsuffix you get a shell variable 
'kdelibsuff=no'. The problem is that kdelibsuff is compared with 'none' 
later in the code. This leads to /usr/libno instead of /usr/lib.


- - arts_flow_gsl.patch:
This looks like a typo. GCC doesn't care but it breaks with picky 
compilers.


- - arts_mcop_mt.patch:
Well on Linux linking against libartsflow is not excessary, but on other 
platforms it is. Looking at the code one can see some #ifdef lines so I 
assume the code depending on libartsflow is not reached on every 
platform. Hmmm...


- - kdelibs_kdecore_kextsock.patch:
Necessary for aCC. I do not see any potential problems here.


- - kdelibs_kdecore_kicontheme.patch:
Non-GCC compiler are pickier...


- - kdelibs_kio_misc_kdesasl.patch:
Is this ok? Looks like a platform independent bug then.


- - kdebase_kcontrol_kfontinst.patch:
Adds missing std:: and replaces #include <xxx.h> with #include <xxx>
You may want to review the const changes.


- - kdebase_khelpcenter.patch:
std:: again


- - kdebase_kicker_applets_clock.patch:
removing unnecessary STL includes


- -kdebase_kioslave_nfs.patch:
missing #includes


- - kdebase_kioslave_thumbnail.patch:
remove one #include


- - kdebase_ksysguard.patch:
Fixes for the IRIX only code


- -kdebase_kwin_clients_keramik.patch:
<iostream.h> -> <iostream> and a missing Qt include


- - kdebase_kxkb.patch:
added missing Qt include and X11 libraries

- --
Thanx
  Marcus






-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/bAYClP3stiSSHvoRAlEXAJ9j9A7e9RhimH7kDY/p2ZfEpjsUDQCfe963
MrxYndyRzQmEhc2T4e62LXY=
=n4oL
-----END PGP SIGNATURE-----

["arts_flow_gsl.patch" (text/x-diff)]

Index: gslmagic.c
===================================================================
RCS file: /home/kde/arts/flow/gsl/gslmagic.c,v
retrieving revision 1.3
diff -u -5 -p -d -r1.3 gslmagic.c
--- gslmagic.c	5 Nov 2002 08:15:40 -0000	1.3
+++ gslmagic.c	20 Sep 2003 06:40:31 -0000
@@ -171,11 +171,11 @@ typedef enum
   MAGIC_CHECK_UINT_SMALLER,
   MAGIC_CHECK_UINT_ZEROS,
   MAGIC_CHECK_UINT_ONES,
   MAGIC_CHECK_STRING_EQUAL,
   MAGIC_CHECK_STRING_GREATER,
-  MAGIC_CHECK_STRING_SMALLER,
+  MAGIC_CHECK_STRING_SMALLER
 } MagicCheckType;
 typedef union
 {
   gint32  v_int32;
   guint32 v_uint32;

["kdebase_kioslave_nfs.patch" (text/x-diff)]

Index: kioslave/nfs/kio_nfs.cpp
===================================================================
RCS file: /home/kde/kdebase/kioslave/nfs/kio_nfs.cpp,v
retrieving revision 1.25.2.1
diff -u -5 -p -d -r1.25.2.1 kio_nfs.cpp
--- kioslave/nfs/kio_nfs.cpp	18 May 2003 12:35:57 -0000	1.25.2.1
+++ kioslave/nfs/kio_nfs.cpp	20 Sep 2003 06:19:07 -0000
@@ -53,10 +53,11 @@
 #include <kdebug.h>
 #include <kinstance.h>
 #include <klocale.h>
 
 #include <kio/global.h>
+#include <iostream>
 
 #include "nfs_prot.h"
 #define fhandle _fhandle
 #include "mount.h"
 #include "kio_nfs.h"
Index: kioslave/nfs/mount_xdr.c
===================================================================
RCS file: /home/kde/kdebase/kioslave/nfs/mount_xdr.c,v
retrieving revision 1.1
diff -u -5 -p -d -r1.1 mount_xdr.c
--- kioslave/nfs/mount_xdr.c	5 Jul 2000 17:24:25 -0000	1.1
+++ kioslave/nfs/mount_xdr.c	20 Sep 2003 06:19:07 -0000
@@ -3,10 +3,11 @@
  * It was generated using rpcgen.
  */
 
 #include <rpc/types.h>
 #include <rpc/xdr.h>
+#include <arpa/inet.h>
 
 #include "mount.h"
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape
Index: kioslave/nfs/nfs_prot_xdr.c
===================================================================
RCS file: /home/kde/kdebase/kioslave/nfs/nfs_prot_xdr.c,v
retrieving revision 1.1
diff -u -5 -p -d -r1.1 nfs_prot_xdr.c
--- kioslave/nfs/nfs_prot_xdr.c	5 Jul 2000 17:24:25 -0000	1.1
+++ kioslave/nfs/nfs_prot_xdr.c	20 Sep 2003 06:19:07 -0000
@@ -3,10 +3,11 @@
  * It was generated using rpcgen.
  */
 
 #include <rpc/types.h>
 #include <rpc/xdr.h>
+#include <arpa/inet.h>
 
 #include "nfs_prot.h"
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  * unrestricted use provided that this legend is included on all tape

["kdebase_kioslave_thumbnail.patch" (text/x-diff)]

Index: kioslave/thumbnail/gscreator.cpp
===================================================================
RCS file: /home/kde/kdebase/kioslave/thumbnail/gscreator.cpp,v
retrieving revision 1.9.2.4
diff -u -5 -p -d -r1.9.2.4 gscreator.cpp
--- kioslave/thumbnail/gscreator.cpp	21 Jul 2003 23:09:24 -0000	1.9.2.4
+++ kioslave/thumbnail/gscreator.cpp	20 Sep 2003 06:19:23 -0000
@@ -25,11 +25,10 @@
 
 #include <assert.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <signal.h>
-#include <sys/select.h>
 #include <sys/time.h>
 #include <sys/wait.h>
 #include <errno.h>
 
 #include <qfile.h>

["kdebase_ksysguard.patch" (text/x-diff)]

Index: ksysguard/ksysguardd/Irix/NetDev.c
===================================================================
RCS file: /home/kde/kdebase/ksysguard/ksysguardd/Irix/NetDev.c,v
retrieving revision 1.2.2.1
diff -u -5 -p -d -r1.2.2.1 NetDev.c
--- ksysguard/ksysguardd/Irix/NetDev.c	12 Dec 2002 16:44:55 -0000	1.2.2.1
+++ ksysguard/ksysguardd/Irix/NetDev.c	20 Sep 2003 06:20:52 -0000
@@ -36,13 +36,15 @@
 
 #include "Command.h"
 #include "ksysguardd.h"
 #include "NetDev.h"
 
-#ifdef __GNUC__
+
+/* valid for gcc and MIPS CC */
 #define LONGLONG long long
-#endif
+
+
 
 typedef struct {
 	char name[IFNAMSIZ];
 	u_long recBytes;
 	u_long recPacks;
@@ -63,11 +65,11 @@ static int NetDevCnt = 0;
 
 char **parseCommand(const char *cmd)
 {
 	char *tmp_cmd = strdup(cmd);
 	char *begin;
-	char *retval = malloc(sizeof(char *)*2);
+	char **retval = (char **) malloc(sizeof(char *)*2);
 
 	begin = rindex(tmp_cmd, '/');
 	*begin = '\0';
 	begin++;
 	retval[1] = strdup(begin); // sensor
Index: ksysguard/ksysguardd/Irix/cpu.h
===================================================================
RCS file: /home/kde/kdebase/ksysguard/ksysguardd/Irix/cpu.h,v
retrieving revision 1.2
diff -u -5 -p -d -r1.2 cpu.h
--- ksysguard/ksysguardd/Irix/cpu.h	15 Apr 2002 05:41:38 -0000	1.2
+++ ksysguard/ksysguardd/Irix/cpu.h	20 Sep 2003 06:20:52 -0000
@@ -21,10 +21,12 @@
 */
 
 #ifndef _cpuinfo_h_
 #define _cpuinfo_h_
 
+#include "modules.h"
+
 void initCpuInfo(struct SensorModul* sm);
 void exitCpuInfo(void);
 
 int updateCpuInfo(void);
 

["kdebase_kwin_clients_keramik.patch" (text/x-diff)]

Index: kwin/clients/keramik/embedtool.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/clients/keramik/embedtool.cpp,v
retrieving revision 1.3
diff -u -5 -p -d -r1.3 embedtool.cpp
--- kwin/clients/keramik/embedtool.cpp	15 Sep 2002 19:19:52 -0000	1.3
+++ kwin/clients/keramik/embedtool.cpp	20 Sep 2003 06:21:26 -0000
@@ -26,11 +26,11 @@
 #include <qregexp.h>
 #include <qfile.h>
 #include <qfileinfo.h>
 #include <qdatetime.h>
 
-#include <iostream.h>
+#include <iostream>
 
 static int primes[] = {
 	   2,   3,   5,   7,  11,  13,  17,  19,  23,  29,
 	  31,  37,  41,  43,  47,  53,  59,  61,  67,  71,
 	  73,  79,  83,  89,  97, 101, 103, 107, 109, 113,
Index: kwin/clients/keramik/keramik.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/clients/keramik/keramik.cpp,v
retrieving revision 1.17.2.1
diff -u -5 -p -d -r1.17.2.1 keramik.cpp
--- kwin/clients/keramik/keramik.cpp	18 May 2003 12:36:01 -0000	1.17.2.1
+++ kwin/clients/keramik/keramik.cpp	20 Sep 2003 06:21:26 -0000
@@ -25,10 +25,11 @@
 #include <kconfig.h>
 #include <klocale.h>
 #include <kiconeffect.h>
 
 #include <qpainter.h>
+#include <qwindowdefs.h>
 #include <qlayout.h>
 #include <qbitmap.h>
 #include <qstyle.h>
 
 #include "../../workspace.h"

["kdebase_kxkb.patch" (text/x-diff)]

Index: kxkb/Makefile.am
===================================================================
RCS file: /home/kde/kdebase/kxkb/Makefile.am,v
retrieving revision 1.22
diff -u -5 -p -d -r1.22 Makefile.am
--- kxkb/Makefile.am	28 Sep 2002 12:32:37 -0000	1.22
+++ kxkb/Makefile.am	20 Sep 2003 06:21:44 -0000
@@ -14,11 +14,11 @@ kxkb_LDADD = kxkb.la -lxkbfile
 lib_LTLIBRARIES = kxkb.la
 kde_module_LTLIBRARIES = kcm_keyboard.la
 
 kcm_keyboard_la_SOURCES = rules.cpp kcmlayout.cpp pixmap.cpp kcmmisc.cpp kcmmiscwidget.ui
 kcm_keyboard_la_LDFLAGS  = $(all_libraries) -module -avoid-version -no-undefined
-kcm_keyboard_la_LIBADD = $(XTESTLIB) $(LIB_KIO) -lxkbfile
+kcm_keyboard_la_LIBADD = $(XTESTLIB) $(LIB_KIO) -lxkbfile -lX11
 
 kxkb_la_SOURCES = kxkb.cpp rules.cpp extension.cpp pixmap.cpp
 kxkb_la_LDFLAGS = $(all_libraries) -module -avoid-version
 kxkb_la_LIBADD = -lX11 -lXext $(LIB_KDEUI) -lxkbfile
 

["kde-common_admin.patch" (text/x-diff)]

Index: admin/acinclude.m4.in
===================================================================
RCS file: /home/kde/kde-common/admin/acinclude.m4.in,v
retrieving revision 2.302.2.32
diff -u -5 -p -d -r2.302.2.32 acinclude.m4.in
--- admin/acinclude.m4.in	15 Sep 2003 18:13:52 -0000	2.302.2.32
+++ admin/acinclude.m4.in	20 Sep 2003 07:11:15 -0000
@@ -2976,18 +2976,18 @@ See http:://objprelink.sourceforge.net f
   fi
 ])
 
 AC_DEFUN(KDE_CHECK_LIB64,
 [
-    kdelibsuff=none
+    kdelibsuff=no
     AC_ARG_ENABLE(libsuffix,
         AC_HELP_STRING([--enable-libsuffix],
             [/lib directory suffix (64,32,none[=default])]),
             kdelibsuff=$enableval)
     # TODO: add an auto case that compiles a little C app to check
     # where the glibc is
-    if test "$kdelibsuff" = "none"; then
+    if test "$kdelibsuff" = "no"; then
        kdelibsuff=
     fi
     if test -z "$kdelibsuff"; then
         AC_MSG_RESULT([not using lib directory suffix])
         AC_DEFINE(KDELIBSUFF, [""], Suffix for lib directories)

["kdelibs_kdecore_kextsock.patch" (text/x-diff)]

Index: kdecore/kextsock.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kextsock.cpp,v
retrieving revision 1.44.2.8
diff -u -5 -p -d -r1.44.2.8 kextsock.cpp
--- kdecore/kextsock.cpp	16 Jun 2003 09:31:43 -0000	1.44.2.8
+++ kdecore/kextsock.cpp	20 Sep 2003 06:10:59 -0000
@@ -24,15 +24,17 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/times.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <sys/un.h>
 
 #ifdef HAVE_RES_INIT
 # include <arpa/nameser.h>
 # include <resolv.h>
+extern "C" int res_init();
 #endif
 
 #include <stdio.h>
 #include <errno.h>
 #include <fcntl.h>

["kdelibs_kdecore_kicontheme.patch" (text/x-diff)]

Index: kdecore/kicontheme.h
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kicontheme.h,v
retrieving revision 1.26
diff -u -5 -p -d -r1.26 kicontheme.h
--- kdecore/kicontheme.h	26 Oct 2002 22:08:38 -0000	1.26
+++ kdecore/kicontheme.h	20 Sep 2003 06:11:25 -0000
@@ -76,11 +76,11 @@ public:
     // if you add a group here, make sure to change the config reading in
     // KIconLoader too
     /**
      * The group an an icon.
      */
-    enum Group { NoGroup=-1, Desktop=0, FirstGroup=Desktop, Toolbar,
+    enum Group { NoGroup=-1, Desktop=0, FirstGroup=0, Toolbar,
         MainToolbar, Small, Panel, LastGroup, User };
 
     /**
      * These are the standard sizes for icons.
      */

["kdelibs_kio_misc_kdesasl.patch" (text/x-diff)]

Index: kio/misc/kdesasl/kdesasl.cpp
===================================================================
RCS file: /home/kde/kdelibs/kio/misc/kdesasl/kdesasl.cpp,v
retrieving revision 1.8.4.1
diff -u -5 -p -d -r1.8.4.1 kdesasl.cpp
--- kio/misc/kdesasl/kdesasl.cpp	29 Jan 2003 18:33:50 -0000	1.8.4.1
+++ kio/misc/kdesasl/kdesasl.cpp	20 Sep 2003 06:12:24 -0000
@@ -85,11 +85,12 @@ QByteArray KDESasl::getCramMd5Response(c
   int len = mPass.utf8().length();
   secret.resize(len);
   if (secret.size() > 64)
   {
     KMD5 md5(secret);
-    secret.duplicate((const char*)md5.rawDigest(), 16);
+    
+    secret.duplicate( (const char *)( &md5.rawDigest()), 16);
     len = 16;
   }
   secret.resize(64);
   for (i = len; i < 64; i++) secret[i] = 0;
   QByteArray XorOpad(64);

["kdebase_kcontrol_kfontinst.patch" (text/x-diff)]

Index: kcontrol/kfontinst/kfontinst/AfmCreator.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kfontinst/kfontinst/Attic/AfmCreator.cpp,v
retrieving revision 1.14
diff -u -5 -p -d -r1.14 AfmCreator.cpp
--- kcontrol/kfontinst/kfontinst/AfmCreator.cpp	24 Aug 2002 00:54:22 -0000	1.14
+++ kcontrol/kfontinst/kfontinst/AfmCreator.cpp	20 Sep 2003 06:17:18 -0000
@@ -201,11 +201,11 @@ CAfmCreator::EStatus CAfmCreator::create
         //     For Type1 this is read in from any existing AFM file
         //     For TrueType only the Kerning data is obtained - and this is read \
from the .ttf file  //
         readKerningAndComposite(fName, kerning, composite, enc);  // Must do this \
before we overwrite the file below...  
-        ofstream afm(afmName.local8Bit());
+        std::ofstream afm(afmName.local8Bit());
 
         if(afm)
         {
             unsigned int ch;
             int          xMin=CKfiGlobal::fe().getBBoxXMin(),
@@ -310,11 +310,11 @@ QString CAfmCreator::getEncoding(const Q
 {
     //
     // Return the 'kfontinst' encoding of the AFM file...
     //
     QString  enc;
-    ifstream f(afm.local8Bit());
+    std::ifstream f(afm.local8Bit());
  
     if(f)
     {
         const int constMaxLen=512;
  
@@ -353,11 +353,11 @@ static bool encContainsGlyph(CEncodings:
 
 void CAfmCreator::readKerningAndComposite(const QString &font, QPtrList<TKerning> \
&kern, QStringList &comp, CEncodings::T8Bit *enc)  {
     if(CFontEngine::isAType1(font.local8Bit()))
     {
-        ifstream f(CMisc::afmName(font).local8Bit());
+        std::ifstream f(CMisc::afmName(font).local8Bit());
  
         if(f)
         {
             const int constMaxLen=512;
 
Index: kcontrol/kfontinst/kfontinst/BufferedFile.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kfontinst/kfontinst/Attic/BufferedFile.cpp,v
retrieving revision 1.6
diff -u -5 -p -d -r1.6 BufferedFile.cpp
--- kcontrol/kfontinst/kfontinst/BufferedFile.cpp	12 Mar 2002 01:37:51 -0000	1.6
+++ kcontrol/kfontinst/kfontinst/BufferedFile.cpp	20 Sep 2003 06:17:18 -0000
@@ -42,15 +42,15 @@ CBufferedFile::CBufferedFile(const QCStr
                itsOffset(0),
                itsGuard(guard),
                itsSection(section),
                itsWrittenGuard(false)
 {
-    ifstream in(file);
+    std::ifstream in(file);
 
     if(in)
     {
-        in.seekg(0, ios::end);
+        in.seekg(0, std::ios::end);
         itsSize=in.tellg();
 
         if(itsSize>0)
         {
             itsData=new char [itsSize];
@@ -65,11 +65,11 @@ CBufferedFile::CBufferedFile(const QCStr
                 bool         error=false,
                              foundSection=false,
                              ignoreLine=false,
                              useNextLine=false;
 
-                in.seekg(0, ios::beg);
+                in.seekg(0, std::ios::beg);
 
                 do
                 {
                     in.getline(buffer, constMaxLineLen);
 
Index: kcontrol/kfontinst/kfontinst/Encodings.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kfontinst/kfontinst/Attic/Encodings.cpp,v
retrieving revision 1.8.2.1
diff -u -5 -p -d -r1.8.2.1 Encodings.cpp
--- kcontrol/kfontinst/kfontinst/Encodings.cpp	5 Dec 2002 22:59:53 -0000	1.8.2.1
+++ kcontrol/kfontinst/kfontinst/Encodings.cpp	20 Sep 2003 06:17:19 -0000
@@ -31,11 +31,11 @@
 #include "Config.h"
 #include "Misc.h"
 #include "CompressedFile.h"
 #include <qdir.h>
 #include <ctype.h>
-#include <fstream.h>
+#include <fstream>
 
 // Use the strict maps - needed for creating AFMs...
 #define STRICT_ENCODING_MAPS
 
 // These arrays have been copied from ttmkfdir.c
@@ -626,11 +626,11 @@ void CEncodings::reset()
 }
 
 bool CEncodings::createEncodingsDotDir(const QString &dir)
 {
     bool     status=false;
-    ofstream of(QString(dir+"encodings.dir").local8Bit());
+    std::ofstream of(QString(dir+"encodings.dir").local8Bit());
 
     if(of)
     {
         const T8Bit  *data8=NULL;
         const T16Bit *data16=NULL;
Index: kcontrol/kfontinst/kfontinst/FontEngine.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kfontinst/kfontinst/Attic/FontEngine.cpp,v
retrieving revision 1.28.2.2
diff -u -5 -p -d -r1.28.2.2 FontEngine.cpp
--- kcontrol/kfontinst/kfontinst/FontEngine.cpp	22 Apr 2003 18:55:13 -0000	1.28.2.2
+++ kcontrol/kfontinst/kfontinst/FontEngine.cpp	20 Sep 2003 06:17:20 -0000
@@ -34,12 +34,12 @@
 #include "Misc.h"
 #include "CompressedFile.h"
 #include <ctype.h>
 #include <string.h>
 #include <stdlib.h>
-#include <fstream.h>
-#include <iostream.h>
+#include <fstream>
+#include <iostream>
 #include <stdio.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <qimage.h>
 #include <qregexp.h>
@@ -264,11 +264,11 @@ static const TT1AndSpdFoundryMap constT1
 CFontEngine::CFontEngine()
 {
     itsType=NONE;
     if(FT_Init_FreeType(&itsFt.library))
     {
-        cerr << "ERROR: FreeType2 failed to initialise\n";
+        std::cerr << "ERROR: FreeType2 failed to initialise\n";
         exit(0);
     }
 }
 
 CFontEngine::~CFontEngine()
@@ -843,11 +843,11 @@ const char * CFontEngine::getReadOnlyTok
     //
     static const int constMaxTokenLen=1024;
 
     static char token[constMaxTokenLen];
 
-    char *start,
+    const char *start,
          *end;
 
     token[0]='\0';
     if(NULL!=(start=strstr(str, key)) && NULL!=(start=strchr(start, '(')) && \
NULL!=(end=strstr(start, "readonly")))  {
@@ -880,11 +880,11 @@ const char * CFontEngine::getTokenT1(con
     //
     static const int constMaxTokenLen=1024;
 
     static char token[constMaxTokenLen];
 
-    char *start,
+    const char *start,
          *end;
 
     token[0]='\0';
     if(NULL!=(start=strstr(str, key)) && NULL!=(end=strstr(start, "def")) && \
end>start)  {
@@ -939,11 +939,11 @@ bool CFontEngine::openFontT1(const QStri
             if(bytesRead>2 && ( binary || (strstr(data, "%!")==data) ) )
             {
                 const char *header,
                            *str,
                            *dict;
-                char       *end;
+                const char       *end;
                 bool       foundName=false,
                            foundFamily=false,
                            foundPs=false,
                            foundNotice=false,
                            foundEncoding=false,
@@ -952,13 +952,15 @@ bool CFontEngine::openFontT1(const QStri
                 header=binary ? &data[6] : data;
 
                 // Look for start of 'dict' section...
                 if((dict=strstr(header, "dict begin"))!=NULL)
                 {
+
+		    // Yuck end is const !!!
                     // Now look for the end of the 'dict' section
                     if((end=strstr(dict, "currentdict end"))!=NULL)
-                        *end='\0';  // If found, then set to NULL - this should \
speed up the following strstr's +                        *const_cast<char \
*>(end)='\0';  // If found, then set to NULL - this should speed up the following \
strstr's  
                     // Having found the 'dict' section, now try to read the data...
 
                     if(NULL!=(str=getTokenT1(dict, "/Encoding")))
                     {
@@ -1066,11 +1068,11 @@ bool CFontEngine::openFontT1(const QStri
     {
         QString afm(CMisc::afmName(file));
 
         if(CMisc::fExists(afm))
         {
-            ifstream f(afm.local8Bit());
+            std::ifstream f(afm.local8Bit());
  
             if(f)
             {
                 const int  constMaxLen=512;
                 const char *contEncStr="EncodingScheme";
@@ -1563,11 +1565,11 @@ bool CFontEngine::openFontSpd(const QStr
         SPD_WEIGHT_HEAVY,
         SPD_WEIGHT_BLACK
     };
 
     bool     status=false;
-    ifstream spd(file.local8Bit());
+    std::ifstream spd(file.local8Bit());
 
     if(spd)
     {
         char hdr[constHeaderSize];
 
@@ -1856,40 +1858,42 @@ void CFontEngine::parseXlfdBmp()
         itsFullName=itsXlfd;
 }
 
 static const char * getTokenBdf(const char *str, const char *key, bool \
noquotes=false)  {
-    char         *s=NULL;
+    const char         *s=NULL;
     unsigned int keyLen=strlen(key),
                  sLen=strlen(str);
 
     if(keyLen+1<sLen && NULL!=(s=strstr(str, key)) && (s==str || (!isalnum(s[-1]) && \
'_'!=s[-1])) && (!noquotes || (noquotes && s[keyLen+1]=='-')))  {
         const int   constMaxTokenSize=256;
         static char token[constMaxTokenSize];
 
-        char        *end=NULL;
+        const char        *end=NULL;
 
         strncpy(token, s, constMaxTokenSize);
         token[constMaxTokenSize-1]='\0';
 
         if(noquotes)
         {
             s+=strlen(key)+1;
             if(NULL!=(end=strchr(s, '\n')))
             {
-                *end='\0';
+	      //Yuck
+                *const_cast<char *>(end)='\0';
                 return s;
             }
         }
         else
             if(NULL!=(s=strchr(token, '\"')))
             {
                 s++;
                 if(NULL!=(end=strchr(s, '\"')))
                 {
-                    *end='\0';
+                    //Yuck
+                    *const_cast<char *>(end)='\0';
                     return s;
                 }
             }
     }
 
Index: kcontrol/kfontinst/kfontinst/Kfi.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kfontinst/kfontinst/Attic/Kfi.cpp,v
retrieving revision 1.13
diff -u -5 -p -d -r1.13 Kfi.cpp
--- kcontrol/kfontinst/kfontinst/Kfi.cpp	24 Aug 2002 00:00:07 -0000	1.13
+++ kcontrol/kfontinst/kfontinst/Kfi.cpp	20 Sep 2003 06:17:20 -0000
@@ -59,11 +59,11 @@ CKfiMainWidget * CKfi::create(QWidget *p
             {
                 unsigned int i;
 
                 for(i=0; i<CKfiGlobal::cfg().getModifiedDirs().count(); ++i)
                 {
-                    ofstream \
fontsDir(QFile::encodeName(CKfiGlobal::cfg().getModifiedDirs()[i]+"/fonts.dir")); +   \
std::ofstream fontsDir(QFile::encodeName(CKfiGlobal::cfg().getModifiedDirs()[i]+"/fonts.dir"));
  
                     if(fontsDir)
                     {
                         fontsDir << 0 << endl;
                         fontsDir.close();
Index: kcontrol/kfontinst/kfontinst/StarOfficeConfig.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kfontinst/kfontinst/Attic/StarOfficeConfig.cpp,v
retrieving revision 1.7
diff -u -5 -p -d -r1.7 StarOfficeConfig.cpp
--- kcontrol/kfontinst/kfontinst/StarOfficeConfig.cpp	11 Mar 2002 22:58:49 -0000	1.7
+++ kcontrol/kfontinst/kfontinst/StarOfficeConfig.cpp	20 Sep 2003 06:17:20 -0000
@@ -177,11 +177,11 @@ void CStarOfficeConfig::removeAfm(const 
         CMisc::removeFile(xp3Dir+afmDir+afm);
 }
 
 CStarOfficeConfig::EStatus CStarOfficeConfig::outputToPsStdFonts(const QString \
&xDir, CBufferedFile &out, const QString &fileName, const QString &afm)  {
-    ifstream in(QString(xDir+"fonts.dir").local8Bit());
+    std::ifstream in(QString(xDir+"fonts.dir").local8Bit());
     EStatus  status=SUCCESS;
 
     if(in)
     {
         const int          constMaxLine=256;
Index: kcontrol/kfontinst/kfontinst/Ttf.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kfontinst/kfontinst/Attic/Ttf.cpp,v
retrieving revision 1.7.2.1
diff -u -5 -p -d -r1.7.2.1 Ttf.cpp
--- kcontrol/kfontinst/kfontinst/Ttf.cpp	2 Apr 2003 01:32:36 -0000	1.7.2.1
+++ kcontrol/kfontinst/kfontinst/Ttf.cpp	20 Sep 2003 06:17:20 -0000
@@ -29,20 +29,21 @@
 #include "Ttf.h"
 #include "FontEngine.h"
 #include "KfiGlobal.h"
 #include "Misc.h"
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <string.h>
 #include <klocale.h>
 
 using namespace std;
 
 CTtf::CTtf()
     : itsBuffer(NULL),
       itsBufferSize(0)
 {
-    ifstream ps(CMisc::locate("psnames").local8Bit());
+    std::ifstream ps(CMisc::locate("psnames").local8Bit());
 
     if(ps)
     {
         const int constMaxStrLen=256;
 
@@ -124,11 +125,11 @@ CTtf::EStatus CTtf::fixPsNames(const QSt
 
 QPtrList<CTtf::TKerning> * CTtf::getKerningData(const QString &nameAndPath)
 {
     QPtrList<TKerning> *list=NULL;
 
-    ifstream ttf(nameAndPath.local8Bit());
+    std::ifstream ttf(nameAndPath.local8Bit());
 
     if(ttf)
     {
         if(locateTable(ttf, "kern"))
         {
@@ -180,11 +181,11 @@ QPtrList<CTtf::TKerning> * CTtf::getKern
                                 }
                                 else
                                     error=true;
                             }
                             if(!error)
-                                ttf.seekg(pos+ntohs(sub.length), ios::beg);
+                                ttf.seekg(pos+ntohs(sub.length), std::ios::beg);
                         }
                         else
                             error=true;
                     }
                     else
@@ -194,32 +195,32 @@ QPtrList<CTtf::TKerning> * CTtf::getKern
     }
 
     return list;   
 }
 
-bool CTtf::locateTable(ifstream &ttf, const char *table)
+bool CTtf::locateTable(std::ifstream &ttf, const char *table)
 {
     bool status=false;
 
     if(ttf)
     {
         TDirectory dir;
         TDirEntry  entry;
         int        e;
 
-        ttf.seekg(0, ios::beg);
+        ttf.seekg(0, std::ios::beg);
         ttf.read((char *)&dir, sizeof(TDirectory));
 
         if(ttf.good())
             for(e=0; e<ntohs(dir.numTables); ++e)
             {
                 ttf.read((char *)&entry, sizeof(TDirEntry));
                 if(ttf.good())
                 {
                     if(memcmp(entry.tag, table, 4)==0)
                     {
-                        ttf.seekg(ntohl(entry.offset), ios::beg);
+                        ttf.seekg(ntohl(entry.offset), std::ios::beg);
                         if(ttf.good())
                             status=true;
                         break;
                     }
                 }
@@ -233,23 +234,23 @@ bool CTtf::locateTable(ifstream &ttf, co
 
 CTtf::EStatus CTtf::readFile(const QString &nameAndPath)
 {
     EStatus status=SUCCESS;
 
-    fstream ff(nameAndPath.local8Bit(), ios::in|ios::binary);
+    std::fstream ff(nameAndPath.local8Bit(), std::ios::in|std::ios::binary);
 
     if(ff)
     {
-        ff.seekg(0, ios::end);
+        ff.seekg(0, std::ios::end);
 
         itsBufferSize=ff.tellg();
 
         if(itsBuffer)
             delete [] itsBuffer;
  
         itsBuffer=new char [itsBufferSize];
-        ff.seekg(0, ios::beg);
+        ff.seekg(0, std::ios::beg);
         ff.read(itsBuffer, itsBufferSize);
         ff.close();
     }
     else
         status=FILE_OPEN_ERROR;
@@ -259,11 +260,11 @@ CTtf::EStatus CTtf::readFile(const QStri
 
 CTtf::EStatus CTtf::writeFile(const QString &nameAndPath)
 {
     EStatus status=SUCCESS;
 
-    fstream ff(nameAndPath.local8Bit(), ios::out|ios::binary);
+    std::fstream ff(nameAndPath.local8Bit(), std::ios::out|std::ios::binary);
 
     if(ff)
     {
         ff.write(itsBuffer, itsBufferSize);
         ff.close();
Index: kcontrol/kfontinst/kfontinst/XConfig.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/kfontinst/kfontinst/Attic/XConfig.cpp,v
retrieving revision 1.16
diff -u -5 -p -d -r1.16 XConfig.cpp
--- kcontrol/kfontinst/kfontinst/XConfig.cpp	14 Jul 2002 12:15:39 -0000	1.16
+++ kcontrol/kfontinst/kfontinst/XConfig.cpp	20 Sep 2003 06:17:20 -0000
@@ -240,11 +240,11 @@ bool CXConfig::readFontpaths()
     // Fontpaths is a custom Kfontinst format, specified as:
     // constFontpaths
     // <paths...>
 
     bool     status=false;
-    ifstream cfg(CKfiGlobal::cfg().getXConfigFile().local8Bit());
+    std::ifstream cfg(CKfiGlobal::cfg().getXConfigFile().local8Bit());
 
     if(cfg)
     {
         static const int constMaxLineLen=1024;  // Should be enough for 1 line!
  
@@ -298,11 +298,11 @@ bool CXConfig::readFontpaths()
 }
 
 bool CXConfig::writeFontpaths()
 {
     bool     status=false;
-    ofstream cfg(CKfiGlobal::cfg().getXConfigFile().local8Bit());
+    std::ofstream cfg(CKfiGlobal::cfg().getXConfigFile().local8Bit());
  
     if(cfg)
     {
         TPath *path;
 
@@ -319,11 +319,11 @@ bool CXConfig::writeFontpaths()
 }
 
 bool CXConfig::readXF86Config()
 {
     bool     status=false;
-    ifstream cfg(CKfiGlobal::cfg().getXConfigFile().local8Bit());
+    std::ifstream cfg(CKfiGlobal::cfg().getXConfigFile().local8Bit());
 
     if(cfg)
     {
         static const int constMaxLineLen=1024;  // Should be enough for 1 line!
  
@@ -523,18 +523,18 @@ static char * getXfsPath(char *buffer, u
     return found ? path : NULL;
 }
 
 bool CXConfig::processXfs(const QString &fname, bool read)
 {
-    ifstream xfs(fname.local8Bit());
+    std::ifstream xfs(fname.local8Bit());
     bool     ok=false;
  
     if(xfs)
     {
         bool closed=false;
  
-        xfs.seekg(0, ios::end);
+        xfs.seekg(0, std::ios::end);
         unsigned int size=xfs.tellg();
 
         if(read)
             itsPaths.clear();
  
@@ -542,11 +542,11 @@ bool CXConfig::processXfs(const QString 
         {
             char *buffer=new char [size+1];
  
             if(buffer)
             {
-                xfs.seekg(0, ios::beg);
+                xfs.seekg(0, std::ios::beg);
                 xfs.read(buffer, size);
  
                 if(xfs.good())
                 {
                     const char *constCatalogueStr="catalogue";
@@ -614,11 +614,11 @@ bool CXConfig::processXfs(const QString 
  
                                                     if(!read) // then must be \
write...  {
                                                         CMisc::createBackup(fname);
 
-                                                        ofstream \
of(fname.local8Bit()); +                                                        \
std::ofstream of(fname.local8Bit());  
                                                         if(of)
                                                         {
                                                             bool  first=true;
                                                             TPath *p=NULL;
@@ -690,11 +690,11 @@ bool CXConfig::createFontsDotDir(const Q
     bool status=false;
     QDir d(dir);
  
     if(d.isReadable())
     {
-        ofstream fontsDotDir(QString(dir+"fonts.dir").local8Bit());
+        std::ofstream fontsDotDir(QString(dir+"fonts.dir").local8Bit());
 
         if(fontsDotDir)
         {
             const QFileInfoList *files=d.entryInfoList();
             QStringList         bitmapFonts,
@@ -784,11 +784,11 @@ bool CXConfig::createFontsDotDir(const Q
                                 CKfiGlobal::fe().closeFont();
                             }
                     }
             }
 
-            ofstream fontsDotScale;
+            std::ofstream fontsDotScale;
 
             if(scalableFonts.count())
                 fontsDotScale.open(QString(dir+"fonts.scale").local8Bit());
 
             fontsDotDir << bitmapFonts.count()+scalableFonts.count() << endl;


["kdebase_khelpcenter.patch" (text/x-diff)]

Index: khelpcenter/infohierarchymaker.cpp
===================================================================
RCS file: /home/kde/kdebase/khelpcenter/Attic/infohierarchymaker.cpp,v
retrieving revision 1.3
diff -u -5 -p -d -r1.3 infohierarchymaker.cpp
--- khelpcenter/infohierarchymaker.cpp	2 Aug 2002 14:12:14 -0000	1.3
+++ khelpcenter/infohierarchymaker.cpp	20 Sep 2003 06:17:54 -0000
@@ -180,14 +180,14 @@ bool InfoHierarchyMaker::makeHierarchy(I
   // kdDebug() << "--- makeHierarchy ---" << endl;
 
   std::list<InfoNode*>::iterator topIt;
 
   if (topNodeName.isEmpty())
-    topIt = find_if(m_lNodes.begin(), m_lNodes.end(), isTop());
+    topIt = std::find_if(m_lNodes.begin(), m_lNodes.end(), isTop());
   else
-    topIt = find_if(m_lNodes.begin(), m_lNodes.end(),
-		    bind2nd(isNode(), topNodeName));
+    topIt = std::find_if(m_lNodes.begin(), m_lNodes.end(),
+		    std::bind2nd(isNode(), topNodeName));
 
   if (topIt == m_lNodes.end())
     return false;
 
   *ppTopNode = *topIt;
@@ -224,12 +224,12 @@ void InfoHierarchyMaker::restoreChildren
 }
 
 bool InfoHierarchyMaker::findChildren(InfoNode* pParentNode)
 {
   std::list<InfoNode*>::iterator itAfterChildren = 
-    partition(m_lNodes.begin(), m_lNodes.end(), 
-	      bind2nd(isParent(), pParentNode));
+    std::partition(m_lNodes.begin(), m_lNodes.end(), 
+	      std::bind2nd(isParent(), pParentNode));
   std::list<InfoNode*>& L = pParentNode->m_lChildren;
   L.splice(L.begin(), m_lNodes, m_lNodes.begin(), itAfterChildren);
   for (std::list<InfoNode*>::iterator it = L.begin(); it != L.end(); ++it)
     if (!findChildren(*it))
       return false;
@@ -242,11 +242,11 @@ bool InfoHierarchyMaker::orderSiblings(s
   if (siblingsList.empty())
     return true;
 
   // Szukanie pierwszego elementu
   std::list<InfoNode*>::iterator itFirst = 
-    find_if(siblingsList.begin(), siblingsList.end(), isFirstSibling());
+    std::find_if(siblingsList.begin(), siblingsList.end(), isFirstSibling());
   if (itFirst == siblingsList.end())
     // Nie znaleziono "pierwszego" elementu
   {
     kdWarning() << "First child of " << (*siblingsList.begin())->m_sUp <<
       " not found." << endl;
@@ -259,12 +259,12 @@ bool InfoHierarchyMaker::orderSiblings(s
   {
     std::list<InfoNode*>::iterator itPrev = itStart;
     --itPrev;
 
     std::list<InfoNode*>::iterator itNext =
-      find_if(itStart, siblingsList.end(),
-	      bind1st(isNextSibling(), *itPrev));
+      std::find_if(itStart, siblingsList.end(),
+	      std::bind1st(isNextSibling(), *itPrev));
     if (itNext == siblingsList.end())
       // Nie znaleziono nastepnego elementu
     {
       kdWarning() << "Next sibling of " << (*itPrev)->m_sName << " not found" << endl;
       return false;

["kdebase_kicker_applets_clock.patch" (text/x-diff)]

Index: clock.cpp
===================================================================
RCS file: /home/kde/kdebase/kicker/applets/clock/clock.cpp,v
retrieving revision 1.98.2.5
diff -u -5 -p -d -r1.98.2.5 clock.cpp
--- clock.cpp	22 Aug 2003 14:49:57 -0000	1.98.2.5
+++ clock.cpp	20 Sep 2003 07:38:42 -0000
@@ -19,14 +19,10 @@ AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES
 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 ******************************************************************/
 
-#include <cstdlib>
-#include <ctime>
-#include <time.h>
-
 #include "clock.h"
 #include "datepicker.h"
 #include "settings.h"
 
 #include <qtimer.h>

["arts_mcop_mt.patch" (text/x-diff)]

Index: Makefile.am
===================================================================
RCS file: /home/kde/arts/mcop_mt/Makefile.am,v
retrieving revision 1.7
diff -u -5 -p -d -r1.7 Makefile.am
--- Makefile.am	18 May 2002 12:20:37 -0000	1.7
+++ Makefile.am	20 Sep 2003 07:41:59 -0000
@@ -1,7 +1,7 @@
 INCLUDES = -I$(top_srcdir)/mcop -I$(top_srcdir)/flow -I$(top_builddir)/flow \
$(all_includes)  
 lib_LTLIBRARIES = libmcop_mt.la
 
 libmcop_mt_la_SOURCES = threads_posix.cc
-libmcop_mt_la_LIBADD = $(top_builddir)/mcop/libmcop.la $(LIBPTHREAD) $(LIBPOSIX4)
+libmcop_mt_la_LIBADD = $(top_builddir)/mcop/libmcop.la \
$(top_builddir)/flow/libartsflow.la $(LIBPTHREAD) $(LIBPOSIX4)  libmcop_mt_la_LDFLAGS \
= -no-undefined -version-info 1:0 $(USE_THREADS) 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic