pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/misc/sword



Module Name:    pkgsrc
Committed By:   joerg
Date:           Sat Dec 17 14:22:39 UTC 2016

Modified Files:
        pkgsrc/misc/sword: distinfo
Added Files:
        pkgsrc/misc/sword/patches: patch-src_keys_treekeyidx.cpp
            patch-src_mgr_swmgr.cpp patch-src_modules_common_rawstr.cpp
            patch-src_modules_common_rawstr4.cpp
            patch-src_modules_common_zstr.cpp
            patch-src_modules_lexdict_rawld4_rawld4.cpp
            patch-src_modules_lexdict_rawld_rawld.cpp
            patch-src_modules_lexdict_zld_zld.cpp

Log Message:
Don't try to order pointers, check for NULLness.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/misc/sword/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/misc/sword/patches/patch-src_keys_treekeyidx.cpp \
    pkgsrc/misc/sword/patches/patch-src_mgr_swmgr.cpp \
    pkgsrc/misc/sword/patches/patch-src_modules_common_rawstr.cpp \
    pkgsrc/misc/sword/patches/patch-src_modules_common_rawstr4.cpp \
    pkgsrc/misc/sword/patches/patch-src_modules_common_zstr.cpp \
    pkgsrc/misc/sword/patches/patch-src_modules_lexdict_rawld4_rawld4.cpp \
    pkgsrc/misc/sword/patches/patch-src_modules_lexdict_rawld_rawld.cpp \
    pkgsrc/misc/sword/patches/patch-src_modules_lexdict_zld_zld.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/misc/sword/distinfo
diff -u pkgsrc/misc/sword/distinfo:1.2 pkgsrc/misc/sword/distinfo:1.3
--- pkgsrc/misc/sword/distinfo:1.2      Tue Nov  3 23:49:52 2015
+++ pkgsrc/misc/sword/distinfo  Sat Dec 17 14:22:39 2016
@@ -1,7 +1,15 @@
-$NetBSD: distinfo,v 1.2 2015/11/03 23:49:52 agc Exp $
+$NetBSD: distinfo,v 1.3 2016/12/17 14:22:39 joerg Exp $
 
 SHA1 (sword-1.7.4.tar.gz) = 9fc1070baaa9f991056c1dc0d0455022de2610db
 RMD160 (sword-1.7.4.tar.gz) = 55a0b741a97e58f29cfa5eca4572719660447393
 SHA512 (sword-1.7.4.tar.gz) = 4c8b183e613367364439cc7a8a842012f75180fccc8eb775b9af2dc4c10f39c152261d35f0aadaaa91a11df36ab1a4057c2edc50ea4b0b3bb0ab0a847ff68f75
 Size (sword-1.7.4.tar.gz) = 2157882 bytes
 SHA1 (patch-Makefile.in) = 512be822cb96144244cb93f70ca2ba409a90db9b
+SHA1 (patch-src_keys_treekeyidx.cpp) = 2bae86876bfb4a1c74faf709d016e7665514cd90
+SHA1 (patch-src_mgr_swmgr.cpp) = e0e63ec4df6b07c89678a33827cc925f3ccb2369
+SHA1 (patch-src_modules_common_rawstr.cpp) = 89bf3b3bf389393dc0d826f6aa0ab1a4737d30bd
+SHA1 (patch-src_modules_common_rawstr4.cpp) = 966d0f6b52ac888abb27376ec0cedd2336bc6b99
+SHA1 (patch-src_modules_common_zstr.cpp) = 591cbf710dade59c5249d8c15ae2db5ac791db03
+SHA1 (patch-src_modules_lexdict_rawld4_rawld4.cpp) = d2cebbe1ddd5456d52f651079fc6e4eec46905d4
+SHA1 (patch-src_modules_lexdict_rawld_rawld.cpp) = 48a55530444b6e10412bdb08d2036395554a7299
+SHA1 (patch-src_modules_lexdict_zld_zld.cpp) = a4f4075da1011728ff6fde8c0a13b4c9d45fe3cd

Added files:

