[Kst] [Bug 96039] d2asc crashes on dirfiles
George Staikos
staikos at kde.org
Wed Jan 5 06:31:25 CET 2005
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=96039
------- Additional Comments From staikos kde org 2005-01-05 06:31 -------
CVS commit by staikos:
Fix most of the dirfile crash problems, but not all of it. It crashes on exit
now.
CCBUG: 96039
M +32 -0 d2asc.cpp 1.18
--- kdeextragear-2/kst/kst/d2asc.cpp #1.17:1.18
@ -1,7 +1,28 @
+/***************************************************************************
+ d2asc.cpp
+ -------------------
+ begin : Tue Aug 22 13:46:13 CST 2000
+ copyright : (C) 2000 by Barth Netterfield
+ email :
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
#include <stdlib.h> // atoi
+#include <kconfig.h>
#include <kinstance.h>
+// hack to make main() a friend of kstdatasource
+#define protected public
#include "kstrvector.h"
#include "kstdatacollection.h"
+#undef protected
void Usage() {
@ -12,9 +33,20 @ void Usage() {
}
+
+static void exitHelper() {
+ KST::vectorList.clear();
+ KST::scalarList.clear();
+ KST::dataObjectList.clear();
+}
+
int main(int argc, char *argv[]) {
+ atexit(exitHelper);
KInstance inst("d2asc");
KstDataSourcePtr file;
int i;
+ KConfig *kConfigObject = new KConfig("kstdatarc", false, false);
+ KstDataSource::setupOnStartup(kConfigObject);
+
char field_list[40][120], filename[180];
bool do_hex[40];
More information about the Kst
mailing list