[sword-devel] regenerating an editable Personal commentary

DM Smith dmsmith at crosswire.org
Thu Feb 4 12:01:03 MST 2016


Looking a bit further. src/comments/rawfiles/rawfiles.cpp needs to be modified to support alternate versifications.
Change from (probably need to change corresponding header file too):
char RawFiles::createModule(const char *path) {
        char *incfile = new char [ strlen (path) + 16 ];

        __u32 zero = 0;
        zero = archtosword32(zero);

        FileDesc *datafile;

        sprintf(incfile, "%s/incfile", path);
        datafile = FileMgr::getSystemFileMgr()->open(incfile, FileMgr::CREAT|FileMgr::WRONLY|FileMgr::TRUNC);
        delete [] incfile;
        datafile->write(&zero, 4);
        FileMgr::getSystemFileMgr()->close(datafile);

    return RawVerse::createModule (path);
}

To something like, add v11n and pass it to RawVerse::createModule(…):
char RawFiles::createModule(const char *path, const char *v11n) {
        char *incfile = new char [ strlen (path) + 16 ];

        __u32 zero = 0;
        zero = archtosword32(zero);

        FileDesc *datafile;

        sprintf(incfile, "%s/incfile", path);
        datafile = FileMgr::getSystemFileMgr()->open(incfile, FileMgr::CREAT|FileMgr::WRONLY|FileMgr::TRUNC);
        delete [] incfile;
        datafile->write(&zero, 4);
        FileMgr::getSystemFileMgr()->close(datafile);

    return RawVerse::createModule (path, v11n);
}

> On Feb 4, 2016, at 12:49 PM, Karl Kleinpaste <karl at kleinpaste.org> wrote:
> 
> On 02/04/2016 12:33 PM, DM Smith wrote:
>> Take a look at sword/utilities/addcomment.cpp.
> Thanx. I had never noticed.
> 
> It doesn't build.  I have to ask for it individually ("make addcomment") in sword/utilities, and that in turn makes me add -I/usr/include/sword manually, and then it gets into further problems.
> 
> After adding "#include <swcomprs.h>" above zcom.h, it fails on basic syntax errors, evidently.
> 
> Evidently this hasn't been touched in a long, long time. Indeed, "svn blame" shows that nothing of consequence has been done to it since -r2.
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20160204/77bd1073/attachment.html>


More information about the sword-devel mailing list