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

List:       kde-commits
Subject:    kdepim/kpilot
From:       Adriaan de Groot <groot () kde ! org>
Date:       2004-05-12 20:53:14
Message-ID: 20040512205314.323641CC2 () office ! kde ! org
[Download RAW message or body]

CVS commit by adridg: 

Deal with incompatible changes in pilot-link 0.12 in a compatible way, I hope.


  M +2 -2      kpilot/interactiveSync.cc   1.30
  M +2 -10     lib/kpilotlink.cc   1.56
  M +16 -6     lib/options.h   1.45
  M +1 -2      lib/pilotDatabase.h   1.18
  M +2 -2      lib/pilotLocalDatabase.cc   1.26
  M +2 -6      lib/pilotLocalDatabase.h   1.27
  M +3 -3      lib/pilotSerialDatabase.cc   1.23
  M +4 -2      lib/pilotSysInfo.h   1.6


--- kdepim/kpilot/kpilot/interactiveSync.cc  #1.29:1.30
@@ -379,5 +379,5 @@ RestoreAction::RestoreAction(KPilotDevic
         for (int i = 0; i < max; i++)
         {
-                int size;
+                PI_SIZE_T size;
 
                 if (dbi.flags & dlpDBFlagResource)

--- kdepim/kpilot/lib/kpilotlink.cc  #1.55:1.56
@@ -33,12 +33,4 @@ static const char *kpilotlink_id = "$Id$
 #include <pi-dlp.h>
 #include <pi-file.h>
-#include <pi-version.h>
-
-#ifndef PILOT_LINK_VERSION
-#error "You need at least pilot-link version 0.9.5"
-#endif
-
-#define PILOT_LINK_NUMBER       ((100*PILOT_LINK_VERSION) + \
-                                PILOT_LINK_MAJOR)
 
 #include <sys/stat.h>
@@ -685,5 +677,5 @@ void KPilotDeviceLink::addSyncLogEntry(c
         QString t(entry);
 
-#if (PILOT_LINK_VERSION * 1000 + PILOT_LINK_MAJOR * 10 + PILOT_LINK_MINOR) < 110
+#if PILOT_LINK_NUMBER < 1100
         t.append("X");
 #endif

--- kdepim/kpilot/lib/options.h  #1.44:1.45
@@ -41,14 +41,10 @@
 // #define QT_NO_ASCII_CAST             (1)
 // #define QT_NO_CAST_ASCII             (1)
-//#define DEBUG                         (1)
+// #define DEBUG                        (1)
 // #define DEBUG_CERR                   (1)
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
-
-#ifndef QT_VERSION
 #include <qglobal.h>
-#endif
+#include <pi-version.h>
 
 #if (QT_VERSION < 0x030200)
@@ -64,4 +60,18 @@
 #endif
 
+
+#ifndef PILOT_LINK_VERSION
+#error "You need at least pilot-link version 0.9.5"
+#endif
+
+#define PILOT_LINK_NUMBER       ((1000*PILOT_LINK_VERSION) + \
+                                (100*PILOT_LINK_MAJOR)+PILOT_LINK_MINOR)
+#if PILOT_LINK_NUMBER < 1200
+#define PI_SIZE_T int
+#else
+#define PI_SIZE_T size_t
+#endif
+
+
 // Turn ON as much debugging as possible with -DDEBUG -DDEBUG_CERR
 // Some systems have changed kdWarning() and kdDebug() into nops,

--- kdepim/kpilot/lib/pilotDatabase.h  #1.17:1.18
@@ -71,6 +71,5 @@ public:
         virtual ~PilotDatabase();
 
-        enum { MAX_APPINFO_SIZE=8192
-                } Constants;
+        static const int MAX_APPINFO_SIZE=8192;
 
 

--- kdepim/kpilot/lib/pilotLocalDatabase.cc  #1.25:1.26
@@ -548,5 +548,5 @@ void PilotLocalDatabase::openDatabase()
         void *tmpBuffer;
         pi_file *dbFile;
-        size_t size;
+        PI_SIZE_T size;
         int attr, cat;
         pi_uid_t id;

--- kdepim/kpilot/lib/pilotLocalDatabase.h  #1.26:1.27
@@ -29,9 +29,5 @@
 */
 
-// Database class for a local (file based) pilot datbase.
-
-#include <time.h>       /* for broken pilot-link libraries */
-
-#include <pi-macros.h>  /* for recordid_t */
+#include "options.h"    /* for PI_SIZE_T */
 
 #include "pilotDatabase.h"
@@ -150,5 +146,5 @@ private:
         QString fPathName,fDBName;
         char*       fAppInfo;
-        size_t      fAppLen;
+        PI_SIZE_T   fAppLen;
         int         fNumRecords;
         int         fCurrentRecord;

--- kdepim/kpilot/lib/pilotSerialDatabase.cc  #1.22:1.23
@@ -137,5 +137,5 @@ PilotRecord *PilotSerialDatabase::readRe
         char buffer[PilotRecord::APP_BUFFER_SIZE];
         int index, attr, category;
-        size_t size;
+        PI_SIZE_T size;
 
         if (isDBOpen() == false)
@@ -161,5 +161,5 @@ PilotRecord *PilotSerialDatabase::readRe
         FUNCTIONSETUP;
         char buffer[PilotRecord::APP_BUFFER_SIZE];
-        size_t size;
+        PI_SIZE_T size;
         int attr, category;
         recordid_t id;

--- kdepim/kpilot/lib/pilotSysInfo.h  #1.5:1.6
@@ -29,4 +29,6 @@
 */
 
+#include "options.h"
+
 #include <stdlib.h>
 #include <string.h>
@@ -34,5 +36,5 @@
 
 #include <pi-dlp.h>
-#include <pi-version.h>
+
 
 class KPilotSysInfo
@@ -58,5 +60,5 @@ public:
         void setLocale(unsigned long newval)  {fSysInfo.locale=newval;}
 
-#if (PILOT_LINK_VERSION * 1000 + PILOT_LINK_MAJOR * 10 + PILOT_LINK_MINOR) < 100
+#if PILOT_LINK_NUMBER < 1100
 // Older pilot-link versions < 0.11.x don't have prodID, but name instead,
 // and they also do not have the *Version members.


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

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