[sword-devel] Are the code libraries which come with the SWORD library such as clucene, zlib, etc. the same as from the source or are they modified?

TS outofthecube at icloud.com
Wed Nov 23 19:25:52 MST 2016


Are the code libraries which come with the SWORD library such as clucene, zlib, etc. the same as from the source or are they modified?

I'm asking because the zlib code, for example, does not work with iOS unless you edit one of the files. I believe there are more libraries which one of the files needs code for them to be included/imported. Based on a question on StackOverflow by someone with a similar problem, the author of the zlib library himself seemed to reply and he seemed aware of the bug since he suggested a fix. However, this is a fix for the most version of zlib which I think already comes with the Sword framework. 

So, this leads to a problem because I downloaded the Sword framework files (because PS needs the updated 64 bit version) and then switched it out with the current framework and etc. in PocketSword. I expected it to work with minor issues from the start, but that did not happen. It may not have been till I started running a comparison against all the old versus new files that I found the extra code lines so that zlib could be compiled. So, it works now, but it's not the same one as the original from the website. Are these differences listed somewhere? My current understanding is that the Sword code is not dependent on zlib or the clucene library code so I'm guessing that they are provided as conveniences so users don't have to download it separately? I guess I'm trying to figure out if the zlib code should be updated in order to work without problems from the very start and be distributed with the Sword framework or is it something which should stay the way it is, and at minimum the SwordHowTo file in the binding folder be updated to reflect changes which need to be made to the file in order for it to work. So, basically it would be erroneous to assume that the 3rd party libraries which come with the Sword framework work on all platforms ...even though it's written in the same C/C++ language? ....but wait, shouldn't frameworks work immediately upon installation? Sorry, I think I'm starting to confuse myself. Does anybody know how this is normally done?

There's also the Clucene library. It's riddled right now with 64 bit warnings. Besides it being bad practice based on my understanding to leave it that way or use it that way for a long period of time, there's also a significant difference between iOS apps and most other software. That is, that the apps can only go through Apple's App Store and must conform to Apple's requirements else risk being denied. Apple's already made it clear that apps should be 64bit compatible. So, if PocketSword was submitted with the current Clucene library I do not know how they would take it. It seems to me that it may be skating on thin ice with them. If they saw the numerous 64bit warnings, I do not think it would be unreasonable for them to question why the app was submitted that way. I posted a list last month or so of all the 64 bit warnings  Xcode gave me including ones in the clucene files. A lot of the code creating the warnings was fixed as a result, but only I think in Sword files. I think it's my understanding that the Sword files which were not fixed were at least checked to see if the different memory sizes being used (64 bit sized longs being cast to 32 bit sized int's or something similar?) could lead to any problems, unless I'm mistaken? I don't know offhand though if the clucene or any other non-sword files were checked. 
...I think that perhaps the point I'm driving to is that even if all the numbers in use are on the low side and so having more memory space shouldn't change anything, from Apple's point of view they may not accept that as a reason and it still remains that the code isn't written in compliance to how they want 64bit code to be done, which seems as far as I've seen so far to be the same standards as everyone else. So, data types, for example, shouldn't implicitly cast from long to int. So, this then leads to the question, does an updated compliant version get made and sent along with the Sword framework files, or is it something that should be done from my side? or the front end's? side of things.  That is, to delete the version of clucene that comes with the Sword framework files and substitute one which is compliant with 64bit coding practice. And also somewhere make it clear or written down somewhere proper that the version of clucene being used is a customized version so that nobody in the future gets confused or mixed up thinking that it's the same as the version which was released by the original maintainers or developers of the code. 

I wrote this on my phone and it looks like a lot. I've not been feeling well lately so sorry if I'm being unnecessarily wordy. 

PS - I remember that Sword++ was switched to being dependent on certain libraries which I think included clucene and zlib. So, I'm offhand curious as to how he/they are treating this situation since Linux should be using the same 64 bit standard as what Apple uses so the 64bit warnings should affect them as well. 

-TS

--Sent from phone--


More information about the sword-devel mailing list