Skip to Content.
Sympa Menu

sm-sorcery-bugs - [SM-Sorcery-Bugs] [Bug 13356] config_query gets slower as CONFIGURE progresses

sm-sorcery-bugs AT lists.ibiblio.org

Subject: Bugs for Sorcery are reported here

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-sorcery-bugs AT lists.ibiblio.org
  • Subject: [SM-Sorcery-Bugs] [Bug 13356] config_query gets slower as CONFIGURE progresses
  • Date: 4 Jan 2007 20:00:32 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=13356





------- Additional Comments From jakakranjc AT email.si 2007-01-04 14:00 -------
I've checked test, games, z-rej, cauldron, prometheus and quill and the only
regex use I found was in z-rej:opera. Then I fixed it. You said that sorcery
doesn't use it like that, so I think it is safe now to redesign it.

These are the unit tests that were failing with an unqoted $@ - their
expected
result should be inverted, right (not sure about the empty one)?
real_list_find_simple_test "" 1 ""
real_list_find_simple_test "a b c d e" 0 " b "
real_list_find_simple_test "a b c d e" 0 " bla b "

I've modified iuso's script to iterate over the list and do exact matching.
Splitting is only done on spaces. Interestingly enough, it only works if one
variable ($input) is unquoted. >< Otherwise it doesn't get split.

function real_list_find()
{
local item token old_ifs="$IFS"
local input="$1"
shift

IFS=' '
for item in $input
do
#echo "$item"
for token in "$@"
do
[[ "$item" == "$token" ]] && IFS="$old_ifs" && return 0
done
done
IFS="$old_ifs"
return 1
}


--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page