[sword-devel] Fwd: Re: bibletime stuff

Nikolay Igotti sword-devel@crosswire.org
Wed, 28 Aug 2002 11:14:19 -0700 (PDT)

On Tue, 27 Aug 2002, Troy A. Griffitts wrote:

> >  Why everybody hates goto statement? Properly used it greatly improves 
> > perception of the program (while loop in the same patch would be much 
> > worse and add unneeded {}). Probably it's CS education....
> >  As I wrote this patch and if you gonna include it to CVS - some 
> > recomendation for creators of non-Western locales:
> >  to make sure that your book is read correctly by Sword - add in [Book Abbrevs] 
> > entry (beside others) with full book (exactly as it is in [Text]) name set 
> > to book number.
> :)  There is never a season for 'goto' statements :)  You want to 
> perform this code twice, at most.  It seems more logical to place it in 
> a for loop that repeats twice.
 Funny but with fix in CVS  there's a memory leak :).
You need to add 
if (abbr) delete[] abbr;
in the very beginning of the loop.  Goto - rulez :).
I'm C programmer mainly, so don't get me wrong.