Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: module setup() fix



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@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author