# HG changeset patch # User Matti Hamalainen # Date 1131513725 0 # Node ID 4611f11949414a5d94dfb9a4799d9935893b1d3e # Parent 3e55874170eb6277be0dce84536a3e9ac61c18c9 Make binary search bailout value a #define in xmms-sid.h diff -r 3e55874170eb -r 4611f1194941 src/xmms-sid.h --- a/src/xmms-sid.h Wed Nov 09 01:28:04 2005 +0000 +++ b/src/xmms-sid.h Wed Nov 09 05:22:05 2005 +0000 @@ -87,6 +87,7 @@ #define XS_SIDBUF_SIZE (80*1024) +#define XS_BIN_BAILOUT (32) /* Binary search bailout treshold */ #define XS_STIL_MAXENTRY (128) /* Max number of sub-songs in STIL/SLDB node */ diff -r 3e55874170eb -r 4611f1194941 src/xs_length.c --- a/src/xs_length.c Wed Nov 09 01:28:04 2005 +0000 +++ b/src/xs_length.c Wed Nov 09 05:22:05 2005 +0000 @@ -245,7 +245,7 @@ iQNode = (iEndNode / 2); iFound = FALSE; - while ((!iFound) && ((iEndNode - iStartNode) > 128)) { + while ((!iFound) && ((iEndNode - iStartNode) > XS_BIN_BAILOUT)) { r = xs_sldb_cmphash(pHash, db->ppIndex[iQNode]->md5Hash); if (r < 0) { /* Hash was in the <- LEFT side */ diff -r 3e55874170eb -r 4611f1194941 src/xs_stil.c --- a/src/xs_stil.c Wed Nov 09 01:28:04 2005 +0000 +++ b/src/xs_stil.c Wed Nov 09 05:22:05 2005 +0000 @@ -325,7 +325,7 @@ iQNode = (iEndNode / 2); iFound = FALSE; - while ((!iFound) && ((iEndNode - iStartNode) > 128)) { + while ((!iFound) && ((iEndNode - iStartNode) > XS_BIN_BAILOUT)) { r = strcmp(pcFilename, db->ppIndex[iQNode]->pcFilename); if (r < 0) { /* Hash was in the <- LEFT side */