summaryrefslogtreecommitdiff
path: root/user/labplot/liborigin-endian.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-01 22:50:12 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-05-01 22:50:12 +0000
commit2d9508f8daa0acb2a28eff6c96f4055f8ade1d8f (patch)
tree17a3d0eb5746ae325c1a9c5456bf4ddd3d1fce25 /user/labplot/liborigin-endian.patch
parentfd5a6b3c286853da6fb2a85d831577cd4e3a82f0 (diff)
downloadpackages-2d9508f8daa0acb2a28eff6c96f4055f8ade1d8f.tar.gz
packages-2d9508f8daa0acb2a28eff6c96f4055f8ade1d8f.tar.bz2
packages-2d9508f8daa0acb2a28eff6c96f4055f8ade1d8f.tar.xz
packages-2d9508f8daa0acb2a28eff6c96f4055f8ade1d8f.zip
user/labplot: bump to 2.6
Diffstat (limited to 'user/labplot/liborigin-endian.patch')
-rw-r--r--user/labplot/liborigin-endian.patch26
1 files changed, 0 insertions, 26 deletions
diff --git a/user/labplot/liborigin-endian.patch b/user/labplot/liborigin-endian.patch
deleted file mode 100644
index b40782a3a..000000000
--- a/user/labplot/liborigin-endian.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff --git a/OriginAnyParser.cpp b/OriginAnyParser.cpp
-index c9e863e..2637945 100644
---- a/liborigin/OriginAnyParser.cpp
-+++ b/liborigin/OriginAnyParser.cpp
-@@ -24,10 +24,18 @@
- #include <cinttypes>
-
- /* define a macro to get an int (or uint) from a istringstream in binary mode */
--#define GET_INT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 4);};
--#define GET_SHORT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 2);};
--#define GET_FLOAT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 4);};
-+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-+#define GET_SHORT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 2);};
-+#define GET_INT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 4);};
-+#define GET_FLOAT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 4);};
- #define GET_DOUBLE(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 8);};
-+#else
-+void inline swap_bytes(unsigned char* data, int size) {int i = 0, j = size - 1; while(i < j) {std::swap(data[i], data[j]); ++i, --j;}}
-+#define GET_SHORT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 2); swap_bytes(reinterpret_cast<unsigned char *>(&ovalue), 2);};
-+#define GET_INT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 4); swap_bytes(reinterpret_cast<unsigned char *>(&ovalue), 4);};
-+#define GET_FLOAT(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 4); swap_bytes(reinterpret_cast<unsigned char *>(&ovalue), 4);};
-+#define GET_DOUBLE(iss, ovalue) {iss.read(reinterpret_cast<char *>(&ovalue), 8); swap_bytes(reinterpret_cast<unsigned char *>(&ovalue), 8);};
-+#endif
-
- OriginAnyParser::OriginAnyParser(const string& fileName)
- : file(fileName.c_str(),ios::binary),