You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(27) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
From: Knut F. <Knu...@gm...> - 2010-11-01 17:53:56
|
[2010-10-30 16:39] Miquel Garriga <gbm...@gm...>: > opj2dat.cpp | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Very good idea! > +# Command line utility opj2dat. Activate with: qmake -config utils liborigin2.pro Library and opj2dat should really be built in one step instead of requiring a magic qmake incantation to switch between them. Again, there doesn't seem to be a particularly good way of doing this with qmake (other than creating a subdirectory just for opj2dat.cpp). The CMakeLists.txt included in prior liborigin versions does build both library and opj2dat. Knut |
From: Knut F. <Knu...@gm...> - 2010-11-01 17:27:22
|
[ Sorry for not replying properly; I managed to screw up my first subscription attempt and didn't receive the first three mails. ] > +targeta.path = $$INSTALLBASE/lib/liborigin2 [...] > +targeta.files = liborigin2.a As far as I can see, qmake can build either a static or a dynamic library, but not both at the same time. Adding just this installation target will install whatever liborigin2.a happens to be lieing around from the last time qmake;make was run with CONFIG+=staticlib enabled, which is not a good idea IMHO. Instead of trying to work around the various shortcomings of qmake, I'd suggest resurrecting CMakeLists.txt from commit f19437 (with a suitably updated VERSION). This is also a much smaller dependency than Qt (assuming someone wants to use liborigin in a non-Qt context), and LabPlot2 / future SciDAVis will most likely be using CMake anyway. Knut |
From: Miquel G. <gbm...@gm...> - 2010-10-30 16:39:55
|
--- liborigin2.pro | 10 +++++ opj2dat.cpp | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 opj2dat.cpp diff --git a/liborigin2.pro b/liborigin2.pro index e679637..72d6c73 100644 --- a/liborigin2.pro +++ b/liborigin2.pro @@ -47,3 +47,13 @@ INSTALLS = target headers targeta # Avoid link against Qt gui modules QT -= core gui + +# Command line utility opj2dat. Activate with: qmake -config utils liborigin2.pro +utils { +TEMPLATE = app +TARGET = opj2dat +SOURCES = opj2dat.cpp +HEADERS = OriginFile.h OriginParser.h OriginObj.h tree.hh +PRE_TARGETDEPS = liborigin2.a +LIBS = liborigin2.a +} diff --git a/opj2dat.cpp b/opj2dat.cpp new file mode 100644 index 0000000..1745624 --- /dev/null +++ b/opj2dat.cpp @@ -0,0 +1,115 @@ +/*************************************************************************** + File : opj2dat.cpp + -------------------------------------------------------------------- + Copyright : (C) 2008 Stefan Gerlach + Email (use @ for *) : stefan.gerlach*uni-konstanz.de + Description : Origin project converter + + ***************************************************************************/ + +/*************************************************************************** + * * + * 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. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the Free Software * + * Foundation, Inc., 51 Franklin Street, Fifth Floor, * + * Boston, MA 02110-1301 USA * + * * + ***************************************************************************/ + +#include "OriginFile.h" +#include <cstdio> +#include <cmath> +#include <cstring> +#include <string.h> + +int main(int argc, char *argv[]) { + if(argc != 2) { + printf("Usage : ./opj2dat <file.opj>\n"); + return -1; + } + + printf("opj2dat %s, Copyright (C) 2008 Stefan Gerlach\n",LIBORIGIN_VERSION_STRING); + + if(!strcmp(argv[1],"-v")) + return 0; + + OriginFile opj(argv[1]); + int status = opj.parse(); + printf("Parsing status = %d\n",status); + printf("OPJ PROJECT \"%s\" VERSION = %.2f\n",argv[1],opj.version()); + + printf("number of spreadsheets = %d\n",opj.spreadCount()); + printf("number of matrixes = %d\n",opj.matrixCount()); + printf("number of functions = %d\n",opj.functionCount()); + printf("number of graphs = %d\n",opj.graphCount()); + printf("number of notes = %d\n",opj.noteCount()); + for (unsigned int s=0;s<opj.spreadCount();s++) { + Origin::SpreadSheet spread = opj.spread(s); + int columnCount=spread.columns.size(); + printf("Spreadsheet %d :\n", s+1); + printf(" Name: %s\n",spread.name.c_str()); + printf(" Label: %s\n",spread.label.c_str()); + printf(" Columns: %d\n",columnCount); + for (int j=0;j<columnCount;j++) { + Origin::SpreadColumn column = spread.columns[j]; + printf(" Column %d : %s / type : %d, rows : %d\n", + j+1,column.name.c_str(),column.type,spread.maxRows); + } + FILE *out; + char * filename; + int ioret; +#ifndef WIN32 + ioret=asprintf(&filename,"%s.%d.dat",argv[1],s+1); +#else + ioret=asprintf(&filename,"%s.%d.dat",basename(argv[1]),s+1); +#endif + printf("saved to %s\n",filename); + if((out=fopen(filename,"w")) == NULL ) { + printf("Could not open %s",filename); + return -1; + } + // header + for (int j=0;j<columnCount;j++) { + fprintf(out,"%s ",spread.columns[j].name.c_str()); + printf("%s ",spread.columns[j].name.c_str()); + } + fprintf(out,"\n"); + printf("\n Data: \n"); + // data + for (int i=0;i<(int)spread.maxRows;i++) { + for (int j=0;j<columnCount;j++) { + if (i<(int)spread.columns[j].data.size()) { + Origin::variant value=spread.columns[j].data[i]; + if(spread.columns[j].type == Origin::SpreadColumn::Label) { + fprintf(out,"%s ",boost::get<string>(spread.columns[j].data[i]).c_str()); + } else { + double v=0.; + if (value.type() == typeid(double)) { + v = boost::get<double>(value); + if(fabs(v)>2.0e-300) { + fprintf(out,"%g ",v); + } + } + if (value.type() == typeid(string)) { + fprintf(out,"%s ",boost::get<string>(value).c_str()); + } + } + } + } + fprintf(out,"\n"); + } + fclose(out); + } + return 0; +} + -- 1.7.3 |
From: Miquel G. <gbm...@gm...> - 2010-10-30 16:38:51
|
--- OriginFile.h | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OriginFile.h b/OriginFile.h index 6636cc3..979df74 100644 --- a/OriginFile.h +++ b/OriginFile.h @@ -30,9 +30,9 @@ #ifndef ORIGIN_FILE_H #define ORIGIN_FILE_H -/* version 0.0 2007-09-26 */ -#define LIBORIGIN_VERSION 0x00070926 -#define LIBORIGIN_VERSION_STRING "2007-09-26" +/* version 0.0 2010-10-29 */ +#define LIBORIGIN_VERSION 0x00101029 +#define LIBORIGIN_VERSION_STRING "2010-10-29" #include "OriginObj.h" #include "OriginParser.h" -- 1.7.3 |
From: Miquel G. <gbm...@gm...> - 2010-10-30 16:06:50
|
--- liborigin2.pro | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/liborigin2.pro b/liborigin2.pro index 50f4006..e679637 100644 --- a/liborigin2.pro +++ b/liborigin2.pro @@ -32,3 +32,18 @@ SOURCES += OriginFile.cpp \ Origin750Parser.cpp \ Origin800Parser.cpp \ Origin810Parser.cpp + +# Install directives +INSTALLBASE = /usr + +target.path = $$INSTALLBASE/lib/liborigin2 +headers.path = $$INSTALLBASE/include/liborigin2 +targeta.path = $$INSTALLBASE/lib/liborigin2 + +headers.files = OriginFile.h OriginObj.h OriginParser.h tree.hh +targeta.files = liborigin2.a + +INSTALLS = target headers targeta + +# Avoid link against Qt gui modules +QT -= core gui -- 1.7.3 |