You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/09/05 18:29:42 UTC
[lucy-commits] svn commit: r1165349 - in /incubator/lucy/trunk/core/Lucy/Util:
StringHelper.c StringHelper4.c
Author: marvin
Date: Mon Sep 5 16:29:42 2011
New Revision: 1165349
URL: http://svn.apache.org/viewvc?rev=1165349&view=rev
Log:
Merge the contents of StringHelper4.c (the code taken from Apache Batik) into
StringHelper.c.
Modified:
incubator/lucy/trunk/core/Lucy/Util/StringHelper.c
incubator/lucy/trunk/core/Lucy/Util/StringHelper4.c
Modified: incubator/lucy/trunk/core/Lucy/Util/StringHelper.c
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/core/Lucy/Util/StringHelper.c?rev=1165349&r1=1165348&r2=1165349&view=diff
==============================================================================
--- incubator/lucy/trunk/core/Lucy/Util/StringHelper.c (original)
+++ incubator/lucy/trunk/core/Lucy/Util/StringHelper.c Mon Sep 5 16:29:42 2011
@@ -24,6 +24,17 @@
#include "Lucy/Object/Err.h"
#include "Lucy/Util/Memory.h"
+const uint8_t lucy_StrHelp_UTF8_COUNT[] = {
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+ 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,
+ };
+
int32_t
StrHelp_overlap(const char *a, const char *b, size_t a_len, size_t b_len) {
size_t i;