Skip to Content.
Sympa Menu

sm-sorcery - Re: [SM-Sorcery]SOURCE limitation

sm-sorcery AT lists.ibiblio.org

Subject: Discussion of Sorcery related topics

List archive

Chronological Thread  
  • From: "Sergey A. Lipnevich" <sergeyli AT pisem.net>
  • To: Peter Schneider-Kamp <peter AT schneider-kamp.de>
  • Cc: sm-sorcery AT lists.ibiblio.org
  • Subject: Re: [SM-Sorcery]SOURCE limitation
  • Date: Tue, 20 Aug 2002 10:32:08 -0400

May I suggest that you file a bug against sorcery about this?

Peter Schneider-Kamp wrote:

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








Archive powered by MHonArc 2.6.24.

Top of Page