Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libdxfrw for openSUSE:Factory checked in at 2022-09-26 18:48:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libdxfrw (Old) and /work/SRC/openSUSE:Factory/.libdxfrw.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libdxfrw" Mon Sep 26 18:48:22 2022 rev:14 rq:1006019 version:1.1.0~rc1+git.20220905 Changes: -------- --- /work/SRC/openSUSE:Factory/libdxfrw/libdxfrw.changes 2022-08-02 22:09:58.257907236 +0200 +++ /work/SRC/openSUSE:Factory/.libdxfrw.new.2275/libdxfrw.changes 2022-09-26 18:48:23.876076261 +0200 @@ -1,0 +2,6 @@ +Mon Sep 19 07:24:31 UTC 2022 - [email protected] + +- Update to version 1.1.0~rc1+git.20220905: + * inconsistent $MEASUREMENT/$INSUNITS variables, fixes LibreCAD/LibreCAD#636 + +------------------------------------------------------------------- Old: ---- libdxfrw-1.1.0~rc1+git.20220702.obscpio New: ---- libdxfrw-1.1.0~rc1+git.20220905.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libdxfrw.spec ++++++ --- /var/tmp/diff_new_pack.wNWhIa/_old 2022-09-26 18:48:24.420077288 +0200 +++ /var/tmp/diff_new_pack.wNWhIa/_new 2022-09-26 18:48:24.428077303 +0200 @@ -20,7 +20,7 @@ %define so_ver 1 Name: libdxfrw -Version: 1.1.0~rc1+git.20220702 +Version: 1.1.0~rc1+git.20220905 Release: 0 Summary: Library to read and write DXF files License: GPL-2.0-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.wNWhIa/_old 2022-09-26 18:48:24.468077379 +0200 +++ /var/tmp/diff_new_pack.wNWhIa/_new 2022-09-26 18:48:24.472077386 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/LibreCAD/libdxfrw/</param> - <param name="changesrevision">419381d2404c8c881f876986e7fbcdc27b8625e3</param></service></servicedata> + <param name="changesrevision">e0dad4ceff7f56e530b753a376f7dfe272a9cc63</param></service></servicedata> (No newline at EOF) ++++++ libdxfrw-1.1.0~rc1+git.20220702.obscpio -> libdxfrw-1.1.0~rc1+git.20220905.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-1.1.0~rc1+git.20220702/src/drw_header.cpp new/libdxfrw-1.1.0~rc1+git.20220905/src/drw_header.cpp --- old/libdxfrw-1.1.0~rc1+git.20220702/src/drw_header.cpp 2022-07-02 20:53:28.000000000 +0200 +++ new/libdxfrw-1.1.0~rc1+git.20220905/src/drw_header.cpp 2022-09-05 19:54:26.000000000 +0200 @@ -1380,11 +1380,11 @@ writer->writeInt16(70, varInt); else writer->writeInt16(70, 1); + int insunits {Units::None}; + getInt("$INSUNITS", &insunits); // get $INSUNITS now to evaluate $MEASUREMENT + getInt("$MEASUREMENT", &varInt); // just remove the variable from list writer->writeString(9, "$MEASUREMENT"); - if (getInt("$MEASUREMENT", &varInt)) - writer->writeInt16(70, varInt); - else - writer->writeInt16(70, 1); + writer->writeInt16(70, measurement( insunits)); writer->writeString(9, "$CELWEIGHT"); if (getInt("$CELWEIGHT", &varInt)) writer->writeInt16(370, varInt); @@ -1407,10 +1407,7 @@ writer->writeInt16(290, 0); if (ver > DRW::AC1014) { writer->writeString(9, "$INSUNITS"); - if (getInt("$INSUNITS", &varInt)) - writer->writeInt16(70, varInt); - else - writer->writeInt16(70, 0); + writer->writeInt16(70, insunits); // already fetched above for $MEASUREMENT } writer->writeString(9, "$HYPERLINKBASE"); if (getStr("$HYPERLINKBASE", &varStr)) @@ -2456,3 +2453,19 @@ return result; } +int DRW_Header::measurement(const int unit) { + switch (unit) { + case Units::Inch: + case Units::Foot: + case Units::Mile: + case Units::Microinch: + case Units::Mil: + case Units::Yard: + return Units::English; + + default: + break; + } + + return Units::Metric; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libdxfrw-1.1.0~rc1+git.20220702/src/drw_header.h new/libdxfrw-1.1.0~rc1+git.20220905/src/drw_header.h --- old/libdxfrw-1.1.0~rc1+git.20220702/src/drw_header.h 2022-07-02 20:53:28.000000000 +0200 +++ new/libdxfrw-1.1.0~rc1+git.20220905/src/drw_header.h 2022-09-05 19:54:26.000000000 +0200 @@ -40,6 +40,36 @@ clearVars(); } + enum Units { + /** $ISUNITS header variable, since ACAD2000/AC1015 */ + None = 0, ///< No unit (unit from parent) + Inch = 1, ///< 25.4 mm + Foot = 2, ///< 12 Inches = 0.3048 m + Mile = 3, ///< 1760 Yards = 1609 m + Millimeter = 4, ///< 0.001 m + Centimeter = 5, ///< 0.01 m + Meter = 6, + Kilometer = 7, ///< 1000 m + Microinch = 8, ///< 0.000001 Inch = 0.0000254 mm = 25.4 Nanometer + Mil = 9, ///< 0.001 Inch = 0.0254 mm = 25.4 Micron + Yard = 10, ///< 3 Feet = 0.9144 m + Angstrom = 11, ///< 10^-10 m + Nanometer = 12, ///< 10^-9 m + Micron = 13, ///< 10^-6 m + Decimeter = 14, ///< 0.1 m + Decameter = 15, ///< 10 m + Hectometer = 16, ///< 100 m + Gigameter = 17, ///< 10^9 m + Astro = 18, ///< ~149.6 x 10^9 m + Lightyear = 19, ///< ~9.46 x 10^15 m + Parsec = 20, ///< ~3.0857 x 10^16 m + UnitCount = 21, ///< Used to iterate through units + + /** $MEASUREMENT header variable, since R14/AC1014 */ + English = 0, ///< English/Imperial drawing */ + Metric = 1, ///< Metric drawing */ + }; + DRW_Header(const DRW_Header& h){ this->version = h.version; this->comments = h.comments; @@ -101,6 +131,8 @@ duint32 ucsCtrl; duint32 vportCtrl; duint32 vpEntHeaderCtrl; + + int measurement(const int unit); }; #endif ++++++ libdxfrw.obsinfo ++++++ --- /var/tmp/diff_new_pack.wNWhIa/_old 2022-09-26 18:48:24.720077855 +0200 +++ /var/tmp/diff_new_pack.wNWhIa/_new 2022-09-26 18:48:24.720077855 +0200 @@ -1,5 +1,5 @@ name: libdxfrw -version: 1.1.0~rc1+git.20220702 -mtime: 1656788008 -commit: a610710c31f6029f70e169bd657d3a32e8e0bf38 +version: 1.1.0~rc1+git.20220905 +mtime: 1662400466 +commit: e0dad4ceff7f56e530b753a376f7dfe272a9cc63
