[bt-devel] Windows build system

Greg Hellings greg.hellings at gmail.com
Sat Feb 28 01:41:20 MST 2009


On Sat, Feb 28, 2009 at 12:53 AM, Eeli Kaikkonen
<eekaikko at mail.student.oulu.fi> wrote:
> Greg Hellings wrote:
>
>>
>> backend\cmodulesearch.h - I still have pthread.h commented out.  SVN
>> still has it in.  This should be rectified.
>> backend\keys\cswordkey.cpp - stricmp/strcasecmp issue
>> backend\filters\bt_thmlhtml.cpp - stricmp/strcasecmp
>> backend\modules\cswordmoduleinfo.cpp - explicit casts to (const
>> TCHAR*) still need to be added in all the places I have enumerated
>> before.  All the calls to lucene::document::Field need their first two
>> arguments cast to (const TCHAR*),
>> lucene::queryparser::QueryParser::parse does as well and line 449
>> needs to look like
>>                        lucene_wcstoutf8(utfBuffer, (const wchar_t *)
>> doc->get((const
>> TCHAR*) _T("key")), BT_MAX_LUCENE_FIELD_LENGTH);
>>
>
> The <pthread.h> and TCHAR* issues should be solved, though I may have made
> mistakes. Tell me if I missed something.
>
> I'm not yet sure about the string comparison functions. It has to be case
> insensitive - is your replacement?

I was speaking in IRC with Troy and others, and since all of those
comparisons were for XML tags or module names, they actually don't
have to be case insensitive, since XML is case sensitive for its tag
names, etc.    On the other hand, the module name shouldn't be done
with stricmp/strcasecmp anyway, since it needs to be properly UTF-8
aware (and, theoretically, so should the XML comparison).  He
suggested to use something like toUpper(SWBuf(str)) == "MYUTF8STRING"
which would get rid of the entire reliance on the system-specific
case-insensitive comparison function and could be used for either the
XML tags or the Module names.  But yes, using stricmp from the SWORD
headers would be a replacement that does exactly the same as what we
do at the moment.

--Greg

>
> --Eeli Kaikkonen
>
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel
>



More information about the bt-devel mailing list