[Kst] kst_planckio_branch: kdeextragear-2/kst
George Staikos
staikos at kde.org
Thu Oct 9 19:28:08 CEST 2003
CVS commit by staikos:
integrate libpio and enable planckio builds. also workaround some pio flaws.
M +13 -0 configure.in.in 1.2.2.1
M +2 -2 kst/Makefile.am 1.42.2.2
M +2 -0 kst/planck.h 1.1.2.3
M +10 -6 kst/plancktoi.cpp 1.1.2.4
--- kdeextragear-2/kst/configure.in.in #1.2:1.2.2.1
@@ -6,2 +6,15 @@
AC_LANG_RESTORE
dnl AC_OUTPUT(kst/kst.spec)
+
+
+KDE_CHECK_HEADER(HL2_PIOLIB/PIOLib.h, AC_DEFINE(HAVE_PIOLIB_H, 1, [If we have piolib headers]) have_piolib_h=yes, , )
+
+KDE_CHECK_LIB(piolib, PIOCloseTOI, KST_LIBS="-lpiolib $KST_LIBS", , )
+AC_SUBST(KST_LIBS)
+
+if test $ac_cv_lib_piolib_PIOCloseTOI = yes; then
+ if test $have_piolib_h = yes; then
+ AC_DEFINE(KST_HAVE_PLANCK, 1, [If we have the PLANCK I/O libraries.])
+ fi
+fi
+
--- kdeextragear-2/kst/kst/Makefile.am #1.42.2.1:1.42.2.2
@@ -7,5 +7,5 @@
d2asc_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-d2asc_LDADD = $(LIB_KDECORE)
+d2asc_LDADD = $(LIB_KDECORE) $(KST_LIBS)
d2asc_SOURCES = \
@@ -99,5 +99,5 @@
main.cpp
-kst_LDADD = $(LIB_KIO) $(LIB_KDEPRINT)
+kst_LDADD = $(LIB_KIO) $(LIB_KDEPRINT) $(KST_LIBS)
kst_LDFLAGS = $(all_libraries) $(KDE_RPATH)
--- kdeextragear-2/kst/kst/planck.h #1.1.2.2:1.1.2.3
@@ -19,4 +19,6 @@
#define _KST_PLANCK_H
+#include <config.h>
+
#include <ksharedptr.h>
--- kdeextragear-2/kst/kst/plancktoi.cpp #1.1.2.3:1.1.2.4
@@ -17,4 +17,6 @@
+#include <assert.h>
+
#include "plancktoi.h"
@@ -41,5 +43,5 @@ class Planck::TOIGroup {
PIOLONG *lastIndex;
- PIOGROUP *_group;
+ PIOGroup *_group;
#endif
bool _valid;
@@ -91,5 +93,5 @@ QStringList TOI::fields(const QString& g
assert(tg);
for (PIOINT i = 0; i < tg->objectListSize; ++i) {
- rc += objectNameList[i];
+ rc += tg->objectNameList[i];
}
}
@@ -104,9 +106,9 @@ int TOI::readObject(const QString& group
#ifdef KST_HAVE_PLANCK
if (isValid()) {
- if (!_groups.contains(group)) {
+ if (!_groupInfo.contains(group)) {
return 0;
}
- const TOIGroup *g = _groups[group];
+ const TOIGroup *g = _groupInfo[group];
assert(g);
@@ -132,5 +134,5 @@ int TOI::readObject(const QString& group
}
- int n = PIOReadTOIObject(&buf, object.latin1(), g->objectNameList[i], "PIODOUBLE", range.latin1(), g->_group);
+ int n = PIOReadTOIObject((void**)&buf, g->objectNameList[i], const_cast<char*>("PIODOUBLE"), const_cast<char*>(range.latin1()), g->_group);
if (n < 0) { // error
// FIXME - might have to reset() here
@@ -199,5 +201,7 @@ bool TOIGroup::open(const QString& group
close();
- _group = PIOOpenTOIGrp(groupURL, "r");
+ // API bug
+ _group = PIOOpenTOIGrp(const_cast<char*>(groupURL.latin1()), const_cast<char*>("r"));
+
if (_group) {
PIOSTRING roiGroup;
More information about the Kst
mailing list