? abi/mybuildlog.log ? abi/abibuild.txt ? abi/src/WIN32_1.1.2_i386_OBJ ? abi/src/af/util/xp/stringpool.diff ? abi/src/af/util/xp/growbuf.diff ? abi/src/wp/ap/xp/ap_wp_sidebar.cpp ? abi/src/wp/ap/xp/ap_wp_splash.cpp ? expat/xmltok/nametab.h ? libiconv/config.log ? libiconv/config.cache ? libiconv/libtool ? libiconv/config.status ? libiconv/Makefile ? libiconv/include/libiconv.h ? libiconv/man/Makefile ? libiconv/src/Makefile ? libiconv/src/config.h ? libiconv/tests/Makefile ? wv/config.log ? wv/config.h ? wv/config.cache ? wv/libtool ? wv/config.status ? wv/Makefile ? wv/expat/Makefile ? wv/expat/xmlparse/Makefile ? wv/expat/xmltok/Makefile ? wv/glib-wv/Makefile ? wv/iconv/Makefile ? wv/libole2/Makefile ? wv/magick/Makefile ? wv/oledecod/Makefile Index: abi/src/af/util/xp/ut_bytebuf.cpp =================================================================== RCS file: /cvsroot/abi/src/af/util/xp/ut_bytebuf.cpp,v retrieving revision 1.7 diff -r1.7 ut_bytebuf.cpp 124,125d123 < < Index: abi/src/af/util/xp/ut_string.h =================================================================== RCS file: /cvsroot/abi/src/af/util/xp/ut_string.h,v retrieving revision 1.37 diff -r1.37 ut_string.h 84a85,86 > UT_UCSChar UT_UCS_tolower(UT_UCSChar c); > Index: abi/src/af/util/xp/ut_vector.cpp =================================================================== RCS file: /cvsroot/abi/src/af/util/xp/ut_vector.cpp,v retrieving revision 1.24 diff -r1.24 ut_vector.cpp 114c114 < int err = grow(0); --- > UT_sint32 err = grow(0); Index: abi/src/hello/ap/xp/ap_View.cpp =================================================================== RCS file: /cvsroot/abi/src/hello/ap/xp/ap_View.cpp,v retrieving revision 1.5 diff -r1.5 ap_View.cpp 104a105,107 > <<<<<<< ap_View.cpp > return UT_FALSE; > ======= 106a110 > >>>>>>> 1.5 Index: abi/src/text/fmt/xp/fv_View.cpp =================================================================== RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.cpp,v retrieving revision 1.288 diff -r1.288 fv_View.cpp 3132c3132,3169 < --- > > //Now we compute the static prefix function > //Which can be done based soley on the find string > > UT_uint32 m = UT_UCS_strlen(find); > UT_uint32 *prefix; > UT_uint32 k = 0; > UT_uint32 q = 1; > > prefix = (UT_uint32*) calloc (m, sizeof(UT_uint32)); > > prefix[0] = 0; //Must be this reguardless of the string > > if (matchCase) > { > for (q = 1; q < m; q++) > { > while (k > 0 && find[k] != find[q]) > k = prefix[k - 1]; > if(find[k] == find[q]) > k++; > prefix[q] = k; > } > } > else //!matchCase > { > for (q = 1; q < m; q++) > { > while (k > 0 && UT_UCS_tolower(find[k]) != UT_UCS_tolower(find[q])) > k = prefix[k - 1]; > if(UT_UCS_tolower(find[k]) == UT_UCS_tolower(find[q])) > k++; > prefix[q] = k; > } > } > > //Now we use this prefix function (stored as an array) > //to search through the document text. 3134a3172 > 3136c3174,3210 < UT_sint32 foundAt = -1; --- > UT_sint32 foundAt = -1; > UT_uint32 i = 0; > UT_uint32 t = 0; > > if (matchCase) > { > while (buffer[i] /*|| foundAt == -1*/) > { > while (t > 0 && find[t] != buffer[i]) > t = prefix[t-1]; > if (find[t] == buffer[i]) > t++; > i++; > if (t == m) > { > foundAt = i - m; > break; > } > } > } > else //!matchCase > { > while (buffer[i] /*|| foundAt == -1*/) > { > while (t > 0 && UT_UCS_tolower(find[t]) != UT_UCS_tolower(buffer[i])) > t = prefix[t-1]; > if (UT_UCS_tolower(find[t]) == UT_UCS_tolower(buffer[i])) > t++; > i++; > if (t == m) > { > foundAt = i - m; > break; > } > } > } > 3138,3141c3212 < // Change the ordering of searches to accomodate new searches (like < // regular expressions, case-sensitive, or reverse searches). < // Right now we just work off case searches. < if (matchCase == UT_TRUE) --- > if (foundAt != -1) 3143,3144c3214,3222 < // this search will do case-sensitive work < foundAt = _findBlockSearchDumbCase(buffer, find); --- > _setPoint(block->getPosition(UT_FALSE) + offset + foundAt); > _setSelectionAnchor(); > _charMotion(UT_TRUE, UT_UCS_strlen(find)); > > m_doneFind = UT_TRUE; > > FREEP(buffer); > FREEP(prefix); > return UT_TRUE; 3146,3149c3224,3305 < else if (matchCase == UT_FALSE) < { < // do the case-insensitive search < foundAt = _findBlockSearchDumbNoCase(buffer, find); --- > > // didn't find anything, so set the offset to the end > // of the current area > offset += UT_UCS_strlen(buffer); > > // must clean up buffer returned for search > FREEP(buffer); > } > > if (bDoneEntireDocument) > { > *bDoneEntireDocument = UT_TRUE; > } > > // reset wrap for next time > m_wrappedEnd = UT_FALSE; > > FREEP(prefix); > > return UT_FALSE; > } > > //Does exactly the same as the previous function except that the prefix > //function is passed in as an agrument rather than computed within > //the function body. > UT_Bool FV_View::_findNext(const UT_UCSChar * find, UT_uint32 *prefix, > UT_Bool matchCase, UT_Bool * bDoneEntireDocument) > { > UT_ASSERT(find); > > fl_BlockLayout * block = NULL; > PT_DocPosition offset = 0; > > block = _findGetCurrentBlock(); > offset = _findGetCurrentOffset(); > > UT_UCSChar * buffer = NULL; > UT_uint32 m = UT_UCS_strlen(find); > > > > //Now we use the prefix function (stored as an array) > //to search through the document text. > while ((buffer = _findGetNextBlockBuffer(&block, &offset))) > { > > // magic number; range of UT_sint32 falls short of extremely large docs > UT_sint32 foundAt = -1; > UT_uint32 i = 0; > UT_uint32 t = 0; > > if (matchCase) > { > while (buffer[i] /*|| foundAt == -1*/) > { > while (t > 0 && find[t] != buffer[i]) > t = prefix[t-1]; > if (find[t] == buffer[i]) > t++; > i++; > if (t == m) > { > foundAt = i - m; > break; > } > } > } > else //!matchCase > { > while (buffer[i] /*|| foundAt == -1*/) > { > while (t > 0 && UT_UCS_tolower(find[t]) != UT_UCS_tolower(buffer[i])) > t = prefix[t-1]; > if (UT_UCS_tolower(find[t]) == UT_UCS_tolower(buffer[i])) > t++; > i++; > if (t == m) > { > foundAt = i - m; > break; > } > } 3160c3316 < --- > 3418a3575,3642 > > UT_Bool FV_View::_findReplace(const UT_UCSChar * find, const UT_UCSChar * replace, > UT_uint32 *prefix, UT_Bool matchCase, UT_Bool * bDoneEntireDocument) > { > UT_ASSERT(find && replace); > > // if we have done a find, and there is a selection, then replace what's in the > // selection and move on to next find (batch run, the common case) > if ((m_doneFind == UT_TRUE) && (!isSelectionEmpty())) > { > UT_Bool result = UT_TRUE; > > PP_AttrProp AttrProp_Before; > > if (!isSelectionEmpty()) > { > _eraseInsertionPoint(); > _deleteSelection(&AttrProp_Before); > } > else > { > _eraseInsertionPoint(); > } > > // if we have a string with length, do an insert, else let it hang > // from the delete above > if (*replace) > result = m_pDoc->insertSpan(getPoint(), > replace, > UT_UCS_strlen(replace), > &AttrProp_Before); > > _generalUpdate(); > > // if we've wrapped around once, and we're doing work before we've > // hit the point at which we started, then we adjust the start > // position so that we stop at the right spot. > if (m_wrappedEnd && !*bDoneEntireDocument) > m_startPosition += ((long) UT_UCS_strlen(replace) - (long) UT_UCS_strlen(find)); > > UT_ASSERT(m_startPosition >= 2); > > // do not increase the insertion point index, since the insert span will > // leave us at the correct place. > > _findNext(find, prefix, matchCase, bDoneEntireDocument); > return result; > } > > // if we have done a find, but there is no selection, do a find for them > // but no replace > if (m_doneFind == UT_TRUE && isSelectionEmpty() == UT_TRUE) > { > _findNext(find, prefix, matchCase, bDoneEntireDocument); > return UT_FALSE; > } > > // if we haven't done a find yet, do a find for them > if (m_doneFind == UT_FALSE) > { > _findNext(find, prefix, matchCase, bDoneEntireDocument); > return UT_FALSE; > } > > UT_ASSERT(UT_SHOULD_NOT_HAPPEN); > return UT_FALSE; > } > 3499a3724,3762 > > //Now we compute the static prefix function > //Which can be done based soley on the find string > //we compute this here rather than inside the _findNext > //function so that it is not needlessy re-computed > //this will save a lot on large documents with many > //hits of the find word. > > UT_uint32 m = UT_UCS_strlen(find); > UT_uint32 *prefix; > UT_uint32 k = 0; > UT_uint32 q = 1; > > prefix = (UT_uint32*) calloc (m, sizeof(UT_uint32)); > > prefix[0] = 0; //Must be this reguardless of the string > > if (matchCase) > { > for (q = 1; q < m; q++) > { > while (k > 0 && find[k] != find[q]) > k = prefix[k - 1]; > if(find[k] == find[q]) > k++; > prefix[q] = k; > } > } > else //!matchCase > { > for (q = 1; q < m; q++) > { > while (k > 0 && UT_UCS_tolower(find[k]) != UT_UCS_tolower(find[q])) > k = prefix[k - 1]; > if(UT_UCS_tolower(find[k]) == UT_UCS_tolower(find[q])) > k++; > prefix[q] = k; > } > } 3502c3765 < if (!_findNext(find, matchCase, &bDoneEntireDocument)) --- > if (!_findNext(find, prefix, matchCase, &bDoneEntireDocument)) 3514c3777 < if (!_findReplace(find, replace, matchCase, &bDoneEntireDocument)) --- > if (!_findReplace(find, replace, prefix, matchCase, &bDoneEntireDocument)) 3537a3801,3803 > > //Clean up the prefix function array > FREEP(prefix); Index: abi/src/text/fmt/xp/fv_View.h =================================================================== RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.h,v retrieving revision 1.129 diff -r1.129 fv_View.h 229a230 > UT_Bool _findNext(const UT_UCSChar * find, UT_uint32 *prefix, UT_Bool matchCase = UT_TRUE, UT_Bool * bDoneEntireDocument = NULL); 232a234,235 > UT_Bool matchCase = UT_FALSE, UT_Bool * bDoneEntireDocument = NULL); > UT_Bool _findReplace(const UT_UCSChar * find, const UT_UCSChar * replace, UT_uint32 *prefix,