summaryrefslogtreecommitdiff
path: root/databases/palm-db-tools/patches/patch-af
diff options
context:
space:
mode:
Diffstat (limited to 'databases/palm-db-tools/patches/patch-af')
-rw-r--r--databases/palm-db-tools/patches/patch-af51
1 files changed, 51 insertions, 0 deletions
diff --git a/databases/palm-db-tools/patches/patch-af b/databases/palm-db-tools/patches/patch-af
new file mode 100644
index 00000000000..e6a4fc3e58a
--- /dev/null
+++ b/databases/palm-db-tools/patches/patch-af
@@ -0,0 +1,51 @@
+$NetBSD: patch-af,v 1.1 2010/08/11 12:21:56 dsainty Exp $
+
+Don't unnecessarily remove const, which complicates casting.
+
+--- libflatfile/JFile3.cpp.orig 2010-08-08 23:28:31.059277789 +1200
++++ libflatfile/JFile3.cpp 2010-08-08 23:30:12.583338045 +1200
+@@ -454,7 +454,7 @@
+ 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 @@
+ // 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 @@
+ 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 @@
+ 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 @@
+ 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