From kde-core-devel Sat Sep 20 07:47:14 2003 From: Marcus Camen Date: Sat, 20 Sep 2003 07:47:14 +0000 To: kde-core-devel Subject: [PATCH] Compile fixes for MipsPro, aCC X-MARC-Message: https://marc.info/?l=kde-core-devel&m=106404413225294 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_CYAb/638GzYeQzK" --Boundary-00=_CYAb/638GzYeQzK Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =2D----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=20 tested on these platforms and on Linux / GCC 3.2. Please review. Are there any objections? I would like to commit them to=20 HEAD first and a few days later to the BRANCH. Details: =2D - kde-common-admin.patch: If you use ./configure --disable-libsuffix you get a shell variable=20 'kdelibsuff=3Dno'. The problem is that kdelibsuff is compared with 'none'=20 later in the code. This leads to /usr/libno instead of /usr/lib. =2D - arts_flow_gsl.patch: This looks like a typo. GCC doesn't care but it breaks with picky=20 compilers. =2D - arts_mcop_mt.patch: Well on Linux linking against libartsflow is not excessary, but on other=20 platforms it is. Looking at the code one can see some #ifdef lines so I=20 assume the code depending on libartsflow is not reached on every=20 platform. Hmmm... =2D - kdelibs_kdecore_kextsock.patch: Necessary for aCC. I do not see any potential problems here. =2D - kdelibs_kdecore_kicontheme.patch: Non-GCC compiler are pickier... =2D - kdelibs_kio_misc_kdesasl.patch: Is this ok? Looks like a platform independent bug then. =2D - kdebase_kcontrol_kfontinst.patch: Adds missing std:: and replaces #include with #include You may want to review the const changes. =2D - kdebase_khelpcenter.patch: std:: again =2D - kdebase_kicker_applets_clock.patch: removing unnecessary STL includes =2D -kdebase_kioslave_nfs.patch: missing #includes =2D - kdebase_kioslave_thumbnail.patch: remove one #include =2D - kdebase_ksysguard.patch: =46ixes for the IRIX only code =2D -kdebase_kwin_clients_keramik.patch: -> and a missing Qt include =2D - kdebase_kxkb.patch: added missing Qt include and X11 libraries =2D -- Thanx Marcus =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/bAYClP3stiSSHvoRAlEXAJ9j9A7e9RhimH7kDY/p2ZfEpjsUDQCfe963 MrxYndyRzQmEhc2T4e62LXY=3D =3Dn4oL =2D----END PGP SIGNATURE----- --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="arts_flow_gsl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="arts_flow_gsl.patch" 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; --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdebase_kioslave_nfs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase_kioslave_nfs.patch" 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 #include #include #include +#include #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 #include +#include #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 #include +#include #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 --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdebase_kioslave_thumbnail.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase_kioslave_thumbnail.patch" 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 #include #include #include -#include #include #include #include #include --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdebase_ksysguard.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase_ksysguard.patch" 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); --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdebase_kwin_clients_keramik.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase_kwin_clients_keramik.patch" 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 #include #include #include -#include +#include 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 #include #include #include +#include #include #include #include #include "../../workspace.h" --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdebase_kxkb.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase_kxkb.patch" 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 --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kde-common_admin.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kde-common_admin.patch" 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) --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdelibs_kdecore_kextsock.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdelibs_kdecore_kextsock.patch" 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 #include #include #include +#include #include #ifdef HAVE_RES_INIT # include # include +extern "C" int res_init(); #endif #include #include #include --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdelibs_kdecore_kicontheme.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdelibs_kdecore_kicontheme.patch" 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. */ --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdelibs_kio_misc_kdesasl.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdelibs_kio_misc_kdesasl.patch" 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); --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdebase_kcontrol_kfontinst.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase_kcontrol_kfontinst.patch" 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 &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 #include -#include +#include // 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 #include #include -#include -#include +#include +#include #include #include #include #include #include @@ -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(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(end)='\0'; return s; } } else if(NULL!=(s=strchr(token, '\"'))) { s++; if(NULL!=(end=strchr(s, '\"'))) { - *end='\0'; + //Yuck + *const_cast(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 +#include #include #include 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::getKerningData(const QString &nameAndPath) { QPtrList *list=NULL; - ifstream ttf(nameAndPath.local8Bit()); + std::ifstream ttf(nameAndPath.local8Bit()); if(ttf) { if(locateTable(ttf, "kern")) { @@ -180,11 +181,11 @@ QPtrList * 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::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 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; --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdebase_khelpcenter.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase_khelpcenter.patch" 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::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::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& L = pParentNode->m_lChildren; L.splice(L.begin(), m_lNodes, m_lNodes.begin(), itAfterChildren); for (std::list::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::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::iterator itPrev = itStart; --itPrev; std::list::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; --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="kdebase_kicker_applets_clock.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdebase_kicker_applets_clock.patch" 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 -#include -#include - #include "clock.h" #include "datepicker.h" #include "settings.h" #include --Boundary-00=_CYAb/638GzYeQzK Content-Type: text/x-diff; charset="iso-8859-15"; name="arts_mcop_mt.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="arts_mcop_mt.patch" 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) --Boundary-00=_CYAb/638GzYeQzK--