From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15199 invoked from network); 16 Dec 1998 09:22:25 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 16 Dec 1998 09:22:25 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id EAA02663; Wed, 16 Dec 1998 04:19:47 -0500 (EST) Resent-Date: Wed, 16 Dec 1998 04:19:47 -0500 (EST) Date: Wed, 16 Dec 1998 10:17:56 +0100 (MET) Message-Id: <199812160917.KAA00829@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu Subject: PATCH: module setup() fix Resent-Message-ID: <"XrSin3.0.Yf.oitTs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4815 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello On my way home yesterday I remembered that we have to make sure that a setup_foo() function defined by a module is called if the module is linked statically into zsh. The patch below changes mkbltnmlst.sh to ensure this. But this works *only* if the `.mdd' file for the module contains the line `hassetup=1', this isn't fully automated (should it be?). Bye Sven *** os/mkbltnmlst.sh Wed Dec 16 10:07:35 1998 --- Src/mkbltnmlst.sh Wed Dec 16 10:10:19 1998 *************** *** 45,50 **** --- 45,51 ---- echo "/* linked-in module \`$bin_mod' */" eval "loc=\$loc_$bin_mod" unset moddeps + hassetup=0 . $srcdir/../$loc/${bin_mod}.mdd for dep in $moddeps; do case $done_mods in *************** *** 55,60 **** exit 1 ;; esac done ! echo " mod.nam = \"$bin_mod\"; boot_$bin_mod(&mod);" done_mods="$done_mods$bin_mod " done --- 56,65 ---- exit 1 ;; esac done ! if [ $hassetup != 0 ]; then ! echo " mod.nam = \"$bin_mod\"; setup_$bin_mod(&mod); boot_$bin_mod(&mod);" ! else ! echo " mod.nam = \"$bin_mod\"; boot_$bin_mod(&mod);" ! fi done_mods="$done_mods$bin_mod " done -- Sven Wischnowsky wischnow@informatik.hu-berlin.de