diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2017-02-01 20:21:20 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2017-02-01 20:21:20 +0000 |
commit | 2e4fb02fad874376e5525f8c2286de433921c229 (patch) | |
tree | 91b7fb88035905d23930242278b03310599ec9cb /palm | |
parent | 7e0ecaf6d2b3a5f803475e1e91790a29128597f4 (diff) | |
download | ports-2e4fb02fad874376e5525f8c2286de433921c229.tar.gz ports-2e4fb02fad874376e5525f8c2286de433921c229.zip |
Notes
Diffstat (limited to 'palm')
-rw-r--r-- | palm/palm-db-tools/files/patch-libflatfile-DB.cpp | 9 | ||||
-rw-r--r-- | palm/palm-db-tools/files/patch-libflatfile_JFile3.cpp | 47 | ||||
-rw-r--r-- | palm/palm-db-tools/files/patch-libflatfile_MobileDB.cpp | 11 |
3 files changed, 67 insertions, 0 deletions
diff --git a/palm/palm-db-tools/files/patch-libflatfile-DB.cpp b/palm/palm-db-tools/files/patch-libflatfile-DB.cpp index 30d8c15dd8aa..57f6be92f2c9 100644 --- a/palm/palm-db-tools/files/patch-libflatfile-DB.cpp +++ b/palm/palm-db-tools/files/patch-libflatfile-DB.cpp @@ -1,5 +1,14 @@ --- libflatfile/DB.cpp.orig Thu Jun 19 16:37:46 2003 +++ libflatfile/DB.cpp +@@ -221,7 +221,7 @@ void PalmLib::FlatFile::DB::extract_list + throw PalmLib::error("list view is corrupt"); + + // Determine the length of the name string. +- pi_char_t* null_ptr = reinterpret_cast<pi_char_t*> ++ const pi_char_t* null_ptr = reinterpret_cast<const pi_char_t*> + (memchr(chunk.data() + 4, 0, 32)); + if (null_ptr) + lv.name = std::string((char *) (chunk.data() + 4), @@ -511,7 +511,8 @@ f.type = PalmLib::FlatFile::Field::LIST; if (!field(j).argument().empty()) { diff --git a/palm/palm-db-tools/files/patch-libflatfile_JFile3.cpp b/palm/palm-db-tools/files/patch-libflatfile_JFile3.cpp new file mode 100644 index 000000000000..1a0cdbdcb540 --- /dev/null +++ b/palm/palm-db-tools/files/patch-libflatfile_JFile3.cpp @@ -0,0 +1,47 @@ +--- libflatfile/JFile3.cpp.orig 2003-06-19 23:37:46 UTC ++++ libflatfile/JFile3.cpp +@@ -454,7 +454,7 @@ PalmLib::FlatFile::JFile3::getOptions(vo + void PalmLib::FlatFile::JFile3::JFileAppInfoType::unpack(const PalmLib::Block& block) + { + unsigned i; +- pi_char_t* null_ptr; ++ const pi_char_t* null_ptr; + + // Ensure that we have enough space to extract information from. + if (block.size() < ( (20 * (20+1)) + 20*2 + 2 + 2 + 20*2 + 2 +@@ -467,7 +467,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + // Extract the field names. + for (i = 0; i < 20; ++i) { + /* Find the trailing null byte and extract the string. */ +- null_ptr = reinterpret_cast<pi_char_t*> (memchr(p, 0, 21)); ++ null_ptr = reinterpret_cast<const pi_char_t*> (memchr(p, 0, 21)); + if (null_ptr) + fieldNames[i] = std::string((char *) p, null_ptr - p); + else +@@ -518,7 +518,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += sizeof(pi_uint16_t); + + // Extract the string used last by Find. +- null_ptr = reinterpret_cast<pi_char_t*> (memchr(p, 0, 16)); ++ null_ptr = reinterpret_cast<const pi_char_t*> (memchr(p, 0, 16)); + if (null_ptr) + findString = std::string((char *) p, null_ptr - p); + else +@@ -526,7 +526,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += 16; + + // Extract the string used last by Filter. +- null_ptr = reinterpret_cast<pi_char_t*> (memchr(p, 0, 16)); ++ null_ptr = reinterpret_cast<const pi_char_t*> (memchr(p, 0, 16)); + if (null_ptr) + filterString = std::string((char *) p, null_ptr - p); + else +@@ -542,7 +542,7 @@ void PalmLib::FlatFile::JFile3::JFileApp + p += sizeof(pi_uint16_t); + + // Extract the password (if any). +- null_ptr = reinterpret_cast<pi_char_t*> (memchr(p, 0, 12)); ++ null_ptr = reinterpret_cast<const pi_char_t*> (memchr(p, 0, 12)); + if (null_ptr) + password = std::string((char *) p, null_ptr - p); + else diff --git a/palm/palm-db-tools/files/patch-libflatfile_MobileDB.cpp b/palm/palm-db-tools/files/patch-libflatfile_MobileDB.cpp new file mode 100644 index 000000000000..b4341ae46323 --- /dev/null +++ b/palm/palm-db-tools/files/patch-libflatfile_MobileDB.cpp @@ -0,0 +1,11 @@ +--- libflatfile/MobileDB.cpp.orig 2003-06-19 23:37:46 UTC ++++ libflatfile/MobileDB.cpp +@@ -221,7 +221,7 @@ PalmLib::FlatFile::MobileDB::parse_recor + if (field + 1 > fields.size()) fields.resize(field + 1); + + // Now search for the end of the current field. +- pi_char_t* q = reinterpret_cast<pi_char_t*> ++ const pi_char_t* q = reinterpret_cast<const pi_char_t*> + (memchr(p, 0, rec.end() - p)); + if (!q) + throw PalmLib::error("field terminiator is missing"); |