[sword-devel] RawVerse::gettext etc

Jerry Kreps sword-devel@crosswire.org
Fri, 18 Jan 2002 16:44:24 -0600

On Friday 18 January 2002 08:53, you wrote:
> According to this bug on sourceforge
> http://sourceforge.net/tracker/index.php?func=detail&aid=505134&gro
>up_i d=9516&atid=109516
> gettext is already defined as a macro in Redhat 7.2 gcc (see
> src/utilfuns/regex.c for what it probably is). Looks like it would
> be best to rename the gettext functions in rawverse, rawstr,
> rawstr4.

Why design to a specific distro, or against one?

> It already has a different name in zverse (swgettext), but I'm not
> convinced this is the most intuitive name it could be.
> getText is another option though that would be very prone to typos.
> Or alternatively we could #undef gettext in defs.h.

These approaches can lead to confusion...
Why not use the C++ namespace capability, that is what it was 
icnluded for.   Call it 'swordspace' or something like that...

Also, I notice that in 11 source files and 6 headers  'extern "C" ' 
wraps are being used so g++ won't mangle the C code being wrapped.  
Why not rewrite the C code so it is C++ compliant?


> Maybe readtext describes what it does better, reading the text into
> a provided buffer rather than returning it?
> (fwiw I'd go for readtext)
> Daniel
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com