[sword-devel] diatheke plain output - line breaks missing?

Troy A. Griffitts scribe at crosswire.org
Mon Jan 22 21:43:15 MST 2007

	Yes, you are correct that it seems some filters have stopped handling 
(or never did handle) some whitespace correctly.  Bummer.

	Yes, this is exactly correct.  To help get started, may I point to a 
few critical points of code:

for adding a new enum value, FMT_...

At the very end of this file is where you would add a case for your new 
FMT_ and supply your new filter set.  A good start would be to merely 
copy and rename the *plain.cpp filters to your *console.cpp (or whatever 
you want to call them).  Then you can add your beautification code as 
you have time, keeping things working at least as good as they do now 
using the *plain filters for console output.

Hope this helps.  Blessings in your efforts.


benjie wrote:
> On Mon, Jan 22, 2007 at 09:09:14PM -0700, Troy A. Griffitts wrote:
>> Well, kindof.  It's a matter of purpose.  The purpose for a strip filter 
>> is to prepare the buffer for a search, e.g. stristr(StripText(), istr)
>> for example, if one searches for a phrase,
>> "streams of water that yield"
>> It should hit on Psalm 1:3
>> He is like a tree
>> planted by streams of water
>> that yields its fruit in its season,
>> and its leaf does not wither.
>> In all that he does, he prospers.
>> So, in conclusion, filters have different purposes.
>> From: http://crosswire.org/svn/sword/trunk/include/swmodule.h
>>   virtual SWModule &AddRenderFilter(SWFilter *newfilter);
>>   virtual SWModule &AddEncodingFilter(SWFilter *newfilter);
>>   virtual SWModule &AddStripFilter(SWFilter *newfilter);
>>   virtual SWModule &AddRawFilter(SWFilter *newfilter);
>>   virtual SWModule &AddOptionFilter(SWOptionFilter *newfilter);
> So if we are interested in working with a plain text (ASCII) rendering
> filter, we really need to write a new filter specifically for that. It
> seems like that would be good for diatheke, which defaults to plain
> output anyway. It wouldn't hurt for that output to be formatted a bit
> better.
> -Benjie
> _______________________________________________
> 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

More information about the sword-devel mailing list