[Kst] kdeextragear-2/kst [POSSIBLY UNSAFE]

George Staikos staikos at kde.org
Fri Jul 18 22:34:17 CEST 2003


CVS commit by staikos: 

bump version number to indicate post 0.91, add code for saving vectors (unused).
Also fill in the about data some.


  M +1 -1      kst.lsm   1.4
  M +1 -1      kst.spec.in   1.4
  M +15 -0     kst/kstvector.cpp   1.38 [POSSIBLY UNSAFE: printf]
  M +4 -0      kst/kstvector.h   1.31
  M +13 -11    kst/main.cpp   1.30


--- kdeextragear-2/kst/kst.lsm  #1.3:1.4
@@ -1,5 +1,5 @@
 Begin3
 Title:          Kst 
-Version:        0.91
+Version:        0.92-devel
 Entered-date:   
 Description:    A data viewing program.

--- kdeextragear-2/kst/kst.spec.in  #1.3:1.4
@@ -5,5 +5,5 @@
 Summary: A data viewing program for KDE.
 Name: kst
-Version: 0.91
+Version: 0.92-devel
 Release: 1
 Source0: kst-%{version}.tar.gz

--- kdeextragear-2/kst/kst/kstvector.cpp  #1.37:1.38
@@ -349,2 +349,17 @@ return xv;
 }
 
+
+int KstVector::toFile(QFile *f) const {
+int rc = 0;
+#define BSIZE 128
+char buf[BSIZE];
+
+  for (int i = 0; i < _size; i++) {
+    int l = snprintf(buf, BSIZE, "%d %g\n", i, _v[i]);
+    f->writeBlock(buf, l);
+  }
+#undef BSIZE
+return rc;
+}
+
+

--- kdeextragear-2/kst/kst/kstvector.h  #1.30:1.31
@@ -22,4 +22,5 @@
 #include <qdom.h>
 #include <qdict.h>
+#include <qfile.h>
 
 #include "kstobject.h"
@@ -112,4 +113,7 @@ public:
   /** Generate a new vector [x0..x1] with n total points */
   static KstVectorPtr generateVector(double x0, double x1, int n, const QString& tag);
+
+  /** Write a vector to a QFile */
+  virtual int toFile(QFile *f) const;
 
 protected: // Protected attributes

--- kdeextragear-2/kst/kst/main.cpp  #1.29:1.30
@@ -189,6 +189,5 @@ KstRVectorPtr CreateVector(QString field
   if (!vector->isValid()) {
     kdError() << I18N_NOOP("Error: Invalid field: ") << vector->getField()
-         << "\n"
-         << I18N_NOOP("File: ") << vector->getFilename() << "\n";
+         << endl << I18N_NOOP("File: ") << vector->getFilename() << endl;
     exit(0);
   }
@@ -205,13 +204,18 @@ int main(int argc, char *argv[]) {
   int i_file, i_v, i_curve;
   int i_plot;
-  //bool sep_plots;
-  //int n_cols, n_rows, n_plots;
-  //bool has_points = false;
 
   KAboutData aboutData( "kst", I18N_NOOP("Kst"),
-                        "0.91", description, KAboutData::License_GPL,
-                        "(c) 2000-2003 Barth Netterfield");
-  aboutData.addAuthor("Barth Netterfield", 0, "");
-  aboutData.addAuthor("The University of Toronto", 0, "");
+                        "0.92-devel", description, KAboutData::License_GPL,
+                        I18N_NOOP("(c) 2000-2003 Barth Netterfield"),
+                        0,
+                        "http://extragear.kde.org/apps/kst.php");
+  aboutData.addAuthor("Barth Netterfield",
+                      I18N_NOOP("Original author and maintainer."),
+                      "netterfield at astro.utoronto.ca",
+                      "http://omega.astro.utoronto.ca/");
+  aboutData.addAuthor("Staikos Computing Services Inc.",
+                      I18N_NOOP("Developed for the University of Toronto."),
+                      "info at staikos.net",
+                      "http://www.staikos.net/");
 
   KCmdLineArgs::init( argc, argv, &aboutData );
@@ -220,6 +224,4 @@ int main(int argc, char *argv[]) {
   KApplication app;
   KImageIO::registerFormats();
-
-//  app.dcopClient()->registerAs(app.name());
 
   if (app.isRestored()) {




More information about the Kst mailing list