Hello community, here is the log from the commit of package libdxfrw for openSUSE:Factory checked in at 2014-08-11 10:07:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdxfrw (Old) and /work/SRC/openSUSE:Factory/.libdxfrw.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdxfrw" Changes: -------- --- /work/SRC/openSUSE:Factory/libdxfrw/libdxfrw.changes 2014-05-10 22:57:56.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libdxfrw.new/libdxfrw.changes 2014-08-11 10:07:46.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Aug 8 20:17:24 UTC 2014 - asterios.dra...@gmail.com + +- Update to version 0.5.12: + * Detailed changelog not available. + +------------------------------------------------------------------- Old: ---- libdxfrw-0.5.11.tar.bz2 New: ---- libdxfrw-0.5.12.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdxfrw.spec ++++++ --- /var/tmp/diff_new_pack.cw5Ict/_old 2014-08-11 10:07:47.000000000 +0200 +++ /var/tmp/diff_new_pack.cw5Ict/_new 2014-08-11 10:07:47.000000000 +0200 @@ -20,13 +20,12 @@ %define so_ver 0 Name: libdxfrw -Version: 0.5.11 +Version: 0.5.12 Release: 0 Summary: Library to read and write DXF files License: GPL-2.0+ Group: Development/Libraries/C and C++ Url: http://sourceforge.net/p/libdxfrw/home/Home/ - Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 BuildRequires: gcc-c++ BuildRequires: pkg-config ++++++ libdxfrw-0.5.11.tar.bz2 -> libdxfrw-0.5.12.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-0.5.11/configure new/libdxfrw-0.5.12/configure --- old/libdxfrw-0.5.11/configure 2013-12-29 11:38:16.000000000 +0100 +++ new/libdxfrw-0.5.12/configure 2014-06-29 10:17:18.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libdxfrw 0.5.11. +# Generated by GNU Autoconf 2.69 for libdxfrw 0.5.12. # # Report bugs to <https://sourceforge.net/projects/libdxfrw/>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='libdxfrw' PACKAGE_TARNAME='libdxfrw' -PACKAGE_VERSION='0.5.11' -PACKAGE_STRING='libdxfrw 0.5.11' +PACKAGE_VERSION='0.5.12' +PACKAGE_STRING='libdxfrw 0.5.12' PACKAGE_BUGREPORT='https://sourceforge.net/projects/libdxfrw/' PACKAGE_URL='' @@ -1320,7 +1320,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libdxfrw 0.5.11 to adapt to many kinds of systems. +\`configure' configures libdxfrw 0.5.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1390,7 +1390,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libdxfrw 0.5.11:";; + short | recursive ) echo "Configuration of libdxfrw 0.5.12:";; esac cat <<\_ACEOF @@ -1496,7 +1496,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libdxfrw configure 0.5.11 +libdxfrw configure 0.5.12 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2040,7 +2040,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libdxfrw $as_me 0.5.11, which was +It was created by libdxfrw $as_me 0.5.12, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2864,7 +2864,7 @@ # Define the identity of the package. PACKAGE='libdxfrw' - VERSION='0.5.11' + VERSION='0.5.12' cat >>confdefs.h <<_ACEOF @@ -15236,7 +15236,7 @@ # #AGE.CURRENT.REVISION LIBRARY_CURRENT=5 -LIBRARY_REVISION=11 +LIBRARY_REVISION=12 LIBRARY_AGE=0 @@ -16107,7 +16107,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libdxfrw $as_me 0.5.11, which was +This file was extended by libdxfrw $as_me 0.5.12, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16164,7 +16164,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libdxfrw config.status 0.5.11 +libdxfrw config.status 0.5.12 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-0.5.11/configure.ac new/libdxfrw-0.5.12/configure.ac --- old/libdxfrw-0.5.11/configure.ac 2013-12-29 11:37:22.000000000 +0100 +++ new/libdxfrw-0.5.12/configure.ac 2014-06-29 10:09:39.000000000 +0200 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.63]) -AC_INIT([libdxfrw], [0.5.11], [https://sourceforge.net/projects/libdxfrw/]) +AC_INIT([libdxfrw], [0.5.12], [https://sourceforge.net/projects/libdxfrw/]) AM_INIT_AUTOMAKE([foreign -Wall -Werror dist-bzip2]) AC_CONFIG_SRCDIR([src/drw_interface.h]) @@ -37,7 +37,7 @@ # #AGE.CURRENT.REVISION LIBRARY_CURRENT=5 -LIBRARY_REVISION=11 +LIBRARY_REVISION=12 LIBRARY_AGE=0 AC_SUBST(LIBRARY_CURRENT)dnl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-0.5.11/makefile.mingw new/libdxfrw-0.5.12/makefile.mingw --- old/libdxfrw-0.5.11/makefile.mingw 2013-12-29 11:37:22.000000000 +0100 +++ new/libdxfrw-0.5.12/makefile.mingw 2014-06-29 10:10:01.000000000 +0200 @@ -4,7 +4,7 @@ ####### Compiler, tools and options -VERSION = 0.5.11 +VERSION = 0.5.12 CC = gcc CXX = g++ DEFINES = -DUNICODE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-0.5.11/src/drw_base.h new/libdxfrw-0.5.12/src/drw_base.h --- old/libdxfrw-0.5.11/src/drw_base.h 2013-12-29 11:37:22.000000000 +0100 +++ new/libdxfrw-0.5.12/src/drw_base.h 2014-06-29 10:10:42.000000000 +0200 @@ -13,7 +13,7 @@ #ifndef DRW_BASE_H #define DRW_BASE_H -#define DRW_VERSION "0.5.11" +#define DRW_VERSION "0.5.12" #include <string> #include <cmath> @@ -148,20 +148,26 @@ DRW_Variant() { type = INVALID; } + DRW_Variant(const DRW_Variant& d) { + code = d.code; + type = d.type; + if (d.type == COORD) vdata = d.vdata; + if (d.type == STRING) sdata = d.sdata; + content = d.content; + } + ~DRW_Variant() { - if (type == COORD) - delete content.v; } - enum TYPE type; - void addString(UTF8STRING s) {setType(STRING); data = s; content.s = &data;} + void addString(UTF8STRING s) {setType(STRING); sdata = s; content.s = &sdata;} void addInt(int i) {setType(INTEGER); content.i = i;} void addDouble(double d) {setType(DOUBLE); content.d = d;} - void addCoord(DRW_Coord *v) {setType(COORD); content.v = v;} - void setType(enum TYPE t) { if (type == COORD) delete content.v; type = t;} - void setCoordX(double d) { if (type == COORD) content.v->x = d;} - void setCoordY(double d) { if (type == COORD) content.v->y = d;} - void setCoordZ(double d) { if (type == COORD) content.v->z = d;} + void addCoord() {setType(COORD); vdata.x=0.0; vdata.y=0.0; vdata.z=0.0; content.v = &vdata;} + void addCoord(DRW_Coord v) {setType(COORD); vdata = v; content.v = &vdata;} + void setType(enum TYPE t) { type = t;} + void setCoordX(double d) { if (type == COORD) vdata.x = d;} + void setCoordY(double d) { if (type == COORD) vdata.y = d;} + void setCoordZ(double d) { if (type == COORD) vdata.z = d;} private: typedef union { @@ -173,14 +179,12 @@ public: DRW_VarContent content; + enum TYPE type; + int code; /*!< dxf code of this value*/ -public: - int code; -// string version; -// string codepage; private: -// DRW_VarContent content; - std::string data; + std::string sdata; + DRW_Coord vdata; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-0.5.11/src/drw_objects.cpp new/libdxfrw-0.5.12/src/drw_objects.cpp --- old/libdxfrw-0.5.11/src/drw_objects.cpp 2013-12-29 11:34:59.000000000 +0100 +++ new/libdxfrw-0.5.12/src/drw_objects.cpp 2014-06-29 10:06:53.000000000 +0200 @@ -567,7 +567,7 @@ curr->code = code; break; case 10: - curr->addCoord(new DRW_Coord()); + curr->addCoord(); curr->setCoordX(reader->getDouble()); curr->code = code; break; @@ -922,6 +922,34 @@ #endif } +void DRW_Header::addDouble(std::string key, double value, int code){ + curr = new DRW_Variant(); + curr->addDouble( value ); + curr->code = code; + vars[key] =curr; +} + +void DRW_Header::addInt(std::string key, int value, int code){ + curr = new DRW_Variant(); + curr->addInt( value ); + curr->code = code; + vars[key] =curr; +} + +void DRW_Header::addStr(std::string key, std::string value, int code){ + curr = new DRW_Variant(); + curr->addString( value ); + curr->code = code; + vars[key] =curr; +} + +void DRW_Header::addCoord(std::string key, DRW_Coord value, int code){ + curr = new DRW_Variant(); + curr->addCoord( value ); + curr->code = code; + vars[key] =curr; +} + bool DRW_Header::getDouble(std::string key, double *varDouble){ bool result = false; std::map<std::string,DRW_Variant *>::iterator it; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-0.5.11/src/drw_objects.h new/libdxfrw-0.5.12/src/drw_objects.h --- old/libdxfrw-0.5.11/src/drw_objects.h 2013-12-29 11:34:59.000000000 +0100 +++ new/libdxfrw-0.5.12/src/drw_objects.h 2014-06-29 10:06:53.000000000 +0200 @@ -187,10 +187,6 @@ size = 0; length = 0.0; pathIdx = 0; -/* color = 256; // default BYLAYER (256) - plotF = true; // default TRUE (plot yes) - lWeight = -1; // default BYLAYER (-1)*/ -// align = 65; //always 65 } void parseCode(int code, dxfReader *reader); @@ -229,10 +225,10 @@ void parseCode(int code, dxfReader *reader); public: - UTF8STRING lineType; /*!< line type, code 6 */ - int color; /*!< layer color, code 62 */ - int color24; /*!< 24-bit color, code 420 */ - bool plotF; /*!< Plot flag, code 290 */ + UTF8STRING lineType; /*!< line type, code 6 */ + int color; /*!< layer color, code 62 */ + int color24; /*!< 24-bit color, code 420 */ + bool plotF; /*!< Plot flag, code 290 */ enum DRW_LW_Conv::lineWidth lWeight; /*!< layer lineweight, code 370 */ std::string handlePlotS; /*!< Hard-pointer ID/handle of plotstyle, code 390 */ std::string handlePlotM; /*!< Hard-pointer ID/handle of materialstyle, code 347 */ @@ -347,7 +343,7 @@ public: std::string handle; /*!< entity identifier, code 5 */ - UTF8STRING name; /*!< File name of image, code 1 */ + UTF8STRING name; /*!< File name of image, code 1 */ int version; /*!< class version, code 90, 0=R14 version */ double u; /*!< image size in pixels U value, code 10 */ double v; /*!< image size in pixels V value, code 20 */ @@ -362,7 +358,9 @@ //! Class to handle header entries /*! -* Class to handle layer symbol table entries +* Class to handle header vars, to read iterate over "std::map vars" +* to write add a DRW_Variant* into "std::map vars" (do not delete it, are cleared in dtor) +* or use add* helper functions. * @author Rallaz */ class DRW_Header { @@ -370,13 +368,21 @@ DRW_Header() { } ~DRW_Header() { + for (std::map<std::string,DRW_Variant*>::iterator it=vars.begin(); it!=vars.end(); ++it) + delete it->second; + vars.clear(); } + void addDouble(std::string key, double value, int code); + void addInt(std::string key, int value, int code); + void addStr(std::string key, std::string value, int code); + void addCoord(std::string key, DRW_Coord value, int code); + std::string getComments() const {return comments;} + void parseCode(int code, dxfReader *reader); void write(dxfWriter *writer, DRW::Version ver); void addComment(std::string c); - std::string getComments() const {return comments;} private: bool getDouble(std::string key, double *varDouble); bool getInt(std::string key, int *varInt); @@ -388,7 +394,7 @@ private: std::string comments; std::string name; - DRW_Variant *curr; + DRW_Variant* curr; int version; //to use on read }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-0.5.11/src/libdxfrw.cpp new/libdxfrw-0.5.12/src/libdxfrw.cpp --- old/libdxfrw-0.5.11/src/libdxfrw.cpp 2013-12-29 11:36:28.000000000 +0100 +++ new/libdxfrw-0.5.12/src/libdxfrw.cpp 2014-06-29 10:06:53.000000000 +0200 @@ -48,7 +48,12 @@ dxfRW::~dxfRW(){ if (reader != NULL) delete reader; + if (writer != NULL) + delete writer; + for (std::vector<DRW_ImageDef*>::iterator it=imageDef.begin(); it!=imageDef.end(); ++it) + delete *it; + imageDef.clear(); } bool dxfRW::read(DRW_Interface *interface_, bool ext){ -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org