Index: pkgsrc/misc/sword/patches/patch-src_keys_treekeyidx.cpp
diff -u /dev/null pkgsrc/misc/sword/patches/patch-src_keys_treekeyidx.cpp:1.1
--- /dev/null   Sat Dec 17 14:22:39 2016
+++ pkgsrc/misc/sword/patches/patch-src_keys_treekeyidx.cpp     Sat Dec 17 14:22:39 2016
@@ -0,0 +1,49 @@
+$NetBSD: patch-src_keys_treekeyidx.cpp,v 1.1 2016/12/17 14:22:39 joerg Exp $
+
+--- src/keys/treekeyidx.cpp.orig       2016-12-17 11:16:23.463483505 +0000
++++ src/keys/treekeyidx.cpp
+@@ -61,7 +61,7 @@ TreeKeyIdx::TreeKeyIdx(const char *idxPa
+       buf.setFormatted("%s.dat", path);
+       datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true);
+ 
+-      if (datfd <= 0) {
++      if (!datfd) {
+               SWLog::getSystemLog()->logError("%d", errno);
+               error = errno;
+       }
+@@ -331,7 +331,7 @@ void TreeKeyIdx::getTreeNodeFromDatOffse
+       __s32  tmp;
+       __u16  tmp2;
+ 
+-      if (datfd > 0) {
++      if (datfd) {
+ 
+               datfd->seek(ioffset, SEEK_SET);
+ 
+@@ -385,7 +385,7 @@ char TreeKeyIdx::getTreeNodeFromIdxOffse
+       }
+ 
+       node->offset = ioffset;
+-      if (idxfd > 0) {
++      if (idxfd) {
+               if (idxfd->getFd() > 0) {
+                       idxfd->seek(ioffset, SEEK_SET);
+                       if (idxfd->read(&offset, 4) == 4) {
+@@ -422,7 +422,7 @@ void TreeKeyIdx::saveTreeNodeOffsets(Tre
+       long datOffset = 0;
+       __s32 tmp;
+ 
+-      if (idxfd > 0) {
++      if (idxfd) {
+               idxfd->seek(node->offset, SEEK_SET);
+               if (idxfd->read(&tmp, 4) != 4) {
+                       datOffset = datfd->seek(0, SEEK_END);
+@@ -488,7 +488,7 @@ void TreeKeyIdx::copyFrom(const TreeKeyI
+ void TreeKeyIdx::saveTreeNode(TreeNode *node) {
+       long datOffset = 0;
+       __s32 tmp;
+-      if (idxfd > 0) {
++      if (idxfd) {
+ 
+               idxfd->seek(node->offset, SEEK_SET);
+               datOffset = datfd->seek(0, SEEK_END);
Index: pkgsrc/misc/sword/patches/patch-src_mgr_swmgr.cpp
diff -u /dev/null pkgsrc/misc/sword/patches/patch-src_mgr_swmgr.cpp:1.1
--- /dev/null   Sat Dec 17 14:22:39 2016
+++ pkgsrc/misc/sword/patches/patch-src_mgr_swmgr.cpp   Sat Dec 17 14:22:39 2016
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_mgr_swmgr.cpp,v 1.1 2016/12/17 14:22:39 joerg Exp $
+
+--- src/mgr/swmgr.cpp.orig     2016-12-17 11:17:23.119076977 +0000
++++ src/mgr/swmgr.cpp
+@@ -1362,7 +1362,7 @@ void SWMgr::InstallScan(const char *dirn
+                                       else {
+                                               if (!conffd) {
+                                                       conffd = FileMgr::getSystemFileMgr()->open(config->filename.c_str(), FileMgr::WRONLY|FileMgr::APPEND);
+-                                                      if (conffd > 0)
++                                                      if (conffd)
+                                                               conffd->seek(0L, SEEK_END);
+                                                       else {
+                                                               FileMgr::getSystemFileMgr()->close(conffd);
Index: pkgsrc/misc/sword/patches/patch-src_modules_common_rawstr.cpp
diff -u /dev/null pkgsrc/misc/sword/patches/patch-src_modules_common_rawstr.cpp:1.1
--- /dev/null   Sat Dec 17 14:22:39 2016
+++ pkgsrc/misc/sword/patches/patch-src_modules_common_rawstr.cpp       Sat Dec 17 14:22:39 2016
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_modules_common_rawstr.cpp,v 1.1 2016/12/17 14:22:39 joerg Exp $
+
+--- src/modules/common/rawstr.cpp.orig 2016-12-17 11:18:57.855699237 +0000
++++ src/modules/common/rawstr.cpp
+@@ -74,7 +74,7 @@ RawStr::RawStr(const char *ipath, int fi
+       buf.setFormatted("%s.dat", path);
+       datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true);
+ 
+-      if (datfd < 0) {
++      if (!datfd) {
+               SWLog::getSystemLog()->logError("%d", errno);
+       }
+ 
+@@ -111,7 +111,7 @@ void RawStr::getIDXBufDat(long ioffset, 
+ {
+       int size;
+       char ch;
+-      if (datfd > 0) {
++      if (datfd) {
+               datfd->seek(ioffset, SEEK_SET);
+               for (size = 0; datfd->read(&ch, 1) == 1; size++) {
+                       if ((ch == '\\') || (ch == 10) || (ch == 13))
+@@ -145,7 +145,7 @@ void RawStr::getIDXBuf(long ioffset, cha
+ {
+       __u32 offset;
+       
+-      if (idxfd > 0) {
++      if (idxfd) {
+               idxfd->seek(ioffset, SEEK_SET);
+               idxfd->read(&offset, 4);
+ 
Index: pkgsrc/misc/sword/patches/patch-src_modules_common_rawstr4.cpp
diff -u /dev/null pkgsrc/misc/sword/patches/patch-src_modules_common_rawstr4.cpp:1.1
--- /dev/null   Sat Dec 17 14:22:39 2016
+++ pkgsrc/misc/sword/patches/patch-src_modules_common_rawstr4.cpp      Sat Dec 17 14:22:39 2016
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_modules_common_rawstr4.cpp,v 1.1 2016/12/17 14:22:39 joerg Exp $
+
+--- src/modules/common/rawstr4.cpp.orig        2016-12-17 11:19:27.919536682 +0000
++++ src/modules/common/rawstr4.cpp
+@@ -74,7 +74,7 @@ RawStr4::RawStr4(const char *ipath, int 
+       buf.setFormatted("%s.dat", path);
+       datfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true);
+ 
+-      if (datfd < 0) {
++      if (!datfd) {
+               SWLog::getSystemLog()->logError("%d", errno);
+       }
+ 
+@@ -111,7 +111,7 @@ void RawStr4::getIDXBufDat(long ioffset,
+ {
+       int size;
+       char ch;
+-      if (datfd > 0) {
++      if (datfd) {
+               datfd->seek(ioffset, SEEK_SET);
+               for (size = 0; datfd->read(&ch, 1) == 1; size++) {
+                       if ((ch == '\\') || (ch == 10) || (ch == 13))
+@@ -145,7 +145,7 @@ void RawStr4::getIDXBuf(long ioffset, ch
+ {
+       __u32 offset;
+       
+-      if (idxfd > 0) {
++      if (idxfd) {
+               idxfd->seek(ioffset, SEEK_SET);
+ 
+               idxfd->read(&offset, 4);
Index: pkgsrc/misc/sword/patches/patch-src_modules_common_zstr.cpp
diff -u /dev/null pkgsrc/misc/sword/patches/patch-src_modules_common_zstr.cpp:1.1
--- /dev/null   Sat Dec 17 14:22:39 2016
+++ pkgsrc/misc/sword/patches/patch-src_modules_common_zstr.cpp Sat Dec 17 14:22:39 2016
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_modules_common_zstr.cpp,v 1.1 2016/12/17 14:22:39 joerg Exp $
+
+--- src/modules/common/zstr.cpp.orig   2016-12-17 11:20:39.892321366 +0000
++++ src/modules/common/zstr.cpp
+@@ -83,7 +83,7 @@ zStr::zStr(const char *ipath, int fileMo
+       buf.setFormatted("%s.zdt", path);
+       zdtfd = FileMgr::getSystemFileMgr()->open(buf, fileMode, true);
+ 
+-      if (datfd <= 0) {
++      if (!datfd) {
+               SWLog::getSystemLog()->logError("%d", errno);
+       }
+ 
+@@ -133,7 +133,7 @@ void zStr::getKeyFromDatOffset(long ioff
+ {
+       int size;
+       char ch;
+-      if (datfd > 0) {
++      if (datfd) {
+               datfd->seek(ioffset, SEEK_SET);
+               for (size = 0; datfd->read(&ch, 1) == 1; size++) {
+                       if ((ch == '\\') || (ch == 10) || (ch == 13))
+@@ -167,7 +167,7 @@ void zStr::getKeyFromIdxOffset(long ioff
+ {
+       __u32 offset;
+       
+-      if (idxfd > 0) {
++      if (idxfd) {
+               idxfd->seek(ioffset, SEEK_SET);
+               idxfd->read(&offset, 4);
+               offset = swordtoarch32(offset);
Index: pkgsrc/misc/sword/patches/patch-src_modules_lexdict_rawld4_rawld4.cpp
diff -u /dev/null pkgsrc/misc/sword/patches/patch-src_modules_lexdict_rawld4_rawld4.cpp:1.1
--- /dev/null   Sat Dec 17 14:22:39 2016
+++ pkgsrc/misc/sword/patches/patch-src_modules_lexdict_rawld4_rawld4.cpp       Sat Dec 17 14:22:39 2016
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_modules_lexdict_rawld4_rawld4.cpp,v 1.1 2016/12/17 14:22:39 joerg Exp $
+
+--- src/modules/lexdict/rawld4/rawld4.cpp.orig 2016-12-17 11:25:37.737259594 +0000
++++ src/modules/lexdict/rawld4/rawld4.cpp
+@@ -166,7 +166,7 @@ void RawLD4::deleteEntry() {
+ 
+ 
+ long RawLD4::getEntryCount() const {
+-      if (idxfd < 0) return 0;
++      if (!idxfd) return 0;
+       return idxfd->seek(0, SEEK_END) / IDXENTRYSIZE;
+ }
+ 
Index: pkgsrc/misc/sword/patches/patch-src_modules_lexdict_rawld_rawld.cpp
diff -u /dev/null pkgsrc/misc/sword/patches/patch-src_modules_lexdict_rawld_rawld.cpp:1.1
--- /dev/null   Sat Dec 17 14:22:39 2016
+++ pkgsrc/misc/sword/patches/patch-src_modules_lexdict_rawld_rawld.cpp Sat Dec 17 14:22:39 2016
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_modules_lexdict_rawld_rawld.cpp,v 1.1 2016/12/17 14:22:39 joerg Exp $
+
+--- src/modules/lexdict/rawld/rawld.cpp.orig   2016-12-17 11:25:49.864362105 +0000
++++ src/modules/lexdict/rawld/rawld.cpp
+@@ -168,7 +168,7 @@ void RawLD::deleteEntry() {
+ 
+ 
+ long RawLD::getEntryCount() const {
+-      if (idxfd < 0) return 0;
++      if (!idxfd) return 0;
+       return idxfd->seek(0, SEEK_END) / IDXENTRYSIZE;
+ }
+ 
Index: pkgsrc/misc/sword/patches/patch-src_modules_lexdict_zld_zld.cpp
diff -u /dev/null pkgsrc/misc/sword/patches/patch-src_modules_lexdict_zld_zld.cpp:1.1
--- /dev/null   Sat Dec 17 14:22:39 2016
+++ pkgsrc/misc/sword/patches/patch-src_modules_lexdict_zld_zld.cpp     Sat Dec 17 14:22:39 2016
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_modules_lexdict_zld_zld.cpp,v 1.1 2016/12/17 14:22:39 joerg Exp $
+
+--- src/modules/lexdict/zld/zld.cpp.orig       2016-12-17 11:25:18.042867195 +0000
++++ src/modules/lexdict/zld/zld.cpp
+@@ -166,7 +166,7 @@ void zLD::deleteEntry() {
+ 
+ long zLD::getEntryCount() const
+ {
+-      if (idxfd < 0) return 0;
++      if (!idxfd) return 0;
+       return idxfd->seek(0, SEEK_END) / IDXENTRYSIZE;
+ }
+ 



Home | Main Index | Thread Index | Old Index