add --enable-camelcase option to configure

This commit is contained in:
dockes
2009-12-14 10:10:01 +00:00
parent 1ab7ea0558
commit 69c27db46a
4 changed files with 3859 additions and 3060 deletions
+3
View File
@@ -44,5 +44,8 @@
/* Use file extended attributes */
#undef RCL_USE_XATTR
/* Split camelCase words */
#undef RCL_SPLIT_CAMELCASE
/* No X11 */
#undef WITHOUT_X11
+7
View File
@@ -18,6 +18,7 @@ static char rcsid[] = "@(#$Id: textsplit.cpp,v 1.38 2008-12-12 11:53:45 dockes E
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef TEST_TEXTSPLIT
#include "autoconfig.h"
#include <assert.h>
@@ -450,9 +451,14 @@ bool TextSplit::text_to_words(const string &in)
}
break;
#ifdef RCL_SPLIT_CAMELCASE
// Camelcase handling.
// If we get uppercase ascii after lowercase ascii, emit word.
// This emits "camel" when hitting the 'C' of camelCase
// Not enabled by defaults as this makes phrase searches quite
// confusing.
// ie "MySQL manual" is matched by "MySQL manual" and
// "my sql manual" but not "mysql manual"
case A_ULETTER:
if (m_span.length() &&
charclasses[(unsigned char)m_span[m_span.length() - 1]] ==
@@ -483,6 +489,7 @@ bool TextSplit::text_to_words(const string &in)
m_wordLen++;
}
goto NORMALCHAR;
#endif /* CAMELCASE */
default: