Hello community, here is the log from the commit of package clucene-core checked in at Wed Sep 24 15:08:32 CEST 2008. -------- --- clucene-core/clucene-core.changes 2008-04-10 12:57:11.000000000 +0200 +++ /mounts/work_src_done/STABLE/clucene-core/clucene-core.changes 2008-09-21 08:26:56.000000000 +0200 @@ -1,0 +2,5 @@ +Sun Sep 21 08:20:59 CEST 2008 - stbinner@suse.de + +- update to 0.9.21: no changelog available + +------------------------------------------------------------------- Old: ---- clucene-core-0.9.20-stripped.tar.bz2 New: ---- clucene-core-0.9.21-stripped.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clucene-core.spec ++++++ --- /var/tmp/diff_new_pack.qN3378/_old 2008-09-24 15:08:10.000000000 +0200 +++ /var/tmp/diff_new_pack.qN3378/_new 2008-09-24 15:08:10.000000000 +0200 @@ -1,10 +1,17 @@ # -# spec file for package clucene-core (Version 0.9.20) +# spec file for package clucene-core (Version 0.9.21) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. -# This file and all modifications and additions to the pristine -# package are under the same license as the package itself. # +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + # Please submit bugfixes or comments via http://bugs.opensuse.org/ # @@ -13,8 +20,8 @@ Name: clucene-core %define pkg_name clucene-core -Version: 0.9.20 -Release: 31 +Version: 0.9.21 +Release: 1 License: The Apache Software License Group: Development/Libraries/C and C++ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -115,6 +122,8 @@ %{_libdir}/libclucene.so %changelog +* Sun Sep 21 2008 stbinner@suse.de +- update to 0.9.21: no changelog available * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support ++++++ clucene-core-0.9.20-stripped.tar.bz2 -> clucene-core-0.9.21-stripped.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/AUTHORS new/clucene-core-0.9.21/AUTHORS --- old/clucene-core-0.9.20/AUTHORS 2007-07-23 13:56:14.000000000 +0200 +++ new/clucene-core-0.9.21/AUTHORS 2008-08-22 16:40:55.000000000 +0200 @@ -9,10 +9,11 @@ Here is a list of contributors. Please send me an email at ustramooner@users.sourceforge.net if I have left you out. -Doug Cutting cutting@users.sourceforge.net -John Wheeler j_wheeler@users.sourceforge.net -Robert G. Ristroph rgristroph@users.sourceforge.net -David Rushby woodsplitter@users.sourceforge.net +Ben van Klinken ustramooner@users.sourceforge.net +Doug Cutting cutting@users.sourceforge.net +John Wheeler j_wheeler@users.sourceforge.net +Robert G. Ristroph rgristroph@users.sourceforge.net +David Rushby woodsplitter@users.sourceforge.net Jimmy Pritts jpritts@sdf.lonestar.org Peter Edwards peter@dragonstaff.co.uk Jorge Sabater Redondo jsabater@elderecho.com diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/configure new/clucene-core-0.9.21/configure --- old/clucene-core-0.9.20/configure 2007-08-20 20:06:30.000000000 +0200 +++ new/clucene-core-0.9.21/configure 2008-08-22 16:42:16.000000000 +0200 @@ -1503,7 +1503,7 @@ -VERSION=0.9.20 +VERSION=0.9.21 clLIB_current=3 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/configure.ac new/clucene-core-0.9.21/configure.ac --- old/clucene-core-0.9.20/configure.ac 2007-10-09 00:54:59.000000000 +0200 +++ new/clucene-core-0.9.21/configure.ac 2008-09-21 08:19:46.000000000 +0200 @@ -6,7 +6,7 @@ AC_INIT(src/CLucene/StdHeader.h) dnl the clucene-core package version -VERSION=0.9.20 +VERSION=0.9.21 dnl increment if interfaces have been added, removed or changed clLIB_current=3 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/doc/helpheader.htm new/clucene-core-0.9.21/doc/helpheader.htm --- old/clucene-core-0.9.20/doc/helpheader.htm 2007-08-20 20:07:18.000000000 +0200 +++ new/clucene-core-0.9.21/doc/helpheader.htm 2008-08-22 16:42:51.000000000 +0200 @@ -1,15 +1,15 @@ <HTML> <HEAD> <TITLE> -CLucene API Documentation (Version 0.9.20) +CLucene API Documentation (Version 0.9.21) </TITLE> -<META NAME="keywords" CONTENT="CLucene API Documentation (Version 0.9.20)"> +<META NAME="keywords" CONTENT="CLucene API Documentation (Version 0.9.21)"> <SCRIPT type="text/javascript"> function windowTitle() { - parent.document.title="CLucene API Documentation (Version 0.9.20)"; + parent.document.title="CLucene API Documentation (Version 0.9.21)"; } </SCRIPT> diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/analysis/AnalysisHeader.cpp new/clucene-core-0.9.21/src/CLucene/analysis/AnalysisHeader.cpp --- old/clucene-core-0.9.20/src/CLucene/analysis/AnalysisHeader.cpp 2007-07-23 13:56:00.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/analysis/AnalysisHeader.cpp 2008-08-22 16:40:15.000000000 +0200 @@ -78,7 +78,7 @@ } void Token::growBuffer(size_t size){ - if(bufferTextLen>size) + if(bufferTextLen>=size) return; #ifndef LUCENE_TOKEN_WORD_LENGTH if ( _termText == NULL ) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/analysis/Analyzers.cpp new/clucene-core-0.9.21/src/CLucene/analysis/Analyzers.cpp --- old/clucene-core-0.9.20/src/CLucene/analysis/Analyzers.cpp 2007-08-15 13:49:50.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/analysis/Analyzers.cpp 2008-08-22 16:40:15.000000000 +0200 @@ -169,7 +169,7 @@ int32_t l = token->termTextLength(); const TCHAR* chars = token->termText(); bool doProcess = false; - for (int i = 0; i < l; ++i) { + for (int32_t i = 0; i < l; ++i) { #ifdef _UCS2 if ( chars[i] >= 0xC0 && chars[i] <= 0x178 ) { #else diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/config/compiler.h new/clucene-core-0.9.21/src/CLucene/config/compiler.h --- old/clucene-core-0.9.20/src/CLucene/config/compiler.h 2007-07-23 13:56:02.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/config/compiler.h 2008-08-22 16:40:19.000000000 +0200 @@ -150,9 +150,9 @@ //this is the max filename... for now its just the same, //but this could change, so we use a different name #define CL_MAX_NAME CL_MAX_PATH -//todo: this is a temporary fix for a potential buffer overflow... -//should never use this -#define CL_MAX_DIR CL_MAX_PATH*32 +//this used to be CL_MAX_NAME * 32, but as Alex Hudson points out, this could come to be 128kb. +//the above logic for CL_MAX_NAME should be correct enough to handle all file names +#define CL_MAX_DIR CL_MAX_PATH #ifdef _LARGE_FILES #define LUCENE_MAX_FILELENGTH LUCENE_INT64_MAX_SHOULDBE diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/index/IndexReader.cpp new/clucene-core-0.9.21/src/CLucene/index/IndexReader.cpp --- old/clucene-core-0.9.20/src/CLucene/index/IndexReader.cpp 2007-07-23 13:56:02.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/index/IndexReader.cpp 2008-08-22 16:40:25.000000000 +0200 @@ -195,6 +195,7 @@ if (locked) { commitLock->release(); } + _CLDELETE(commitLock); ) return ret; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/index/IndexWriter.cpp new/clucene-core-0.9.21/src/CLucene/index/IndexWriter.cpp --- old/clucene-core-0.9.20/src/CLucene/index/IndexWriter.cpp 2007-07-23 13:56:02.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/index/IndexWriter.cpp 2008-08-22 16:40:25.000000000 +0200 @@ -549,15 +549,19 @@ } i++; } + +// commented out by tbusch to solve a bug and to be conform with +// java lucene // merge newly added segments in log(n) passes - while (segmentInfos->size() > start+mergeFactor) { - for (int32_t base = start; base < segmentInfos->size(); base++) { - int32_t end = min(segmentInfos->size(), base+mergeFactor); - if (end-base > 1) - mergeSegments(base, end); - } - } +// while (segmentInfos->size() > start+mergeFactor) { +// for (int32_t base = start; base < segmentInfos->size(); base++) { +// int32_t end = min(segmentInfos->size(), base+mergeFactor); +// if (end-base > 1) { +// mergeSegments(base, end); +// } +// } +// } optimize(); // cleanup } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/index/Term.cpp new/clucene-core-0.9.21/src/CLucene/index/Term.cpp --- old/clucene-core-0.9.20/src/CLucene/index/Term.cpp 2007-07-23 13:56:02.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/index/Term.cpp 2008-08-22 16:40:25.000000000 +0200 @@ -28,7 +28,7 @@ textLen = 0; } -Term::Term(const TCHAR* fld, const TCHAR* txt,const bool internField){ +Term::Term(const TCHAR* fld, const TCHAR* txt, bool internField){ //Func - Constructor. // Constructs a Term with the given field and text. Field and text are not copied // Field and text are deleted in destructor only if intern is false. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/index/TermInfo.cpp new/clucene-core-0.9.21/src/CLucene/index/TermInfo.cpp --- old/clucene-core-0.9.20/src/CLucene/index/TermInfo.cpp 2007-07-23 13:56:02.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/index/TermInfo.cpp 2008-08-22 16:40:25.000000000 +0200 @@ -61,7 +61,7 @@ skipOffset = ti->skipOffset; } -void TermInfo::set(const int32_t df, const int64_t fp, const int64_t pp, const int32_t so) { +void TermInfo::set(const int32_t df, const int64_t fp, const int64_t pp, int32_t so) { //Func - Sets a new document frequency, a new freqPointer and a new proxPointer //Pre - df >= 0, fp >= 0 pp >= 0 //Post - The new document frequency, a new freqPointer and a new proxPointer diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/LuceneThreads.h new/clucene-core-0.9.21/src/CLucene/LuceneThreads.h --- old/clucene-core-0.9.20/src/CLucene/LuceneThreads.h 2007-07-23 13:56:03.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/LuceneThreads.h 2008-08-22 16:40:28.000000000 +0200 @@ -12,7 +12,6 @@ #if defined(_CL_DISABLE_MULTITHREADING) #define SCOPED_LOCK_MUTEX(theMutex) - #define SCOPED_LOCK_MUTEX_EX(theMutex,mutexname,dummy) #define DEFINE_MUTEX(x) #define STATIC_DEFINE_MUTEX(x) #define _LUCENE_SLEEP(x) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/search/Hits.cpp new/clucene-core-0.9.21/src/CLucene/search/Hits.cpp --- old/clucene-core-0.9.20/src/CLucene/search/Hits.cpp 2007-07-23 13:56:02.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/search/Hits.cpp 2008-08-22 16:40:23.000000000 +0200 @@ -66,7 +66,7 @@ return _length; } - Document& Hits::doc(int32_t n){ + Document& Hits::doc(const int32_t n){ HitDoc* hitDoc = getHitDoc(n); // Update LRU cache of documents diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/store/FSDirectory.cpp new/clucene-core-0.9.21/src/CLucene/store/FSDirectory.cpp --- old/clucene-core-0.9.20/src/CLucene/store/FSDirectory.cpp 2007-08-10 17:52:04.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/store/FSDirectory.cpp 2008-08-22 16:40:17.000000000 +0200 @@ -392,12 +392,13 @@ }else if ( _create ){ dir->create(); } + + { + SCOPED_LOCK_MUTEX(dir->THIS_LOCK) + dir->refCount++; + } } - { - SCOPED_LOCK_MUTEX(dir->THIS_LOCK) - dir->refCount++; - } return _CL_POINTER(dir); } @@ -552,8 +553,10 @@ //we can wait until the dir_Exists() returns false //after the success run of unlink() int i=0; - while ( Misc::dir_Exists(nu) && i < 100 ) - i++; + while ( Misc::dir_Exists(nu) && i < 100 ){ + if ( ++i > 50 ) //if it still doesn't show up, then we do some sleeping for the last 50ms + _LUCENE_SLEEP(1); + } if ( !Misc::dir_Exists(nu) ) break; //keep trying to unlink until the file is gone, or the unlink fails. } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/store/FSDirectory.h new/clucene-core-0.9.21/src/CLucene/store/FSDirectory.h --- old/clucene-core-0.9.20/src/CLucene/store/FSDirectory.h 2007-07-23 13:56:01.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/store/FSDirectory.h 2008-08-22 16:40:17.000000000 +0200 @@ -71,6 +71,7 @@ static const char* DirectoryType(){ return "MMAP"; } const char* getDirectoryType() const{ return DirectoryType(); } }; + friend class FSDirectory::MMapIndexInput; #endif class FSIndexInput:public BufferedIndexInput { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/store/IndexInput.cpp new/clucene-core-0.9.21/src/CLucene/store/IndexInput.cpp --- old/clucene-core-0.9.20/src/CLucene/store/IndexInput.cpp 2007-08-11 12:49:48.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/store/IndexInput.cpp 2008-08-22 16:40:17.000000000 +0200 @@ -18,7 +18,10 @@ } int32_t IndexInput::readInt() { - return (readByte() << 24) | (readByte() << 16) | (readByte() << 8) | readByte(); + int32_t b = (readByte() << 24); + b |= (readByte() << 16); + b |= (readByte() << 8); + return (b | readByte()); } int32_t IndexInput::readVInt() { @@ -32,7 +35,8 @@ } int64_t IndexInput::readLong() { - return ((int64_t)readInt() << 32) | ((int64_t)readInt() & 0xFFFFFFFFL); + int64_t i = ((int64_t)readInt() << 32); + return (i | ((int64_t)readInt() & 0xFFFFFFFFL)); } int64_t IndexInput::readVLong() { @@ -40,10 +44,24 @@ int64_t i = b & 0x7F; for (int32_t shift = 7; (b & 0x80) != 0; shift += 7) { b = readByte(); - i |= (b & 0x7FL) << shift; + i |= (((int64_t)b) & 0x7FL) << shift; } return i; } + + void IndexInput::skipChars( const int32_t count) { + for (int32_t i = 0; i < count; i++) { + TCHAR b = readByte(); + if ((b & 0x80) == 0) { + // Do Nothing. + } else if ((b & 0xE0) != 0xE0) { + readByte(); + } else { + readByte(); + readByte(); + } + } +} int32_t IndexInput::readString(TCHAR* buffer, const int32_t maxLength){ int32_t len = readVInt(); @@ -52,8 +70,10 @@ readChars(buffer, 0, ml); buffer[ml] = 0; //we have to finish reading all the data for this string! - if ( len-ml > 0 ) - seek(getFilePointer()+(len-ml)); + if ( len-ml > 0 ){ + //seek(getFilePointer()+(len-ml)); <- that was the wrong way to "finish reading" + skipChars(len-ml); + } return ml; }else{ readChars(buffer, 0, len); @@ -90,9 +110,8 @@ b = (((b & 0x1F) << 6) | (readByte() & 0x3F)); } else { - b = (((b & 0x0F) << 12) - | ((readByte() & 0x3F) << 6) - | (readByte() & 0x3F)); + b = ((b & 0x0F) << 12) | ((readByte() & 0x3F) << 6); + b |= (readByte() & 0x3F); } buffer[i] = b; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/store/IndexInput.h new/clucene-core-0.9.21/src/CLucene/store/IndexInput.h --- old/clucene-core-0.9.20/src/CLucene/store/IndexInput.h 2007-07-23 13:56:01.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/store/IndexInput.h 2008-08-22 16:40:17.000000000 +0200 @@ -22,6 +22,8 @@ * @see IndexOutput */ class IndexInput: LUCENE_BASE { + private: + void skipChars( const int32_t count); protected: IndexInput(); IndexInput(const IndexInput& clone); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/clucene-core-0.9.20/src/CLucene/util/dirent.cpp new/clucene-core-0.9.21/src/CLucene/util/dirent.cpp --- old/clucene-core-0.9.20/src/CLucene/util/dirent.cpp 2007-07-23 13:56:03.000000000 +0200 +++ new/clucene-core-0.9.21/src/CLucene/util/dirent.cpp 2008-08-22 16:40:28.000000000 +0200 @@ -111,6 +111,8 @@ return NULL; } + bool bCallFindNext = true; + if (dirp->dd_stat < 0) { /* We have already returned all files in the directory @@ -133,53 +135,64 @@ { dirp->dd_stat = 1; } + + /* Dont call _findnext first time. */ + bCallFindNext = false; } - else + + while (dirp->dd_stat > 0) { - /* Get the next search entry. */ - if (_findnext (dirp->dd_handle, &(dirp->dd_dta))) - { - /* We are off the end or otherwise error. */ - _findclose (dirp->dd_handle); - dirp->dd_handle = -1; - dirp->dd_stat = -1; - } - else + if (bCallFindNext) { - /* Update the status to indicate the correct - * number. */ - dirp->dd_stat++; + /* Get the next search entry. */ + if (_findnext (dirp->dd_handle, &(dirp->dd_dta))) + { + /* We are off the end or otherwise error. */ + _findclose (dirp->dd_handle); + dirp->dd_handle = -1; + dirp->dd_stat = -1; + return NULL; + } + else + { + /* Update the status to indicate the correct + * number. */ + dirp->dd_stat++; + } } - } - if (dirp->dd_stat > 0) - { /* Successfully got an entry. Everything about the file is * already appropriately filled in except the length of the * file name. */ dirp->dd_dir.d_namlen = strlen (dirp->dd_dir.d_name); - if ( dirp->dd_dir.d_name[0] == '.' && - (dirp->dd_dir.d_name[1] == 0 || - (dirp->dd_dir.d_name[1] == '.' && dirp->dd_dir.d_name[2] == 0))) - return readdir(dirp); - - struct _stat buf; - char buffer[CL_MAX_DIR]; - size_t bl = strlen(dirp->dd_name)-strlen(DIRENT_SEARCH_SUFFIX); - strncpy(buffer,dirp->dd_name,bl); - buffer[bl]=0; - strcat(buffer, dirp->dd_dir.d_name); - if ( _stat(buffer,&buf) == -1 ) - return readdir(dirp); + bool bThisFolderOrUpFolder = dirp->dd_dir.d_name[0] == '.' && + (dirp->dd_dir.d_name[1] == 0 || (dirp->dd_dir.d_name[1] == '.' && dirp->dd_dir.d_name[2] == 0)); + + if (!bThisFolderOrUpFolder) + { + struct _stat buf; + char buffer[CL_MAX_DIR]; + size_t bl = strlen(dirp->dd_name)-strlen(DIRENT_SEARCH_SUFFIX); + strncpy(buffer,dirp->dd_name,bl); + buffer[bl]=0; + strcat(buffer, dirp->dd_dir.d_name); + if ( _stat(buffer,&buf) == 0 ) + { + /* Finally we have a valid entry. */ + return &dirp->dd_dir; + } + } - return &dirp->dd_dir; + /* Allow to find next file. */ + bCallFindNext = true; } return NULL; } + int32_t closedir (DIR * dirp) { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org