[sword-devel] <compressed> Sword Modules -> RISC OS

Troy A. Griffitts sword-devel@crosswire.org
Thu, 24 Jan 2002 16:07:14 -0700

accessing a module is fairly straight forward.  something like this
should work:

SWMgr mgr;
SWModule *module = mgr.Modules["KJV"];

for ((*module) = TOP; !module->Error(); (*module)++) {
	// do something like:
	cout << (const char *)(*module);

Hope this helps

There is also a utility in the utilities directory called mod2vpl that
will output a 'verse per line' text file from a module.

	In Christ's blessings,

"W. Simpson" wrote:
> In reply to Chris Little:
> Hi,
> >> Like I said, I can't port anything. Whether or not I can solicit someone
> to
> >> do the work is another matter. One particular objection I see is that
> >> RISC OS prides itself on its own distinctive style, expecting very
> different
> >> desktop behaviour from its programs than that of something built for
> >> windows. I can't see Sword working acceptably in a RISC OS environment,
> >> (though I know very little about porting anything to anywhere).
> >Sword itself is just a library.  Once you have that compiled, you could
> >just call it and write whatever exporter or viewer you like.
> I see.
> >> Hmmm, I was hoping there might be some relatively simple decompression
> >> algorithm I could apply to each file.
> >They are compressed in a simple decompression algorithm, namely zip.  But
> >it isn't simply zipped as a whole, we compress blocks (chapters or books)
> >and place them in a file, then index the location in a second file.
> Which would account for why the RSV appears encrypted having been
> extracted from its ZIP file, and contains more files than the KJV module.
> RSV:
>   nt.bzs
>   nt.bzc
>   nt
>   ot.bzs
>   ot.bzv
>   ot
>   rsv.sgm
> Yes, I see what you mean. It isn't a perfectly straightforward decompression
> of each file. All the same, if anyone is willing to attach the relevant
> pieces of source code to an e-mail for me (or someone else) to examine now
> or in the future, with any other useful remarks, I would be grateful.
> Thank you all once again :-)
> Shalom,
> W.Simpson
> www.logosword.co.uk