sm-sorcery AT lists.ibiblio.org
Subject: Discussion of Sorcery related topics
List archive
- From: Peter Schneider-Kamp <peter AT schneider-kamp.de>
- To: sm-sorcery AT lists.ibiblio.org
- Subject: [SM-Sorcery]SOURCE limitation
- Date: Tue, 20 Aug 2002 05:28:22 +0200
Is there a good reason for sorcery assuming that SOURCE19
is all there can ever be?
I've just written and submitted a kde i18n spell which
can and will (if someone is sick enough) break this limit,
i.e. some user can select more than 19 languages.
What about a little reflection, e.g. replacing
sources() in subroutines by:
sources { (
if [ -z "$SOURCE" ]; then
SECTION=`find_section $1` &&
[ -x $GRIMOIRE/$SECTION/$1/DETAILS ] &&
. $GRIMOIRE/$SECTION/$1/DETAILS > /dev/null
fi
if [ -n "$SOURCE" ]; then echo $SOURCE; fi
i=2
ii=SOURCE$i
while [ -n "${!$ii}" ]; do
echo ${!$ii}
i=$[$i+1]
ii=SOURCE$i
done
} )
Shorter, more flexible and certainly less readable.
Just-a-nagging-thought-ly y'rs
Peter
--
Peter Schneider-Kamp mailto:peter AT schneider-kamp.de
Deliusstrasse 9 http://schneider-kamp.de
D-52064 Aachen mobile phone: ++49 178 495 1040
-
[SM-Sorcery]SOURCE limitation,
Peter Schneider-Kamp, 08/19/2002
- Re: [SM-Sorcery]SOURCE limitation, Sergey A. Lipnevich, 08/20/2002
- Re: [SM-Sorcery]SOURCE limitation, Jon Svendsen, 08/20/2002
Archive powered by MHonArc 2.6.24.