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

PATCH: revised hierarchical module names



This is patch 9046 updated for 3.1.2-pws-12 (plus patches 907[4567]
and 9081).  It also fixes the .export dependencies to be handled like
the .mdh dependencies, ensuring that the required .export files are
actually available when needed.  I'm afraid that fixing that couldn't
really be disentangled from updating the mkmakemod.sh patch.

I include patches for the zprof module as in 9046, even though zprof isn't
in 3.1.2-pws-12.  If you don't have zprof in your source tree, those two
patches will fail due to having nothing to patch; this is perfectly safe.

This still doesn't do aliases for the historical module names -- that's
coming in a separate patch.

diff -cr ../zsh-/Completion/User/_cvs ./Completion/User/_cvs
*** ../zsh-/Completion/User/_cvs	Mon Dec 13 20:35:19 1999
--- ./Completion/User/_cvs	Thu Dec 16 10:14:12 1999
***************
*** 489,495 ****
  (( $+functions[_cvs_extract_modifiedfile_entries] )) ||
  _cvs_extract_modifiedfile_entries () {
    if zstyle -t ":completion${curcontext}:cvs" disable-stat ||
!      ! { zmodload -e stat || zmodload stat }; then
      _cvs_extract_file_entries
      return
    fi
--- 489,495 ----
  (( $+functions[_cvs_extract_modifiedfile_entries] )) ||
  _cvs_extract_modifiedfile_entries () {
    if zstyle -t ":completion${curcontext}:cvs" disable-stat ||
!      ! { zmodload -e zsh/stat || zmodload zsh/stat }; then
      _cvs_extract_file_entries
      return
    fi
diff -cr ../zsh-/Doc/Makefile.in ./Doc/Makefile.in
*** ../zsh-/Doc/Makefile.in	Mon Dec 13 20:42:04 1999
--- ./Doc/Makefile.in	Thu Dec 16 10:14:12 1999
***************
*** 172,178 ****
  	    modules=`echo '' $(MODDOCSRC) '' | sed 's| Zsh/mod_| |g;s|\.yo | |g'`; \
  	    echo "startitem()"; \
  	    for mod in $$modules; do \
! 		echo "item(tt($$mod))("; \
  		sed -n '1d;/^!MOD!)$$/q;p' < $(sdir)/Zsh/mod_$${mod}.yo; \
  		echo ")"; \
  	    done; \
--- 172,178 ----
  	    modules=`echo '' $(MODDOCSRC) '' | sed 's| Zsh/mod_| |g;s|\.yo | |g'`; \
  	    echo "startitem()"; \
  	    for mod in $$modules; do \
! 		echo "item(tt(zsh/$$mod))("; \
  		sed -n '1d;/^!MOD!)$$/q;p' < $(sdir)/Zsh/mod_$${mod}.yo; \
  		echo ")"; \
  	    done; \
***************
*** 182,189 ****
  	    echo "endmenu()"; \
  	    set '' $$modules; \
  	    while test ".$$2" != .; do \
! 		echo "texinode(The $$2 Module)($${3+The $$3 Module})($${1:+The $$1 Module})(Zsh Modules)"; \
! 		echo "sect(The $$2 Module)"; \
  		echo "includefile(Zsh/mod_$${2}.yo)"; \
  		shift; \
  	    done \
--- 182,189 ----
  	    echo "endmenu()"; \
  	    set '' $$modules; \
  	    while test ".$$2" != .; do \
! 		echo "texinode(The zsh/$$2 Module)($${3+The $$3 Module})($${1:+The $$1 Module})(Zsh Modules)"; \
! 		echo "sect(The zsh/$$2 Module)"; \
  		echo "includefile(Zsh/mod_$${2}.yo)"; \
  		shift; \
  	    done \
***************
*** 193,199 ****
  	( \
  	    modules=`echo '' $(MODDOCSRC) '' | sed 's| Zsh/mod_| |g;s|\.yo | |g'`; \
  	    for mod in $$modules; do \
! 		echo "menu(The $$mod Module)"; \
  	    done \
  	) > $(sdir)/Zsh/modmenu.yo
  
--- 193,199 ----
  	( \
  	    modules=`echo '' $(MODDOCSRC) '' | sed 's| Zsh/mod_| |g;s|\.yo | |g'`; \
  	    for mod in $$modules; do \
! 		echo "menu(The zsh/$$mod Module)"; \
  	    done \
  	) > $(sdir)/Zsh/modmenu.yo
  
diff -cr ../zsh-/Doc/Zsh/builtins.yo ./Doc/Zsh/builtins.yo
*** ../zsh-/Doc/Zsh/builtins.yo	Sun Nov 28 17:42:27 1999
--- ./Doc/Zsh/builtins.yo	Thu Dec 16 10:14:12 1999
***************
*** 1303,1318 ****
  item(tt(zmodload) tt(-u) [ tt(-i) ] var(name) ...)(
  In the simplest case, tt(zmodload) loads a binary module.  The module must
  be in a file with a name consisting of the specified var(name) followed by
! a standard suffix, usually `tt(.so)'.  If this can't be found, the
! var(name) is tried without the suffix.  If the module to be loaded is
  already loaded and the tt(-i) option is given, the duplicate module is
  ignored.  Otherwise tt(zmodload) prints an error message.
  
  The var(name)d module is searched for in the same way a command is, using
! tt($module_path) instead of tt($path).  If var(name) contains a `tt(/)',
! it will be used as-is, and a path search will be performed otherwise.
! This behaviour can be modified by the tt(PATH_DIRS) option.
! cindex(PATH_DIRS, use of)
  
  With tt(-u), tt(zmodload) unloads modules.  The same var(name)
  must be given that was given when the module was loaded, but it is not
--- 1303,1317 ----
  item(tt(zmodload) tt(-u) [ tt(-i) ] var(name) ...)(
  In the simplest case, tt(zmodload) loads a binary module.  The module must
  be in a file with a name consisting of the specified var(name) followed by
! a standard suffix, usually `tt(.so)'.
! If the module to be loaded is
  already loaded and the tt(-i) option is given, the duplicate module is
  ignored.  Otherwise tt(zmodload) prints an error message.
  
  The var(name)d module is searched for in the same way a command is, using
! tt($module_path) instead of tt($path).  However, the path search is
! performed even when the module name contains a `tt(/)', which it usually does.
! There is no way to prevent the path search.
  
  With tt(-u), tt(zmodload) unloads modules.  The same var(name)
  must be given that was given when the module was loaded, but it is not
diff -cr ../zsh-/Doc/Zsh/mod_cap.yo ./Doc/Zsh/mod_cap.yo
*** ../zsh-/Doc/Zsh/mod_cap.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_cap.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  Builtins for manipulating POSIX.1e (POSIX.6) capability (privilege) sets.
  !MOD!)
! The tt(cap) module is used for manipulating POSIX.1e (POSIX.6) capability
  sets.  If the operating system does not support this interface, the
  builtins defined by this module will do nothing.
  The builtins in this module are:
--- 1,7 ----
  COMMENT(!MOD!
  Builtins for manipulating POSIX.1e (POSIX.6) capability (privilege) sets.
  !MOD!)
! The tt(zsh/cap) module is used for manipulating POSIX.1e (POSIX.6) capability
  sets.  If the operating system does not support this interface, the
  builtins defined by this module will do nothing.
  The builtins in this module are:
diff -cr ../zsh-/Doc/Zsh/mod_clone.yo ./Doc/Zsh/mod_clone.yo
*** ../zsh-/Doc/Zsh/mod_clone.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_clone.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  A builtin that can clone a running shell onto another terminal.
  !MOD!)
! The tt(clone) module makes available one builtin command:
  
  startitem()
  findex(clone)
--- 1,7 ----
  COMMENT(!MOD!
  A builtin that can clone a running shell onto another terminal.
  !MOD!)
! The tt(zsh/clone) module makes available one builtin command:
  
  startitem()
  findex(clone)
diff -cr ../zsh-/Doc/Zsh/mod_compctl.yo ./Doc/Zsh/mod_compctl.yo
*** ../zsh-/Doc/Zsh/mod_compctl.yo	Tue Dec 14 23:12:27 1999
--- ./Doc/Zsh/mod_compctl.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  The tt(compctl) builtin for controlling completion.
  !MOD!)
! The tt(compctl) module makes available two builtin commands. tt(compctl),
  is the old, deprecated way to control completions for ZLE.  See
  ifzman(zmanref(zshcompctl))\
  ifnzman(noderef(Programmable Completion Using compctl))\
--- 1,7 ----
  COMMENT(!MOD!
  The tt(compctl) builtin for controlling completion.
  !MOD!)
! The tt(zsh/compctl) module makes available two builtin commands. tt(compctl),
  is the old, deprecated way to control completions for ZLE.  See
  ifzman(zmanref(zshcompctl))\
  ifnzman(noderef(Programmable Completion Using compctl))\
diff -cr ../zsh-/Doc/Zsh/mod_complete.yo ./Doc/Zsh/mod_complete.yo
*** ../zsh-/Doc/Zsh/mod_complete.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_complete.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  The basic completion code.
  !MOD!)
! The tt(complete) module makes available several builtin commands which
  can be used in user-defined completion widgets, see
  ifzman(zmanref(zshcompwid))\
  ifnzman(noderef(Completion Widgets))\
--- 1,7 ----
  COMMENT(!MOD!
  The basic completion code.
  !MOD!)
! The tt(zsh/complete) module makes available several builtin commands which
  can be used in user-defined completion widgets, see
  ifzman(zmanref(zshcompwid))\
  ifnzman(noderef(Completion Widgets))\
diff -cr ../zsh-/Doc/Zsh/mod_complist.yo ./Doc/Zsh/mod_complist.yo
*** ../zsh-/Doc/Zsh/mod_complist.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_complist.yo	Thu Dec 16 10:14:12 1999
***************
*** 3,17 ****
  !MOD!)
  cindex(completion, listing)
  cindex(completion, coloured listings)
! The tt(complist) module offers two extensions to completion listings:
  the ability to highlight matches in such a list and a different
  style of menu-completion.
  
  Whenever one of the parameters tt(ZLS_COLORS) or tt(ZLS_COLOURS) is set 
! and the tt(complist) module is loaded or linked into the shell,
  completion lists will be colored.  Note, however, that tt(complist) will
  not automatically be loaded if it is not linked in:  on systems with
! dynamic loading, `tt(zmodload complist)' is required.
  
  subsect(Parameters)
  vindex(ZLS_COLORS)
--- 3,17 ----
  !MOD!)
  cindex(completion, listing)
  cindex(completion, coloured listings)
! The tt(zsh/complist) module offers two extensions to completion listings:
  the ability to highlight matches in such a list and a different
  style of menu-completion.
  
  Whenever one of the parameters tt(ZLS_COLORS) or tt(ZLS_COLOURS) is set 
! and the tt(zsh/complist) module is loaded or linked into the shell,
  completion lists will be colored.  Note, however, that tt(complist) will
  not automatically be loaded if it is not linked in:  on systems with
! dynamic loading, `tt(zmodload zsh/complist)' is required.
  
  subsect(Parameters)
  vindex(ZLS_COLORS)
***************
*** 130,136 ****
  cindex(completion, selecting by cursor)
  vindex(SELECTMIN)
  tindex(menu-select)
! The tt(complist) module also offers an alternative style of selecting
  matches from a list, called menu-selection, which can be used if the
  shell is set up to return to the last prompt after showing a
  completion list (see the tt(ALWAYS_LAST_PROMPT) option in
--- 130,136 ----
  cindex(completion, selecting by cursor)
  vindex(SELECTMIN)
  tindex(menu-select)
! The tt(zsh/complist) module also offers an alternative style of selecting
  matches from a list, called menu-selection, which can be used if the
  shell is set up to return to the last prompt after showing a
  completion list (see the tt(ALWAYS_LAST_PROMPT) option in
***************
*** 211,214 ****
  
  indent(tt(bindkey -M menuselect '^M' send-break))
  
! after loading the tt(complist) module.
--- 211,214 ----
  
  indent(tt(bindkey -M menuselect '^M' send-break))
  
! after loading the tt(zsh/complist) module.
diff -cr ../zsh-/Doc/Zsh/mod_computil.yo ./Doc/Zsh/mod_computil.yo
*** ../zsh-/Doc/Zsh/mod_computil.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_computil.yo	Thu Dec 16 10:14:12 1999
***************
*** 3,9 ****
  completion system.
  !MOD!)
  cindex(completion, utility)
! The tt(computil) module adds several builtin commands that are used by
  some of the completion functions in the shell function based
  completions system (see
  ifzman(zmanref(zshcompsys))\
--- 3,9 ----
  completion system.
  !MOD!)
  cindex(completion, utility)
! The tt(zsh/computil) module adds several builtin commands that are used by
  some of the completion functions in the shell function based
  completions system (see
  ifzman(zmanref(zshcompsys))\
diff -cr ../zsh-/Doc/Zsh/mod_deltochar.yo ./Doc/Zsh/mod_deltochar.yo
*** ../zsh-/Doc/Zsh/mod_deltochar.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_deltochar.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  A ZLE function duplicating EMACS' tt(zap-to-char).
  !MOD!)
! The tt(deltochar) module makes available two ZLE functions:
  
  startitem()
  tindex(delete-to-char)
--- 1,7 ----
  COMMENT(!MOD!
  A ZLE function duplicating EMACS' tt(zap-to-char).
  !MOD!)
! The tt(zsh/deltochar) module makes available two ZLE functions:
  
  startitem()
  tindex(delete-to-char)
diff -cr ../zsh-/Doc/Zsh/mod_example.yo ./Doc/Zsh/mod_example.yo
*** ../zsh-/Doc/Zsh/mod_example.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_example.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  An example of how to write a module.
  !MOD!)
! The tt(example) module makes available one builtin command:
  
  startitem()
  findex(example)
--- 1,7 ----
  COMMENT(!MOD!
  An example of how to write a module.
  !MOD!)
! The tt(zsh/example) module makes available one builtin command:
  
  startitem()
  findex(example)
diff -cr ../zsh-/Doc/Zsh/mod_files.yo ./Doc/Zsh/mod_files.yo
*** ../zsh-/Doc/Zsh/mod_files.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_files.yo	Thu Dec 16 10:14:12 1999
***************
*** 2,8 ****
  Some basic file manipulation commands as builtins.
  !MOD!)
  cindex(files, manipulating)
! The tt(files) module makes some standard commands available as builtins:
  
  startitem()
  findex(chgrp)
--- 2,8 ----
  Some basic file manipulation commands as builtins.
  !MOD!)
  cindex(files, manipulating)
! The tt(zsh/files) module makes some standard commands available as builtins:
  
  startitem()
  findex(chgrp)
diff -cr ../zsh-/Doc/Zsh/mod_mapfile.yo ./Doc/Zsh/mod_mapfile.yo
*** ../zsh-/Doc/Zsh/mod_mapfile.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_mapfile.yo	Thu Dec 16 10:14:12 1999
***************
*** 2,8 ****
  Access to external files via a special associative array.
  !MOD!)
  cindex(parameter, file access via)
! The tt(mapfile) module provides one special associative array parameter of
  the same name.
  
  startitem()
--- 2,8 ----
  Access to external files via a special associative array.
  !MOD!)
  cindex(parameter, file access via)
! The tt(zsh/mapfile) module provides one special associative array parameter of
  the same name.
  
  startitem()
diff -cr ../zsh-/Doc/Zsh/mod_mathfunc.yo ./Doc/Zsh/mod_mathfunc.yo
*** ../zsh-/Doc/Zsh/mod_mathfunc.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_mathfunc.yo	Thu Dec 16 10:14:12 1999
***************
*** 3,9 ****
  !MOD!)
  cindex(functions, mathematical)
  cindex(mathematical functions)
! The tt(mathfunc) module provides standard mathematical functions for use when
  evaluating mathematical formulae.  The syntax agrees with normal C and
  FORTRAN conventions, for example,
  
--- 3,10 ----
  !MOD!)
  cindex(functions, mathematical)
  cindex(mathematical functions)
! The tt(zsh/mathfunc) module provides standard
! mathematical functions for use when
  evaluating mathematical formulae.  The syntax agrees with normal C and
  FORTRAN conventions, for example,
  
diff -cr ../zsh-/Doc/Zsh/mod_parameter.yo ./Doc/Zsh/mod_parameter.yo
*** ../zsh-/Doc/Zsh/mod_parameter.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_parameter.yo	Thu Dec 16 10:14:12 1999
***************
*** 2,8 ****
  Access to internal hash tables via special associative arrays.
  !MOD!)
  cindex(parameters, special)
! The tt(parameter) module gives access to some of the internal hash
  tables used by the shell by defining some special parameters.
  
  startitem()
--- 2,8 ----
  Access to internal hash tables via special associative arrays.
  !MOD!)
  cindex(parameters, special)
! The tt(zsh/parameter) module gives access to some of the internal hash
  tables used by the shell by defining some special parameters.
  
  startitem()
diff -cr ../zsh-/Doc/Zsh/mod_sched.yo ./Doc/Zsh/mod_sched.yo
*** ../zsh-/Doc/Zsh/mod_sched.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_sched.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  A builtin that provides a timed execution facility within the shell.
  !MOD!)
! The tt(sched) module makes available one builtin command:
  
  startitem()
  findex(sched)
--- 1,7 ----
  COMMENT(!MOD!
  A builtin that provides a timed execution facility within the shell.
  !MOD!)
! The tt(zsh/sched) module makes available one builtin command:
  
  startitem()
  findex(sched)
diff -cr ../zsh-/Doc/Zsh/mod_stat.yo ./Doc/Zsh/mod_stat.yo
*** ../zsh-/Doc/Zsh/mod_stat.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_stat.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  A builtin command interface to the tt(stat) system call.
  !MOD!)
! The tt(stat) module makes available one builtin command:
  
  startitem()
  findex(stat)
--- 1,7 ----
  COMMENT(!MOD!
  A builtin command interface to the tt(stat) system call.
  !MOD!)
! The tt(zsh/stat) module makes available one builtin command:
  
  startitem()
  findex(stat)
diff -cr ../zsh-/Doc/Zsh/mod_zftp.yo ./Doc/Zsh/mod_zftp.yo
*** ../zsh-/Doc/Zsh/mod_zftp.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_zftp.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,14 ****
  COMMENT(!MOD!
  A builtin FTP client.
  !MOD!)
! The tt(zftp) module makes available one builtin command:
  
  startitem()
  findex(zftp)
  cindex(FTP)
  cindex(files, transferring)
  item(tt(zftp) var(subcommand) [ var(args) ])(
! The tt(zftp) module is a client for FTP (file transfer protocol).  It
  is implemented as a builtin to allow full use of shell command line
  editing, file I/O, and job control mechanisms.  Often, users will
  access it via shell functions providing a more powerful interface; a set is
--- 1,14 ----
  COMMENT(!MOD!
  A builtin FTP client.
  !MOD!)
! The tt(zsh/zftp) module makes available one builtin command:
  
  startitem()
  findex(zftp)
  cindex(FTP)
  cindex(files, transferring)
  item(tt(zftp) var(subcommand) [ var(args) ])(
! The tt(zsh/zftp) module is a client for FTP (file transfer protocol).  It
  is implemented as a builtin to allow full use of shell command line
  editing, file I/O, and job control mechanisms.  Often, users will
  access it via shell functions providing a more powerful interface; a set is
***************
*** 84,90 ****
  cause an error.
  
  The list of parameters is not deleted after a tt(close), however it
! will be deleted if the tt(zftp) module is unloaded.
  
  For example,
  
--- 84,90 ----
  cause an error.
  
  The list of parameters is not deleted after a tt(close), however it
! will be deleted if the tt(zsh/zftp) module is unloaded.
  
  For example,
  
diff -cr ../zsh-/Doc/Zsh/mod_zle.yo ./Doc/Zsh/mod_zle.yo
*** ../zsh-/Doc/Zsh/mod_zle.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_zle.yo	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  COMMENT(!MOD!
  The Zsh Line Editor, including the tt(bindkey) and tt(vared) builtins.
  !MOD!)
! The tt(zle) module contains the Zsh Line Editor.  See
  ifzman(zmanref(zshzle))\
  ifnzman(noderef(Zsh Line Editor))\
  .  It also contains three related builtin commands:
--- 1,7 ----
  COMMENT(!MOD!
  The Zsh Line Editor, including the tt(bindkey) and tt(vared) builtins.
  !MOD!)
! The tt(zsh/zle) module contains the Zsh Line Editor.  See
  ifzman(zmanref(zshzle))\
  ifnzman(noderef(Zsh Line Editor))\
  .  It also contains three related builtin commands:
diff -cr ../zsh-/Doc/Zsh/mod_zleparameter.yo ./Doc/Zsh/mod_zleparameter.yo
*** ../zsh-/Doc/Zsh/mod_zleparameter.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_zleparameter.yo	Thu Dec 16 10:14:12 1999
***************
*** 2,8 ****
  Access to internals of the Zsh Line Editor via parameters.
  !MOD!)
  cindex(parameters, special)
! The tt(zleparameter) module defines two special parameters that can be 
  used to access internal information of the Zsh Line Editor (see
  ifzman(zmanref(zshzle))\
  ifnzman(noderef(Zsh Line Editor))\
--- 2,8 ----
  Access to internals of the Zsh Line Editor via parameters.
  !MOD!)
  cindex(parameters, special)
! The tt(zsh/zleparameter) module defines two special parameters that can be 
  used to access internal information of the Zsh Line Editor (see
  ifzman(zmanref(zshzle))\
  ifnzman(noderef(Zsh Line Editor))\
diff -cr ../zsh-/Doc/Zsh/mod_zutil.yo ./Doc/Zsh/mod_zutil.yo
*** ../zsh-/Doc/Zsh/mod_zutil.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/mod_zutil.yo	Thu Dec 16 10:14:12 1999
***************
*** 3,9 ****
  styles.
  !MOD!)
  cindex(builtins, utility)
! The tt(zutil) module only adds some builtins:
  
  startitem()
  xitem(tt(zstyle) [ tt(-L) ])
--- 3,9 ----
  styles.
  !MOD!)
  cindex(builtins, utility)
! The tt(zsh/zutil) module only adds some builtins:
  
  startitem()
  xitem(tt(zstyle) [ tt(-L) ])
diff -cr ../zsh-/Doc/Zsh/modules.yo ./Doc/Zsh/modules.yo
*** ../zsh-/Doc/Zsh/modules.yo	Mon Dec 13 20:42:04 1999
--- ./Doc/Zsh/modules.yo	Thu Dec 16 10:14:12 1999
***************
*** 6,11 ****
  of the shell.  Each of these modules may be linked in to the
  shell at build time,
  or can be dynamically linked while the shell is running
! if the installation supports this feature.  The modules available are:
  
  includefile(Zsh/modlist.yo)
--- 6,12 ----
  of the shell.  Each of these modules may be linked in to the
  shell at build time,
  or can be dynamically linked while the shell is running
! if the installation supports this feature.  The modules that
! are bundled with the zsh distribution are:
  
  includefile(Zsh/modlist.yo)
diff -cr ../zsh-/Doc/Zsh/options.yo ./Doc/Zsh/options.yo
*** ../zsh-/Doc/Zsh/options.yo	Sun Nov 28 17:42:27 1999
--- ./Doc/Zsh/options.yo	Thu Dec 16 10:14:12 1999
***************
*** 758,765 ****
  (assuming it exists).
  Commands explicitly beginning with `tt(/)', `tt(./)' or `tt(../)'
  are not subject to the path search.
! This also applies to the tt(.) builtin,
! and to searches for modules performed by the tt(zmodload) builtin.
  )
  pindex(POSIX_BUILTINS)
  item(tt(POSIX_BUILTINS) <K> <S>)(
--- 758,764 ----
  (assuming it exists).
  Commands explicitly beginning with `tt(/)', `tt(./)' or `tt(../)'
  are not subject to the path search.
! This also applies to the tt(.) builtin.
  )
  pindex(POSIX_BUILTINS)
  item(tt(POSIX_BUILTINS) <K> <S>)(
diff -cr ../zsh-/Doc/Zsh/restricted.yo ./Doc/Zsh/restricted.yo
*** ../zsh-/Doc/Zsh/restricted.yo	Sun Nov 28 17:42:27 1999
--- ./Doc/Zsh/restricted.yo	Thu Dec 16 10:14:12 1999
***************
*** 29,36 ****
  commands)
  itemiz(turning off restricted mode with tt(set +r) or tt(unsetopt
  RESTRICTED))
- itemiz(specifying modules to be loaded with an explicitly given
- pathname containing slashes)
  enditemize()
  
  These restrictions are enforced after processing the startup files.  The
--- 29,34 ----
diff -cr ../zsh-/Doc/Zsh/zftpsys.yo ./Doc/Zsh/zftpsys.yo
*** ../zsh-/Doc/Zsh/zftpsys.yo	Wed Dec 15 19:16:57 1999
--- ./Doc/Zsh/zftpsys.yo	Thu Dec 16 10:14:12 1999
***************
*** 21,27 ****
  noderef(The zftp Module)
  ), must be available in the
  version of tt(zsh) installed at your site.  If the shell is configured to
! load new commands at run time, it probably is: typing `tt(zmodload zftp)'
  will make sure (if that runs silently, it has worked).  If this is not the
  case, it is possible tt(zftp) was linked into the shell anyway: to test
  this, type `tt(which zftp)' and if tt(zftp) is available you will get the
--- 21,27 ----
  noderef(The zftp Module)
  ), must be available in the
  version of tt(zsh) installed at your site.  If the shell is configured to
! load new commands at run time, it probably is: typing `tt(zmodload zsh/zftp)'
  will make sure (if that runs silently, it has worked).  If this is not the
  case, it is possible tt(zftp) was linked into the shell anyway: to test
  this, type `tt(which zftp)' and if tt(zftp) is available you will get the
diff -cr ../zsh-/Etc/zsh-development-guide ./Etc/zsh-development-guide
*** ../zsh-/Etc/zsh-development-guide	Mon Dec 13 18:44:48 1999
--- ./Etc/zsh-development-guide	Thu Dec 16 10:14:12 1999
***************
*** 147,162 ****
    groups of statements in the interests of clarity.  There should never
    be two consecutive blank lines.
  
  Modules
  -------
  
! Modules are described by a file named `foo.mdd' for a module
! `foo'. This file is actually a shell script that will sourced when zsh 
! is build. To describe the module it can/should set the following shell 
! variables:
  
    - moddeps         modules on which this module depends (default none)
!   - nozshdep        non-empty indicates no dependence on the `zsh' pseudo-module
    - alwayslink      if non-empty, always link the module into the executable
    - autobins        builtins defined by the module, for autoloading
    - autoinfixconds  infix condition codes defined by the module, for
--- 147,172 ----
    groups of statements in the interests of clarity.  There should never
    be two consecutive blank lines.
  
+ * Each .c file *must* #include the .mdh header for the module it is a
+   part of and then its own .pro file (for local prototypes).  It may
+   also #include other system headers.  It *must not* #include any other
+   module's headers or any other .pro files.
+ 
  Modules
  -------
  
! Modules have hierarchical names.  Name segments are separated by `/', and
! each segment consists of alphanumerics plus `_'.  Relative names are never
! used; the naming hierarchy is strictly for organisational convenience.
! 
! Each module is described by a file with a name ending in `.mdd' somewhere
! under the Src directory.  This file is actually a shell script that will
! sourced when zsh is build. To describe the module it can/should set the
! following shell variables:
  
+   - name            name of the module
    - moddeps         modules on which this module depends (default none)
!   - nozshdep        non-empty indicates no dependence on the `zsh/main' pseudo-module
    - alwayslink      if non-empty, always link the module into the executable
    - autobins        builtins defined by the module, for autoloading
    - autoinfixconds  infix condition codes defined by the module, for
***************
*** 170,194 ****
    - hdrdeps         extra headers on which the .mdh depends (default none)
    - otherincs       extra headers that are included indirectly (default none)
  
! Be sure to put the values in quotes. For further enlightenment have a
! look at the `mkmakemod.sh' script in the Src directory of the
! distribution.
  
  Modules have to define four functions which will be called automatically
! by the zsh core. The first one, named `setup_foo' for a module named
! `foo', should set up any data needed in the module, at least any data
! other modules may be interested in. The second one, named `boot_foo',
! should register all builtins, conditional codes, and function wrappers
! (i.e. anything that will be visible to the user) and will be called
! after the `setup'-function. 
! The third one, named `cleanup_foo' for module `foo' is called when the
! user tries to unload a module and should de-register the builtins
! etc. The last function, `finish_foo' is called when the module is
! actually unloaded and should finalize all the data initialized in the 
! `setup'-function.
! In short, the `cleanup'-function should undo what the `boot'-function
! did, and the `finish'-function should undo what the `setup'-function
  did.
  All of these functions should return zero if they succeeded and
  non-zero otherwise.
  
--- 180,204 ----
    - hdrdeps         extra headers on which the .mdh depends (default none)
    - otherincs       extra headers that are included indirectly (default none)
  
! Be sure to put the values in quotes. For further enlightenment have a look
! at the `mkmakemod.sh' script in the Src directory of the distribution.
  
  Modules have to define four functions which will be called automatically
! by the zsh core. The first one, named `setup_', should set up any data
! needed in the module, at least any data other modules may be interested
! in. The second one, named `boot_', should register all builtins,
! conditional codes, and function wrappers (i.e. anything that will be
! visible to the user) and will be called after the `setup_'-function.
! 
! The third one, named `cleanup_', is called when the user tries to unload
! a module and should de-register the builtins etc. The last function,
! `finish_' is called when the module is actually unloaded and should
! finalize all the data initialized in the `setup_'-function.
! 
! In short, the `cleanup_'-function should undo what the `boot_'-function
! did, and the `finish_'-function should undo what the `setup_'-function
  did.
+ 
  All of these functions should return zero if they succeeded and
  non-zero otherwise.
  
***************
*** 788,790 ****
--- 798,817 ----
    All the above should appear on their own, separated by newlines from the
    surrounding text.  No extra newlines after the opening or before the
    closing parenthesis are required.
+ 
+ Module names
+ ------------
+ 
+ Modules have hierarchical names.  Name segments are separated by `/', and
+ each segment consists of alphanumerics plus `_'.  Relative names are never
+ used; the naming hierarchy is strictly for organisational convenience.
+ 
+ Top-level name segments should be organisational identifiers, assigned
+ by the Zsh Development Group and recorded here:
+ 
+ top-level identifier  organisation
+ --------------------  ------------
+ x_*                   reserved for private experimental use
+ zsh                   The Zsh Development Group (contact: <coordinator@xxxxxxx>)
+ 
+ Below the top level, naming authority is delegated.
diff -cr ../zsh-/Functions/Misc/zls ./Functions/Misc/zls
*** ../zsh-/Functions/Misc/zls	Sun Nov 28 17:42:27 1999
--- ./Functions/Misc/zls	Thu Dec 16 10:14:12 1999
***************
*** 1,7 ****
  # zls () {
  # simple internal ls using the stat module
  
! zmodload -i stat || return 1
  
  emulate -R zsh
  setopt localoptions
--- 1,7 ----
  # zls () {
  # simple internal ls using the stat module
  
! zmodload -i zsh/stat || return 1
  
  emulate -R zsh
  setopt localoptions
diff -cr ../zsh-/Functions/Zftp/zfinit ./Functions/Zftp/zfinit
*** ../zsh-/Functions/Zftp/zfinit	Wed Dec 15 19:10:43 1999
--- ./Functions/Zftp/zfinit	Thu Dec 16 10:15:41 1999
***************
*** 1,6 ****
  emulate -L zsh
  
! [[ $1 = -n ]] || zmodload -e zftp || zmodload -ia zftp || return 1
  
  if zmodload -i zutil; then
    local arr
--- 1,6 ----
  emulate -L zsh
  
! [[ $1 = -n ]] || zmodload -e zsh/zftp || zmodload -ia zsh/zftp || return 1
  
  if zmodload -i zutil; then
    local arr
diff -cr ../zsh-/Src/Builtins/rlimits.c ./Src/Builtins/rlimits.c
*** ../zsh-/Src/Builtins/rlimits.c	Sun Nov 28 17:42:28 1999
--- ./Src/Builtins/rlimits.c	Thu Dec 16 10:14:12 1999
***************
*** 625,645 ****
  
  /**/
  int
! setup_rlimits(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_rlimits(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_rlimits(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
--- 625,645 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
***************
*** 647,653 ****
  
  /**/
  int
! finish_rlimits(Module m)
  {
      return 0;
  }
--- 647,653 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Builtins/rlimits.mdd ./Src/Builtins/rlimits.mdd
*** ../zsh-/Src/Builtins/rlimits.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Builtins/rlimits.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/rlimits
+ 
  autobins="limit ulimit unlimit"
  
  objects="rlimits.o"
diff -cr ../zsh-/Src/Builtins/sched.c ./Src/Builtins/sched.c
*** ../zsh-/Src/Builtins/sched.c	Sun Nov 28 17:42:28 1999
--- ./Src/Builtins/sched.c	Thu Dec 16 10:14:12 1999
***************
*** 185,198 ****
  
  /**/
  int
! setup_sched(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_sched(Module m)
  {
      if(!addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab)))
  	return 1;
--- 185,198 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      if(!addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab)))
  	return 1;
***************
*** 202,208 ****
  
  /**/
  int
! cleanup_sched(Module m)
  {
      struct schedcmd *sch, *schn;
  
--- 202,208 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      struct schedcmd *sch, *schn;
  
***************
*** 218,224 ****
  
  /**/
  int
! finish_sched(Module m)
  {
      return 0;
  }
--- 218,224 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Builtins/sched.mdd ./Src/Builtins/sched.mdd
*** ../zsh-/Src/Builtins/sched.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Builtins/sched.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/sched
+ 
  autobins="sched"
  
  objects="sched.o"
diff -cr ../zsh-/Src/Makemod.in.in ./Src/Makemod.in.in
*** ../zsh-/Src/Makemod.in.in	Fri Dec  3 19:10:12 1999
--- ./Src/Makemod.in.in	Thu Dec 16 10:14:12 1999
***************
*** 128,147 ****
  uninstall.modules: uninstall.modules-here
  
  install.bin-here uninstall.bin-here:
! 
! install.modules-here:
! 	modules='$(MODULES)'; \
! 	if test -n "$$modules"; then $(sdir_top)/mkinstalldirs $(DESTDIR)$(MODDIR); fi; \
! 	for mod in $$modules; do \
! 	    $(INSTALL_PROGRAM) $$mod $(DESTDIR)$(MODDIR)/$$mod; \
! 	done
! 
! uninstall.modules-here:
! 	modules='$(MODULES)'; for mod in $$modules; do \
! 	    if test -f $(DESTDIR)$(MODDIR)/$$mod; then \
! 		rm -f $(DESTDIR)$(MODDIR)/$$mod; \
! 	    else :; fi; \
! 	done
  
  # ========== DEPENDENCIES FOR CLEANUP ==========
  
--- 128,134 ----
  uninstall.modules: uninstall.modules-here
  
  install.bin-here uninstall.bin-here:
! install.modules-here uninstall.modules-here:
  
  # ========== DEPENDENCIES FOR CLEANUP ==========
  
diff -cr ../zsh-/Src/Modules/cap.c ./Src/Modules/cap.c
*** ../zsh-/Src/Modules/cap.c	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/cap.c	Thu Dec 16 10:14:12 1999
***************
*** 124,144 ****
  
  /**/
  int
! setup_cap(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_cap(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_cap(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
--- 124,144 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
***************
*** 146,152 ****
  
  /**/
  int
! finish_cap(Module m)
  {
      return 0;
  }
--- 146,152 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/cap.mdd ./Src/Modules/cap.mdd
*** ../zsh-/Src/Modules/cap.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/cap.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/cap
+ 
  autobins="cap getcap setcap"
  
  objects="cap.o"
diff -cr ../zsh-/Src/Modules/clone.c ./Src/Modules/clone.c
*** ../zsh-/Src/Modules/clone.c	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/clone.c	Thu Dec 16 10:14:12 1999
***************
*** 98,118 ****
  
  /**/
  int
! setup_clone(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_clone(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_clone(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
--- 98,118 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
***************
*** 120,126 ****
  
  /**/
  int
! finish_clone(Module m)
  {
      return 0;
  }
--- 120,126 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/clone.mdd ./Src/Modules/clone.mdd
*** ../zsh-/Src/Modules/clone.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/clone.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/clone
+ 
  autobins="clone"
  
  objects="clone.o"
diff -cr ../zsh-/Src/Modules/example.c ./Src/Modules/example.c
*** ../zsh-/Src/Modules/example.c	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/example.c	Thu Dec 16 10:14:12 1999
***************
*** 159,165 ****
  }
  
  /*
!  * boot_example is executed when the module is loaded.
   */
  
  static struct builtin bintab[] = {
--- 159,165 ----
  }
  
  /*
!  * boot_ is executed when the module is loaded.
   */
  
  static struct builtin bintab[] = {
***************
*** 188,194 ****
  
  /**/
  int
! setup_example(Module m)
  {
      printf("The example module has now been set up.\n");
      fflush(stdout);
--- 188,194 ----
  
  /**/
  int
! setup_(Module m)
  {
      printf("The example module has now been set up.\n");
      fflush(stdout);
***************
*** 197,203 ****
  
  /**/
  int
! boot_example(Module m)
  {
      intparam = 42;
      strparam = ztrdup("example");
--- 197,203 ----
  
  /**/
  int
! boot_(Module m)
  {
      intparam = 42;
      strparam = ztrdup("example");
***************
*** 214,220 ****
  
  /**/
  int
! cleanup_example(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      deleteconddefs(m->nam, cotab, sizeof(cotab)/sizeof(*cotab));
--- 214,220 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      deleteconddefs(m->nam, cotab, sizeof(cotab)/sizeof(*cotab));
***************
*** 226,232 ****
  
  /**/
  int
! finish_example(Module m)
  {
      printf("Thank you for using the example module.  Have a nice day.\n");
      fflush(stdout);
--- 226,232 ----
  
  /**/
  int
! finish_(Module m)
  {
      printf("Thank you for using the example module.  Have a nice day.\n");
      fflush(stdout);
diff -cr ../zsh-/Src/Modules/example.mdd ./Src/Modules/example.mdd
*** ../zsh-/Src/Modules/example.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/example.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/example
+ 
  autobins="example"
  
  autoinfixconds="ex"
diff -cr ../zsh-/Src/Modules/files.c ./Src/Modules/files.c
*** ../zsh-/Src/Modules/files.c	Mon Dec 13 20:30:00 1999
--- ./Src/Modules/files.c	Thu Dec 16 10:14:12 1999
***************
*** 714,734 ****
  
  /**/
  int
! setup_files(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_files(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_files(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
--- 714,734 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
***************
*** 736,742 ****
  
  /**/
  int
! finish_files(Module m)
  {
      return 0;
  }
--- 736,742 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/files.mdd ./Src/Modules/files.mdd
*** ../zsh-/Src/Modules/files.mdd	Thu Dec  9 23:29:24 1999
--- ./Src/Modules/files.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/files
+ 
  autobins="chgrp chown ln mkdir mv rm rmdir sync"
  
  objects="files.o"
diff -cr ../zsh-/Src/Modules/mapfile.c ./Src/Modules/mapfile.c
*** ../zsh-/Src/Modules/mapfile.c	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/mapfile.c	Thu Dec 16 10:14:12 1999
***************
*** 329,342 ****
  
  /**/
  int
! setup_mapfile(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_mapfile(Module m)
  {
      /* Create the special associative array. */
  
--- 329,342 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      /* Create the special associative array. */
  
***************
*** 348,354 ****
  
  /**/
  int
! cleanup_mapfile(Module m)
  {
      Param pm;
  
--- 348,354 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      Param pm;
  
***************
*** 364,370 ****
  
  /**/
  int
! finish_mapfile(Module m)
  {
      return 0;
  }
--- 364,370 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/mapfile.mdd ./Src/Modules/mapfile.mdd
*** ../zsh-/Src/Modules/mapfile.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/mapfile.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/mapfile
+ 
  autoparams="mapfile"
  
  objects="mapfile.o"
diff -cr ../zsh-/Src/Modules/mathfunc.c ./Src/Modules/mathfunc.c
*** ../zsh-/Src/Modules/mathfunc.c	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/mathfunc.c	Thu Dec 16 10:14:12 1999
***************
*** 450,470 ****
  
  /**/
  int
! setup_mathfunc(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_mathfunc(Module m)
  {
      return !addmathfuncs(m->nam, mftab, sizeof(mftab)/sizeof(*mftab));
  }
  
  /**/
  int
! cleanup_mathfunc(Module m)
  {
      deletemathfuncs(m->nam, mftab, sizeof(mftab)/sizeof(*mftab));
      return 0;
--- 450,470 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      return !addmathfuncs(m->nam, mftab, sizeof(mftab)/sizeof(*mftab));
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      deletemathfuncs(m->nam, mftab, sizeof(mftab)/sizeof(*mftab));
      return 0;
***************
*** 472,478 ****
  
  /**/
  int
! finish_mathfunc(Module m)
  {
      return 0;
  }
--- 472,478 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/mathfunc.mdd ./Src/Modules/mathfunc.mdd
*** ../zsh-/Src/Modules/mathfunc.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/mathfunc.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/mathfunc
+ 
  autobins="mathfunc"
  
  objects="mathfunc.o"
diff -cr ../zsh-/Src/Modules/parameter.c ./Src/Modules/parameter.c
*** ../zsh-/Src/Modules/parameter.c	Mon Dec 13 20:20:09 1999
--- ./Src/Modules/parameter.c	Thu Dec 16 10:14:12 1999
***************
*** 1940,1946 ****
  
  /**/
  int
! setup_parameter(Module m)
  {
      incleanup = 0;
  
--- 1940,1946 ----
  
  /**/
  int
! setup_(Module m)
  {
      incleanup = 0;
  
***************
*** 1949,1955 ****
  
  /**/
  int
! boot_parameter(Module m)
  {
      /* Create the special associative arrays.
       * As an example for autoloaded parameters, this is probably a bad
--- 1949,1955 ----
  
  /**/
  int
! boot_(Module m)
  {
      /* Create the special associative arrays.
       * As an example for autoloaded parameters, this is probably a bad
***************
*** 1988,1994 ****
  
  /**/
  int
! cleanup_parameter(Module m)
  {
      Param pm;
      struct pardef *def;
--- 1988,1994 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      Param pm;
      struct pardef *def;
***************
*** 2010,2016 ****
  
  /**/
  int
! finish_parameter(Module m)
  {
      return 0;
  }
--- 2010,2016 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/parameter.mdd ./Src/Modules/parameter.mdd
*** ../zsh-/Src/Modules/parameter.mdd	Thu Dec 16 10:24:12 1999
--- ./Src/Modules/parameter.mdd	Thu Dec 16 10:24:42 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/parameter
+ 
  autoparams="parameters commands functions dis_functions funcstack builtins dis_builtins reswords dis_reswords options modules dirstack history historywords jobtexts jobdirs jobstates nameddirs userdirs aliases dis_aliases galiases dis_galiases"
  
  objects="parameter.o"
diff -cr ../zsh-/Src/Modules/stat.c ./Src/Modules/stat.c
*** ../zsh-/Src/Modules/stat.c	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/stat.c	Thu Dec 16 10:14:12 1999
***************
*** 590,610 ****
  
  /**/
  int
! setup_stat(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_stat(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_stat(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
--- 590,610 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
***************
*** 612,618 ****
  
  /**/
  int
! finish_stat(Module m)
  {
      return 0;
  }
--- 612,618 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/stat.mdd ./Src/Modules/stat.mdd
*** ../zsh-/Src/Modules/stat.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/stat.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/stat
+ 
  autobins="stat"
  
  objects="stat.o"
diff -cr ../zsh-/Src/Modules/zftp.c ./Src/Modules/zftp.c
*** ../zsh-/Src/Modules/zftp.c	Wed Dec  8 21:10:48 1999
--- ./Src/Modules/zftp.c	Thu Dec 16 10:14:12 1999
***************
*** 3201,3214 ****
  
  /**/
  int
! setup_zftp(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_zftp(Module m)
  {
      int ret;
      if ((ret = addbuiltins(m->nam, bintab,
--- 3201,3214 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      int ret;
      if ((ret = addbuiltins(m->nam, bintab,
***************
*** 3232,3238 ****
  
  /**/
  int
! cleanup_zftp(Module m)
  {
      /*
       * There are various parameters hanging around, but they're
--- 3232,3238 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      /*
       * There are various parameters hanging around, but they're
***************
*** 3260,3266 ****
  
  /**/
  int
! finish_zftp(Module m)
  {
      return 0;
  }
--- 3260,3266 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/zftp.mdd ./Src/Modules/zftp.mdd
*** ../zsh-/Src/Modules/zftp.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Modules/zftp.mdd	Thu Dec 16 10:14:12 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/zftp
+ 
  autobins="zftp"
  
  objects="zftp.o"
diff -cr ../zsh-/Src/Modules/zutil.c ./Src/Modules/zutil.c
*** ../zsh-/Src/Modules/zutil.c	Fri Dec 10 19:39:40 1999
--- ./Src/Modules/zutil.c	Thu Dec 16 10:14:15 1999
***************
*** 729,735 ****
  
  /**/
  int
! setup_zutil(Module m)
  {
      zstyles = NULL;
  
--- 729,735 ----
  
  /**/
  int
! setup_(Module m)
  {
      zstyles = NULL;
  
***************
*** 738,751 ****
  
  /**/
  int
! boot_zutil(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_zutil(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
--- 738,751 ----
  
  /**/
  int
! boot_(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
***************
*** 753,759 ****
  
  /**/
  int
! finish_zutil(Module m)
  {
      freestypat(zstyles);
  
--- 753,759 ----
  
  /**/
  int
! finish_(Module m)
  {
      freestypat(zstyles);
  
diff -cr ../zsh-/Src/Modules/zutil.mdd ./Src/Modules/zutil.mdd
*** ../zsh-/Src/Modules/zutil.mdd	Fri Dec 10 19:39:40 1999
--- ./Src/Modules/zutil.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/zutil
+ 
  objects="zutil.o"
  
  autobins="zformat zstyle"
diff -cr ../zsh-/Src/Zle/compctl.c ./Src/Zle/compctl.c
*** ../zsh-/Src/Zle/compctl.c	Fri Dec  3 18:54:50 1999
--- ./Src/Zle/compctl.c	Thu Dec 16 10:14:15 1999
***************
*** 3732,3738 ****
  
  /**/
  int
! setup_compctl(Module m)
  {
      compctlreadptr = compctlread;
      createcompctltable();
--- 3732,3738 ----
  
  /**/
  int
! setup_(Module m)
  {
      compctlreadptr = compctlread;
      createcompctltable();
***************
*** 3752,3758 ****
  
  /**/
  int
! boot_compctl(Module m)
  {
      addhookfunc("compctl_make", (Hookfn) ccmakehookfn);
      addhookfunc("compctl_before", (Hookfn) ccbeforehookfn);
--- 3752,3758 ----
  
  /**/
  int
! boot_(Module m)
  {
      addhookfunc("compctl_make", (Hookfn) ccmakehookfn);
      addhookfunc("compctl_before", (Hookfn) ccbeforehookfn);
***************
*** 3762,3768 ****
  
  /**/
  int
! cleanup_compctl(Module m)
  {
      deletehookfunc("compctl_make", (Hookfn) ccmakehookfn);
      deletehookfunc("compctl_before", (Hookfn) ccbeforehookfn);
--- 3762,3768 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      deletehookfunc("compctl_make", (Hookfn) ccmakehookfn);
      deletehookfunc("compctl_before", (Hookfn) ccbeforehookfn);
***************
*** 3773,3779 ****
  
  /**/
  int
! finish_compctl(Module m)
  {
      deletehashtable(compctltab);
  
--- 3773,3779 ----
  
  /**/
  int
! finish_(Module m)
  {
      deletehashtable(compctltab);
  
diff -cr ../zsh-/Src/Zle/compctl.mdd ./Src/Zle/compctl.mdd
*** ../zsh-/Src/Zle/compctl.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Zle/compctl.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,4 ****
! moddeps="complete zle"
  
  autobins="compctl"
  
--- 1,6 ----
! name=zsh/compctl
! 
! moddeps="zsh/complete zsh/zle"
  
  autobins="compctl"
  
diff -cr ../zsh-/Src/Zle/complete.c ./Src/Zle/complete.c
*** ../zsh-/Src/Zle/complete.c	Mon Dec  6 23:19:45 1999
--- ./Src/Zle/complete.c	Thu Dec 16 10:14:15 1999
***************
*** 1350,1356 ****
  
  /**/
  int
! setup_complete(Module m)
  {
      hasperm = 0;
  
--- 1350,1356 ----
  
  /**/
  int
! setup_(Module m)
  {
      hasperm = 0;
  
***************
*** 1371,1377 ****
  
  /**/
  int
! boot_complete(Module m)
  {
      addhookfunc("complete", (Hookfn) do_completion);
      addhookfunc("before_complete", (Hookfn) before_complete);
--- 1371,1377 ----
  
  /**/
  int
! boot_(Module m)
  {
      addhookfunc("complete", (Hookfn) do_completion);
      addhookfunc("before_complete", (Hookfn) before_complete);
***************
*** 1391,1397 ****
  
  /**/
  int
! cleanup_complete(Module m)
  {
      deletehookfunc("complete", (Hookfn) do_completion);
      deletehookfunc("before_complete", (Hookfn) before_complete);
--- 1391,1397 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      deletehookfunc("complete", (Hookfn) do_completion);
      deletehookfunc("before_complete", (Hookfn) before_complete);
***************
*** 1410,1416 ****
  
  /**/
  int
! finish_complete(Module m)
  {
      if (compwords)
  	freearray(compwords);
--- 1410,1416 ----
  
  /**/
  int
! finish_(Module m)
  {
      if (compwords)
  	freearray(compwords);
diff -cr ../zsh-/Src/Zle/complete.mdd ./Src/Zle/complete.mdd
*** ../zsh-/Src/Zle/complete.mdd	Fri Dec  3 19:10:12 1999
--- ./Src/Zle/complete.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,6 ****
! moddeps="zle"
  
! autobins="compgen compadd compset"
  
  autoprefixconds="prefix suffix between after"
  
--- 1,8 ----
! name=zsh/complete
  
! moddeps="zsh/zle"
! 
! autobins="compadd compset"
  
  autoprefixconds="prefix suffix between after"
  
diff -cr ../zsh-/Src/Zle/complist.c ./Src/Zle/complist.c
*** ../zsh-/Src/Zle/complist.c	Thu Dec  9 23:27:42 1999
--- ./Src/Zle/complist.c	Thu Dec 16 10:14:15 1999
***************
*** 1196,1209 ****
  
  /**/
  int
! setup_complist(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_complist(Module m)
  {
      mtab = NULL;
      mgtab = NULL;
--- 1196,1209 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      mtab = NULL;
      mgtab = NULL;
***************
*** 1237,1243 ****
  
  /**/
  int
! cleanup_complist(Module m)
  {
      free(mtab);
      free(mgtab);
--- 1237,1243 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      free(mtab);
      free(mgtab);
***************
*** 1251,1257 ****
  
  /**/
  int
! finish_complist(Module m)
  {
      return 0;
  }
--- 1251,1257 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Zle/complist.mdd ./Src/Zle/complist.mdd
*** ../zsh-/Src/Zle/complist.mdd	Sun Nov 28 17:42:28 1999
--- ./Src/Zle/complist.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,3 ****
! moddeps="complete zle"
  
  objects="complist.o"
--- 1,5 ----
! name=zsh/complist
! 
! moddeps="zsh/complete zsh/zle"
  
  objects="complist.o"
diff -cr ../zsh-/Src/Zle/computil.c ./Src/Zle/computil.c
*** ../zsh-/Src/Zle/computil.c	Thu Dec 16 10:13:41 1999
--- ./Src/Zle/computil.c	Thu Dec 16 10:14:15 1999
***************
*** 2408,2414 ****
  
  /**/
  int
! setup_computil(Module m)
  {
      memset(cadef_cache, 0, sizeof(cadef_cache));
      memset(cvdef_cache, 0, sizeof(cvdef_cache));
--- 2408,2414 ----
  
  /**/
  int
! setup_(Module m)
  {
      memset(cadef_cache, 0, sizeof(cadef_cache));
      memset(cvdef_cache, 0, sizeof(cvdef_cache));
***************
*** 2422,2435 ****
  
  /**/
  int
! boot_computil(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_computil(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
--- 2422,2435 ----
  
  /**/
  int
! boot_(Module m)
  {
      return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      return 0;
***************
*** 2437,2443 ****
  
  /**/
  int
! finish_computil(Module m)
  {
      int i;
  
--- 2437,2443 ----
  
  /**/
  int
! finish_(Module m)
  {
      int i;
  
diff -cr ../zsh-/Src/Zle/computil.mdd ./Src/Zle/computil.mdd
*** ../zsh-/Src/Zle/computil.mdd	Fri Dec 10 19:39:49 1999
--- ./Src/Zle/computil.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,4 ****
! moddeps="complete zle"
  
  objects="computil.o"
  
--- 1,6 ----
! name=zsh/computil
! 
! moddeps="zsh/complete zsh/zle"
  
  objects="computil.o"
  
diff -cr ../zsh-/Src/Zle/deltochar.c ./Src/Zle/deltochar.c
*** ../zsh-/Src/Zle/deltochar.c	Sun Nov 28 17:42:29 1999
--- ./Src/Zle/deltochar.c	Thu Dec 16 10:14:15 1999
***************
*** 75,88 ****
  
  /**/
  int
! setup_deltochar(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_deltochar(Module m)
  {
      w_deletetochar = addzlefunction("delete-to-char", deltochar,
                                      ZLE_KILL | ZLE_KEEPSUFFIX);
--- 75,88 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      w_deletetochar = addzlefunction("delete-to-char", deltochar,
                                      ZLE_KILL | ZLE_KEEPSUFFIX);
***************
*** 100,106 ****
  
  /**/
  int
! cleanup_deltochar(Module m)
  {
      deletezlefunction(w_deletetochar);
      deletezlefunction(w_zaptochar);
--- 100,106 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      deletezlefunction(w_deletetochar);
      deletezlefunction(w_zaptochar);
***************
*** 109,115 ****
  
  /**/
  int
! finish_deltochar(Module m)
  {
      return 0;
  }
--- 109,115 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Zle/deltochar.mdd ./Src/Zle/deltochar.mdd
*** ../zsh-/Src/Zle/deltochar.mdd	Sun Nov 28 17:42:29 1999
--- ./Src/Zle/deltochar.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,3 ****
! moddeps="zle"
  
  objects="deltochar.o"
--- 1,5 ----
! name=zsh/deltochar
! 
! moddeps="zsh/zle"
  
  objects="deltochar.o"
diff -cr ../zsh-/Src/Zle/zle.mdd ./Src/Zle/zle.mdd
*** ../zsh-/Src/Zle/zle.mdd	Fri Dec  3 19:10:12 1999
--- ./Src/Zle/zle.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/zle
+ 
  autobins="bindkey vared zle"
  
  objects="zle_bindings.o zle_hist.o zle_keymap.o zle_main.o \
diff -cr ../zsh-/Src/Zle/zle_main.c ./Src/Zle/zle_main.c
*** ../zsh-/Src/Zle/zle_main.c	Thu Dec 16 10:13:41 1999
--- ./Src/Zle/zle_main.c	Thu Dec 16 10:14:15 1999
***************
*** 1003,1009 ****
  
  /**/
  int
! setup_zle(Module m)
  {
      /* Set up editor entry points */
      trashzleptr = trashzle;
--- 1003,1009 ----
  
  /**/
  int
! setup_(Module m)
  {
      /* Set up editor entry points */
      trashzleptr = trashzle;
***************
*** 1036,1042 ****
  
  /**/
  int
! boot_zle(Module m)
  {
      addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      addhookdefs(m->nam, zlehooks, sizeof(zlehooks)/sizeof(*zlehooks));
--- 1036,1042 ----
  
  /**/
  int
! boot_(Module m)
  {
      addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
      addhookdefs(m->nam, zlehooks, sizeof(zlehooks)/sizeof(*zlehooks));
***************
*** 1045,1051 ****
  
  /**/
  int
! cleanup_zle(Module m)
  {
      if(zleactive) {
  	zerrnam(m->nam, "can't unload the zle module while zle is active",
--- 1045,1051 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      if(zleactive) {
  	zerrnam(m->nam, "can't unload the zle module while zle is active",
***************
*** 1059,1065 ****
  
  /**/
  int
! finish_zle(Module m)
  {
      int i;
  
--- 1059,1065 ----
  
  /**/
  int
! finish_(Module m)
  {
      int i;
  
diff -cr ../zsh-/Src/Zle/zle_thingy.c ./Src/Zle/zle_thingy.c
*** ../zsh-/Src/Zle/zle_thingy.c	Tue Dec 14 23:19:08 1999
--- ./Src/Zle/zle_thingy.c	Thu Dec 16 10:14:15 1999
***************
*** 546,552 ****
      Thingy t;
      Widget w, cw;
  
!     if (!require_module(name, "complete", 0, 0)) {
  	zerrnam(name, "can't load complete module", NULL, 0);
  	return 1;
      }
--- 546,552 ----
      Thingy t;
      Widget w, cw;
  
!     if (!require_module(name, "zsh/complete", 0, 0)) {
  	zerrnam(name, "can't load complete module", NULL, 0);
  	return 1;
      }
diff -cr ../zsh-/Src/Zle/zleparameter.c ./Src/Zle/zleparameter.c
*** ../zsh-/Src/Zle/zleparameter.c	Sun Nov 28 17:42:29 1999
--- ./Src/Zle/zleparameter.c	Thu Dec 16 10:14:15 1999
***************
*** 198,211 ****
  
  /**/
  int
! setup_zleparameter(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_zleparameter(Module m)
  {
      struct pardef *def;
  
--- 198,211 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      struct pardef *def;
  
***************
*** 232,238 ****
  
  /**/
  int
! cleanup_zleparameter(Module m)
  {
      Param pm;
      struct pardef *def;
--- 232,238 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      Param pm;
      struct pardef *def;
***************
*** 249,255 ****
  
  /**/
  int
! finish_zleparameter(Module m)
  {
      return 0;
  }
--- 249,255 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Zle/zleparameter.mdd ./Src/Zle/zleparameter.mdd
*** ../zsh-/Src/Zle/zleparameter.mdd	Sun Nov 28 17:42:29 1999
--- ./Src/Zle/zleparameter.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,4 ****
! moddeps="zle"
  
  autoparams="widgets keymaps"
  
--- 1,6 ----
! name=zsh/zleparameter
! 
! moddeps="zsh/zle"
  
  autoparams="widgets keymaps"
  
diff -cr ../zsh-/Src/init.c ./Src/init.c
*** ../zsh-/Src/init.c	Fri Dec  3 19:10:12 1999
--- ./Src/init.c	Thu Dec 16 10:14:15 1999
***************
*** 943,949 ****
  
  #include "bltinmods.list"
  
!     load_module("zsh");
  }
  
  /**/
--- 943,949 ----
  
  #include "bltinmods.list"
  
!     load_module("zsh/main");
  }
  
  /**/
***************
*** 965,971 ****
   * avoid wasting space with the fallback functions.  No other source    *
   * file needs to know which modules are linked in.                      */
  
! #ifdef LINKED_XMOD_zle
  
  /**/
  mod_export ZleVoidFn trashzleptr = noop_function;
--- 965,971 ----
   * avoid wasting space with the fallback functions.  No other source    *
   * file needs to know which modules are linked in.                      */
  
! #ifdef LINKED_XMOD_zshQszle
  
  /**/
  mod_export ZleVoidFn trashzleptr = noop_function;
***************
*** 978,1003 ****
  /**/
  mod_export ZleReadFn zlereadptr = autoload_zleread;
  
! #else /* !LINKED_XMOD_zle */
  
  mod_export ZleVoidFn trashzleptr = noop_function;
  mod_export ZleVoidFn gotwordptr = noop_function;
  mod_export ZleVoidFn refreshptr = noop_function;
  mod_export ZleVoidIntFn spaceinlineptr = noop_function_int;
! # ifdef UNLINKED_XMOD_zle
  mod_export ZleReadFn zlereadptr = autoload_zleread;
! # else /* !UNLINKED_XMOD_zle */
  mod_export ZleReadFn zlereadptr = fallback_zleread;
! # endif /* !UNLINKED_XMOD_zle */
  
! #endif /* !LINKED_XMOD_zle */
  
  /**/
  unsigned char *
  autoload_zleread(char *lp, char *rp, int ha)
  {
      zlereadptr = fallback_zleread;
!     load_module("zle");
      return zleread(lp, rp, ha);
  }
  
--- 978,1003 ----
  /**/
  mod_export ZleReadFn zlereadptr = autoload_zleread;
  
! #else /* !LINKED_XMOD_zshQszle */
  
  mod_export ZleVoidFn trashzleptr = noop_function;
  mod_export ZleVoidFn gotwordptr = noop_function;
  mod_export ZleVoidFn refreshptr = noop_function;
  mod_export ZleVoidIntFn spaceinlineptr = noop_function_int;
! # ifdef UNLINKED_XMOD_zshQszle
  mod_export ZleReadFn zlereadptr = autoload_zleread;
! # else /* !UNLINKED_XMOD_zshQszle */
  mod_export ZleReadFn zlereadptr = fallback_zleread;
! # endif /* !UNLINKED_XMOD_zshQszle */
  
! #endif /* !LINKED_XMOD_zshQszle */
  
  /**/
  unsigned char *
  autoload_zleread(char *lp, char *rp, int ha)
  {
      zlereadptr = fallback_zleread;
!     load_module("zsh/zle");
      return zleread(lp, rp, ha);
  }
  
diff -cr ../zsh-/Src/makepro.awk ./Src/makepro.awk
*** ../zsh-/Src/makepro.awk	Fri Dec  3 19:10:12 1999
--- ./Src/makepro.awk	Thu Dec 16 10:14:15 1999
***************
*** 109,123 ****
  	gsub(/@>/, ")", dcltor)
  	gsub(/@!/, ",", dcltor)
  
- 	# If this is a module boot/cleanup function, conditionally rename it.
- 	if(" " dtype " " ~ / int / && dcltor ~ / *@\+(boot|cleanup|setup|finish)_[_0-9A-Za-z]+@- *_\(\( *Module +[_0-9A-Za-z]+ *\)\) */) {
- 	    modtype = dnam
- 	    sub(/_.*$/, "", modtype)
- 	    printf "%s# if defined(DYNAMIC_NAME_CLASH_OK) && defined(MODULE)\n", locality
- 	    printf "%s#  define " dnam " " modtype "_\n", locality
- 	    printf "%s# endif\n", locality
- 	}
- 
  	# If this is exported, add it to the exported symbol list.
  	if(exported)
  	    printf "X%s\n", dnam
--- 109,114 ----
diff -cr ../zsh-/Src/mkbltnmlst.sh ./Src/mkbltnmlst.sh
*** ../zsh-/Src/mkbltnmlst.sh	Sun Nov 28 17:42:28 1999
--- ./Src/mkbltnmlst.sh	Thu Dec 16 10:14:15 1999
***************
*** 11,17 ****
  MODBINS=${MODBINS-modules-bltin}
  XMODCF=${XMODCF-$srcdir/xmods.conf}
  
! bin_mods=" zsh "`sed 's/^/ /;s/$/ /' $MODBINS`
  x_mods=`cat $XMODCF`
  . ./modules.index
  
--- 11,17 ----
  MODBINS=${MODBINS-modules-bltin}
  XMODCF=${XMODCF-$srcdir/xmods.conf}
  
! bin_mods=" zsh/main "`sed 's/^/ /;s/$/ /' $MODBINS`
  x_mods=`cat $XMODCF`
  . ./modules.index
  
***************
*** 20,25 ****
--- 20,26 ----
  exec > $1
  
  for x_mod in $x_mods; do
+     q_x_mod=`echo $x_mod | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
      case "$bin_mods" in
      *" $x_mod "*)
          echo "/* linked-in known module \`$x_mod' */"
***************
*** 30,39 ****
          echo "/* non-linked-in known module \`$x_mod' */"
  	linked=no
      esac
!     eval "loc=\$loc_$x_mod"
      unset moddeps autobins autoinfixconds autoprefixconds autoparams
      unset automathfuncs
!     . $srcdir/../$loc/${x_mod}.mdd
      for bin in $autobins; do
  	echo "    add_autobin(\"$bin\", \"$x_mod\");"
      done
--- 31,40 ----
          echo "/* non-linked-in known module \`$x_mod' */"
  	linked=no
      esac
!     eval "modfile=\$modfile_$q_x_mod"
      unset moddeps autobins autoinfixconds autoprefixconds autoparams
      unset automathfuncs
!     . $srcdir/../$modfile
      for bin in $autobins; do
  	echo "    add_autobin(\"$bin\", \"$x_mod\");"
      done
***************
*** 58,67 ****
  echo
  done_mods=" "
  for bin_mod in $bin_mods; do
      echo "/* linked-in module \`$bin_mod' */"
!     eval "loc=\$loc_$bin_mod"
      unset moddeps
!     . $srcdir/../$loc/${bin_mod}.mdd
      for dep in $moddeps; do
  	case $done_mods in
  	    *" $dep "*)
--- 59,69 ----
  echo
  done_mods=" "
  for bin_mod in $bin_mods; do
+     q_bin_mod=`echo $bin_mod | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
      echo "/* linked-in module \`$bin_mod' */"
!     eval "modfile=\$modfile_$q_bin_mod"
      unset moddeps
!     . $srcdir/../$modfile
      for dep in $moddeps; do
  	case $done_mods in
  	    *" $dep "*)
***************
*** 72,85 ****
  	esac
      done
      echo "    {"
!     echo "        extern int setup_${bin_mod} _((Module));"
!     echo "        extern int boot_${bin_mod} _((Module));"
!     echo "        extern int cleanup_${bin_mod} _((Module));"
!     echo "        extern int finish_${bin_mod} _((Module));"
      echo
      echo "        register_module(\"$bin_mod\","
!     echo "                        setup_${bin_mod}, boot_${bin_mod},"
!     echo "                        cleanup_${bin_mod}, finish_${bin_mod});"
      echo "    }"
      done_mods="$done_mods$bin_mod "
  done
--- 74,87 ----
  	esac
      done
      echo "    {"
!     echo "        extern int setup_${q_bin_mod} _((Module));"
!     echo "        extern int boot_${q_bin_mod} _((Module));"
!     echo "        extern int cleanup_${q_bin_mod} _((Module));"
!     echo "        extern int finish_${q_bin_mod} _((Module));"
      echo
      echo "        register_module(\"$bin_mod\","
!     echo "                        setup_${q_bin_mod}, boot_${q_bin_mod},"
!     echo "                        cleanup_${q_bin_mod}, finish_${q_bin_mod});"
      echo "    }"
      done_mods="$done_mods$bin_mod "
  done
diff -cr ../zsh-/Src/mkmakemod.sh ./Src/mkmakemod.sh
*** ../zsh-/Src/mkmakemod.sh	Tue Dec 14 23:19:08 1999
--- ./Src/mkmakemod.sh	Thu Dec 16 12:18:41 1999
***************
*** 17,24 ****
  # defines one module.  The .mdd file is actually a shell script, which will
  # be sourced.  It may define the following shell variables:
  #
  #   moddeps         modules on which this module depends (default none)
! #   nozshdep        non-empty indicates no dependence on the `zsh' pseudo-module
  #   alwayslink      if non-empty, always link the module into the executable
  #   autobins        builtins defined by the module, for autoloading
  #   autoinfixconds  infix condition codes defined by the module, for
--- 17,25 ----
  # defines one module.  The .mdd file is actually a shell script, which will
  # be sourced.  It may define the following shell variables:
  #
+ #   name            name of this module
  #   moddeps         modules on which this module depends (default none)
! #   nozshdep        non-empty indicates no dependence on the `zsh/main' pseudo-module
  #   alwayslink      if non-empty, always link the module into the executable
  #   autobins        builtins defined by the module, for autoloading
  #   autoinfixconds  infix condition codes defined by the module, for
***************
*** 103,116 ****
      echo
  
      . Src/modules.index
!     bin_mods=" zsh "`sed 's/^/ /;s/$/ /' Src/modules-bltin`
      if grep '%@D@%D%' config.status >/dev/null; then
  	is_dynamic=true
      else
  	is_dynamic=false
      fi
  
!     here_modules=
      all_subdirs=
      all_modobjs=
      all_modules=
--- 104,117 ----
      echo
  
      . Src/modules.index
!     bin_mods=" zsh/main "`sed 's/^/ /;s/$/ /' Src/modules-bltin`
      if grep '%@D@%D%' config.status >/dev/null; then
  	is_dynamic=true
      else
  	is_dynamic=false
      fi
  
!     here_mddnames=
      all_subdirs=
      all_modobjs=
      all_modules=
***************
*** 119,148 ****
      all_proto=
      lastsub=//
      for module in $module_list; do
! 	eval "loc=\$loc_$module"
! 	case $loc in
! 	    $the_subdir)
! 		here_modules="$here_modules $module"
  		build=$is_dynamic
  		case $is_dynamic@$bin_mods in
  		    *" $module "*)
  			build=true
! 			all_modobjs="$all_modobjs modobjs.${module}" ;;
  		    true@*)
! 			all_modules="$all_modules ${module}.\$(DL_EXT)" ;;
  		esac
! 		all_mdds="$all_mdds ${module}.mdd"
! 		$build && all_mdhs="$all_mdhs ${module}.mdh"
! 		$build && all_proto="$all_proto proto.${module}"
! 		;;
! 	    $lastsub | $lastsub/*) ;;
! 	    $the_subdir/*)
! 		all_subdirs="$all_subdirs $loc"
! 		lastsub=$loc
  		;;
  	esac
      done
-     all_subdirs=`echo "$all_subdirs" | sed "s' $the_subdir/' 'g"`
      echo "MODOBJS =$all_modobjs"
      echo "MODULES =$all_modules"
      echo "MDDS    =$all_mdds"
--- 120,150 ----
      all_proto=
      lastsub=//
      for module in $module_list; do
! 	q_module=`echo $module | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
! 	eval "modfile=\$modfile_$q_module"
! 	case $modfile in
! 	    $the_subdir/$lastsub/*) ;;
! 	    $the_subdir/*/*)
! 		lastsub=`echo $modfile | sed 's,^'$the_subdir'/,,;s,/[^/]*$,,'`
! 		all_subdirs="$all_subdirs $lastsub"
! 		;;
! 	    $the_subdir/*)
! 		mddname=`echo $modfile | sed 's,^.*/,,;s,\.mdd$,,'`
! 		here_mddnames="$here_mddnames $mddname"
  		build=$is_dynamic
  		case $is_dynamic@$bin_mods in
  		    *" $module "*)
  			build=true
! 			all_modobjs="$all_modobjs modobjs.${mddname}" ;;
  		    true@*)
! 			all_modules="$all_modules ${mddname}.\$(DL_EXT)" ;;
  		esac
! 		all_mdds="$all_mdds ${mddname}.mdd"
! 		$build && all_mdhs="$all_mdhs ${mddname}.mdh"
! 		$build && all_proto="$all_proto proto.${mddname}"
  		;;
  	esac
      done
      echo "MODOBJS =$all_modobjs"
      echo "MODULES =$all_modules"
      echo "MDDS    =$all_mdds"
***************
*** 169,274 ****
  
      other_mdhs=
      remote_mdhs=
!     for module in $here_modules; do
  
! 	unset moddeps nozshdep alwayslink hasexport
  	unset autobins autoinfixconds autoprefixconds autoparams automathfuncs
  	unset objects proto headers hdrdeps otherincs
! 	. $top_srcdir/$the_subdir/${module}.mdd
  	test -n "${moddeps+set}" || moddeps=
! 	test -n "$nozshdep" || moddeps="$moddeps zsh"
  	test -n "${proto+set}" ||
  	    proto=`echo $objects '' | sed 's,\.o ,.syms ,g'`
  
  	dobjects=`echo $objects '' | sed 's,\.o ,..o ,g'`
  	modhdeps=
! 	imports=
! 	depimports=
  	for dep in $moddeps; do
! 	    eval "loc=\$loc_$dep"
! 	    imports="$imports \$(IMPOPT)\$(dir_top)/$loc/$dep.export"
! 	    test "$loc" = "$the_subdir" &&
! 	        depimports="$depimports $dep.export"
  	    case $the_subdir in
  		$loc)
! 		    mdh="${dep}.mdh"
  		    ;;
  		$loc/*)
! 		    mdh="\$(dir_top)/$loc/${dep}.mdh"
  		    case "$other_mdhs " in
  			*" $mdh "*) ;;
  			*) other_mdhs="$other_mdhs $mdh" ;;
  		    esac
  		    ;;
  		*)
! 		    mdh="\$(dir_top)/$loc/${dep}.mdh"
  		    case "$remote_mdhs " in
  			*" $mdh "*) ;;
  			*) remote_mdhs="$remote_mdhs $mdh" ;;
  		    esac
  		    ;;
  	    esac
  	    modhdeps="$modhdeps $mdh"
  	done
  
! 	echo "##### ===== DEPENDENCIES GENERATED FROM ${module}.mdd ===== #####"
  	echo
! 	echo "MODOBJS_${module} = $objects"
! 	echo "MODDOBJS_${module} = $dobjects \$(@E@NTRYOBJ)"
! 	echo "SYMS_${module} = $proto"
! 	echo "EPRO_${module} = "`echo $proto '' | sed 's,\.syms ,.epro ,g'`
! 	echo "INCS_${module} = \$(EPRO_${module}) $otherincs"
! 	echo "EXPIMP_${module} = $imports \$(EXPOPT)$module.export"
! 	echo "NXPIMP_${module} ="
  	echo
! 	echo "proto.${module}: \$(EPRO_${module})"
! 	echo "\$(SYMS_${module}): \$(PROTODEPS)"
  	echo
! 	echo "${module}.export: \$(SYMS_${module})"
! 	echo "	( echo '#!'; cat \$(SYMS_${module}) | sed -n '/^X/{s/^X//;p;}' | sort -u ) > \$@"
  	echo
! 	echo "modobjs.${module}: \$(MODOBJS_${module})"
! 	echo "	echo '' \$(MODOBJS_${module}) $modobjs_sed>> \$(dir_src)/stamp-modobjs.tmp"
  	echo
  	if test -z "$alwayslink"; then
! 	    echo "${module}.\$(DL_EXT): \$(MODDOBJS_${module}) ${module}.export $depimports"
  	    echo '	rm -f $@'
! 	    echo "	\$(DLLINK) \$(@E@XPIMP_$module) \$(@E@NTRYOPT) \$(MODDOBJS_${module}) \$(LIBS)"
  	    echo
  	fi
! 	echo "${module}.mdhi: ${module}.mdhs \$(INCS_${module})"
  	echo "	@test -f \$@ || echo 'do not delete this file' > \$@"
  	echo
! 	echo "${module}.mdhs: ${module}.mdd"
! 	echo "	@\$(MAKE) -f \$(makefile) \$(MAKEDEFS) ${module}.mdh.tmp"
! 	echo "	@if cmp -s ${module}.mdh ${module}.mdh.tmp; then \\"
! 	echo "	    rm -f ${module}.mdh.tmp; \\"
! 	echo "	    echo \"\\\`${module}.mdh' is up to date.\"; \\"
  	echo "	else \\"
! 	echo "	    mv -f ${module}.mdh.tmp ${module}.mdh; \\"
! 	echo "	    echo \"Updated \\\`${module}.mdh'.\"; \\"
  	echo "	fi"
! 	echo "	echo 'timestamp for ${module}.mdh against ${module}.mdd' > \$@"
  	echo
! 	echo "${module}.mdh: ${modhdeps} ${headers} ${hdrdeps} ${module}.mdhi"
! 	echo "	@\$(MAKE) -f \$(makefile) \$(MAKEDEFS) ${module}.mdh.tmp"
! 	echo "	@mv -f ${module}.mdh.tmp ${module}.mdh"
! 	echo "	@echo \"Updated \\\`${module}.mdh'.\""
  	echo
! 	echo "${module}.mdh.tmp:"
  	echo "	@( \\"
! 	echo "	    echo '#ifndef have_${module}_module'; \\"
! 	echo "	    echo '#define have_${module}_module'; \\"
  	echo "	    echo; \\"
! 	if test -n "$moddeps"; then
  	    echo "	    echo '/* Module dependencies */'; \\"
! 	    echo "	    for mod in $modhdeps; do \\"
! 	    echo "		echo '# define USING_MODULE'; \\"
! 	    echo "		echo '# include \"'\$\$mod'\"'; \\"
! 	    echo "	    done; \\"
! 	    echo "	    echo '# undef USING_MODULE'; \\"
  	    echo "	    echo; \\"
! 	fi
  	if test -n "$headers"; then
  	    echo "	    echo '/* Extra headers for this module */'; \\"
  	    echo "	    for hdr in $headers; do \\"
--- 171,318 ----
  
      other_mdhs=
      remote_mdhs=
!     other_exports=
!     remote_exports=
!     for mddname in $here_mddnames; do
  
! 	unset name moddeps nozshdep alwayslink hasexport
  	unset autobins autoinfixconds autoprefixconds autoparams automathfuncs
  	unset objects proto headers hdrdeps otherincs
! 	. $top_srcdir/$the_subdir/${mddname}.mdd
! 	q_name=`echo $name | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
  	test -n "${moddeps+set}" || moddeps=
! 	test -n "$nozshdep" || moddeps="$moddeps zsh/main"
  	test -n "${proto+set}" ||
  	    proto=`echo $objects '' | sed 's,\.o ,.syms ,g'`
  
  	dobjects=`echo $objects '' | sed 's,\.o ,..o ,g'`
  	modhdeps=
! 	exportdeps=
! 	q_moddeps=
  	for dep in $moddeps; do
! 	    q_dep=`echo $dep | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
! 	    q_moddeps="$q_moddeps $q_dep"
! 	    eval "depfile=\$modfile_$q_dep"
! 	    eval `echo $depfile | sed 's,/\([^/]*\)\.mdd$,;depbase=\1,;s,^,loc=,'`
  	    case $the_subdir in
  		$loc)
! 		    mdh="${depbase}.mdh"
! 		    export="${depbase}.export"
  		    ;;
  		$loc/*)
! 		    mdh="\$(dir_top)/$loc/${depbase}.mdh"
  		    case "$other_mdhs " in
  			*" $mdh "*) ;;
  			*) other_mdhs="$other_mdhs $mdh" ;;
  		    esac
+ 		    export="\$(dir_top)/$loc/${depbase}.export"
+ 		    case "$other_exports " in
+ 			*" $export "*) ;;
+ 			*) other_exports="$other_exports $export" ;;
+ 		    esac
  		    ;;
  		*)
! 		    mdh="\$(dir_top)/$loc/${depbase}.mdh"
  		    case "$remote_mdhs " in
  			*" $mdh "*) ;;
  			*) remote_mdhs="$remote_mdhs $mdh" ;;
  		    esac
+ 		    export="\$(dir_top)/$loc/${depbase}.export"
+ 		    case "$remote_exports " in
+ 			*" $export "*) ;;
+ 			*) remote_exports="$remote_exports $export" ;;
+ 		    esac
  		    ;;
  	    esac
  	    modhdeps="$modhdeps $mdh"
+ 	    exportdeps="$exportdeps $export"
  	done
  
! 	echo "##### ===== DEPENDENCIES GENERATED FROM ${mddname}.mdd ===== #####"
  	echo
! 	echo "MODOBJS_${mddname} = $objects"
! 	echo "MODDOBJS_${mddname} = $dobjects \$(@E@NTRYOBJ)"
! 	echo "SYMS_${mddname} = $proto"
! 	echo "EPRO_${mddname} = "`echo $proto '' | sed 's,\.syms ,.epro ,g'`
! 	echo "INCS_${mddname} = \$(EPRO_${mddname}) $otherincs"
! 	echo "EXPIMP_${mddname} = $exportdeps \$(EXPOPT)$mddname.export"
! 	echo "NXPIMP_${mddname} ="
  	echo
! 	echo "proto.${mddname}: \$(EPRO_${mddname})"
! 	echo "\$(SYMS_${mddname}): \$(PROTODEPS)"
  	echo
! 	echo "${mddname}.export: \$(SYMS_${mddname})"
! 	echo "	( echo '#!'; cat \$(SYMS_${mddname}) | sed -n '/^X/{s/^X//;p;}' | sort -u ) > \$@"
  	echo
! 	echo "modobjs.${mddname}: \$(MODOBJS_${mddname})"
! 	echo "	echo '' \$(MODOBJS_${mddname}) $modobjs_sed>> \$(dir_src)/stamp-modobjs.tmp"
  	echo
  	if test -z "$alwayslink"; then
! 	    case " $all_modules" in *" ${mddname}."*)
! 		echo "install.modules-here: install.modules.${mddname}"
! 		echo "uninstall.modules-here: uninstall.modules.${mddname}"
! 		echo
! 	    ;; esac
! 	    instsubdir=`echo $name | sed 's,^,/,;s,/[^/]*$,,'`
! 	    echo "install.modules.${mddname}: ${mddname}.\$(DL_EXT)"
! 	    echo "	\$(sdir_top)/mkinstalldirs \$(DESTDIR)\$(MODDIR)${instsubdir}"
! 	    echo "	\$(INSTALL_PROGRAM) ${mddname}.\$(DL_EXT) \$(DESTDIR)\$(MODDIR)/${name}.\$(DL_EXT)"
! 	    echo
! 	    echo "uninstall.modules.${mddname}:"
! 	    echo "	rm -f \$(DESTDIR)\$(MODDIR)/${name}.\$(DL_EXT)"
! 	    echo
! 	    echo "${mddname}.\$(DL_EXT): \$(MODDOBJS_${mddname}) ${mddname}.export $exportdeps"
  	    echo '	rm -f $@'
! 	    echo "	\$(DLLINK) \$(@E@XPIMP_$mddname) \$(@E@NTRYOPT) \$(MODDOBJS_${mddname}) \$(LIBS)"
  	    echo
  	fi
! 	echo "${mddname}.mdhi: ${mddname}.mdhs \$(INCS_${mddname})"
  	echo "	@test -f \$@ || echo 'do not delete this file' > \$@"
  	echo
! 	echo "${mddname}.mdhs: ${mddname}.mdd"
! 	echo "	@\$(MAKE) -f \$(makefile) \$(MAKEDEFS) ${mddname}.mdh.tmp"
! 	echo "	@if cmp -s ${mddname}.mdh ${mddname}.mdh.tmp; then \\"
! 	echo "	    rm -f ${mddname}.mdh.tmp; \\"
! 	echo "	    echo \"\\\`${mddname}.mdh' is up to date.\"; \\"
  	echo "	else \\"
! 	echo "	    mv -f ${mddname}.mdh.tmp ${mddname}.mdh; \\"
! 	echo "	    echo \"Updated \\\`${mddname}.mdh'.\"; \\"
  	echo "	fi"
! 	echo "	echo 'timestamp for ${mddname}.mdh against ${mddname}.mdd' > \$@"
  	echo
! 	echo "${mddname}.mdh: ${modhdeps} ${headers} ${hdrdeps} ${mddname}.mdhi"
! 	echo "	@\$(MAKE) -f \$(makefile) \$(MAKEDEFS) ${mddname}.mdh.tmp"
! 	echo "	@mv -f ${mddname}.mdh.tmp ${mddname}.mdh"
! 	echo "	@echo \"Updated \\\`${mddname}.mdh'.\""
  	echo
! 	echo "${mddname}.mdh.tmp:"
  	echo "	@( \\"
! 	echo "	    echo '#ifndef have_${q_name}_module'; \\"
! 	echo "	    echo '#define have_${q_name}_module'; \\"
  	echo "	    echo; \\"
! 	echo "	    echo '# ifndef IMPORTING_MODULE_${q_name}'; \\"
! 	echo "	    if test @SHORTBOOTNAMES@ = yes; then \\"
! 	echo "		echo '#  ifndef MODULE'; \\"
! 	echo "	    fi; \\"
! 	echo "	    echo '#   define boot_ boot_${q_name}'; \\"
! 	echo "	    echo '#   define cleanup_ cleanup_${q_name}'; \\"
! 	echo "	    echo '#   define setup_ setup_${q_name}'; \\"
! 	echo "	    echo '#   define finish_ finish_${q_name}'; \\"
! 	echo "	    if test @SHORTBOOTNAMES@ = yes; then \\"
! 	echo "		echo '#  endif /* !MODULE */'; \\"
! 	echo "	    fi; \\"
! 	echo "	    echo '# endif /* !IMPORTING_MODULE_${q_name} */'; \\"
! 	echo "	    echo; \\"
! 	if test -n "$moddeps"; then (
! 	    set x $q_moddeps
  	    echo "	    echo '/* Module dependencies */'; \\"
! 	    for hdep in $modhdeps; do
! 		shift
! 		echo "	    echo '# define IMPORTING_MODULE_${1} 1'; \\"
! 		echo "	    echo '# include \"${hdep}\"'; \\"
! 	    done
  	    echo "	    echo; \\"
! 	) fi
  	if test -n "$headers"; then
  	    echo "	    echo '/* Extra headers for this module */'; \\"
  	    echo "	    for hdr in $headers; do \\"
***************
*** 281,303 ****
  	    echo "	    echo; \\"
  	fi
  	if test -n "$proto"; then
! 	    echo "	    for epro in \$(EPRO_${module}); do \\"
  	    echo "		echo '# include \"'\$\$epro'\"'; \\"
  	    echo "	    done; \\"
  	    echo "	    echo; \\"
  	fi
! 	echo "	    echo '#endif /* !have_${module}_module */'; \\"
  	echo "	) > \$@"
  	echo
! 	echo "\$(MODOBJS_${module}) \$(MODDOBJS_${module}): ${module}.mdh"
  	sed -e '/^ *: *<< *\\Make *$/,/^Make$/!d' \
  	    -e 's/^ *: *<< *\\Make *$//; /^Make$/d' \
! 	    < $top_srcdir/$the_subdir/${module}.mdd
  	echo
  
      done
  
!     if test -n "$remote_mdhs$other_mdhs"; then
  	echo "##### ===== DEPENDENCIES FOR REMOTE MODULES ===== #####"
  	echo
  	for mdh in $remote_mdhs; do
--- 325,347 ----
  	    echo "	    echo; \\"
  	fi
  	if test -n "$proto"; then
! 	    echo "	    for epro in \$(EPRO_${mddname}); do \\"
  	    echo "		echo '# include \"'\$\$epro'\"'; \\"
  	    echo "	    done; \\"
  	    echo "	    echo; \\"
  	fi
! 	echo "	    echo '#endif /* !have_${q_name}_module */'; \\"
  	echo "	) > \$@"
  	echo
! 	echo "\$(MODOBJS_${mddname}) \$(MODDOBJS_${mddname}): ${mddname}.mdh"
  	sed -e '/^ *: *<< *\\Make *$/,/^Make$/!d' \
  	    -e 's/^ *: *<< *\\Make *$//; /^Make$/d' \
! 	    < $top_srcdir/$the_subdir/${mddname}.mdd
  	echo
  
      done
  
!     if test -n "$remote_mdhs$other_mdhs$remote_exports$other_exports"; then
  	echo "##### ===== DEPENDENCIES FOR REMOTE MODULES ===== #####"
  	echo
  	for mdh in $remote_mdhs; do
***************
*** 307,312 ****
--- 351,366 ----
  	done | sed 's,^\(.*\)@%@\(.*\)@%@\(.*\)/\([^/]*\)$,\1\3\2\4,'
  	if test -n "$other_mdhs"; then
  	    echo "${other_mdhs}:"
+ 	    echo "	false # should only happen with make -n"
+ 	    echo
+ 	fi
+ 	for export in $remote_exports; do
+ 	    echo "$export: FORCE"
+ 	    echo "	@cd @%@ && \$(MAKE) \$(MAKEDEFS) @%@$export"
+ 	    echo
+ 	done | sed 's,^\(.*\)@%@\(.*\)@%@\(.*\)/\([^/]*\)$,\1\3\2\4,'
+ 	if test -n "$other_exports"; then
+ 	    echo "${other_exports}:"
  	    echo "	false # should only happen with make -n"
  	    echo
  	fi
diff -cr ../zsh-/Src/mkmodindex.sh ./Src/mkmodindex.sh
*** ../zsh-/Src/mkmodindex.sh	Sun Nov 28 17:42:28 1999
--- ./Src/mkmodindex.sh	Thu Dec 16 10:14:15 1999
***************
*** 13,40 ****
      dir=$1
      shift
      ( set $dir/*.mdd; test -f $1 ) || continue
!     dosubs=false
!     for mod in `echo '' $dir/*.mdd '' | sed 's, [^ ]*/, ,g;s,\.mdd , ,g'`; do
! 	case `echo "$mod@ $module_list " | sed 's,^.*[^_0-9A-Za-z].*@,@@,'` in
! 	    @@*)
! 		echo >&2 "WARNING: illegally named module \`$mod' in $dir"
! 		echo >&2 "         (ignoring it)"
! 		;;
! 	    *@*" $mod "*)
! 		eval "loc=\$loc_$mod"
! 		echo >&2 "WARNING: module \`$mod' (in $loc) duplicated in $dir"
! 		echo >&2 "         (ignoring duplicate)"
! 		dosubs=true
! 		;;
! 	    *)
! 		module_list="$module_list$mod "
! 		echo "loc_$mod=$dir"
! 		eval "loc_$mod=\$dir"
! 		dosubs=true
! 		;;
! 	esac
      done
!     $dosubs && set `echo $dir/*/. '' | sed 's,/\. , ,g'` "$@"
  done
  
  echo
--- 13,37 ----
      dir=$1
      shift
      ( set $dir/*.mdd; test -f $1 ) || continue
!     for modfile in $dir/*.mdd; do
! 	name=`( . $modfile; echo $name )`
! 	case "$name" in *[!/_0-9A-Za-z]* | /* | */ | *//*)
! 	    echo >&2 "WARNING: illegally named module \`$name' in $modfile"
! 	    echo >&2 "         (ignoring it)"
! 	    continue
! 	;; esac
! 	q_name=`echo $name | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
! 	case " $module_list " in *" $name "*)
! 	    eval "omodfile=\$modfile_$q_name"
! 	    echo >&2 "WARNING: module \`$name' (in $omodfile) duplicated in $modfile"
! 	    echo >&2 "         (ignoring duplicate)"
! 	    continue
! 	;; esac
! 	module_list="$module_list$name "
! 	echo "modfile_$q_name=$modfile"
! 	eval "modfile_$q_name=\$modfile"
      done
!     set `echo $dir/*/. '' | sed 's,/\. , ,g'` "$@"
  done
  
  echo
diff -cr ../zsh-/Src/module.c ./Src/module.c
*** ../zsh-/Src/module.c	Mon Dec  6 23:15:45 1999
--- ./Src/module.c	Thu Dec 16 10:14:15 1999
***************
*** 36,69 ****
  LinkList linkedmodules;
  
  
! /* The `zsh' module contains all the base code that can't actually be built *
!  * as a separate module.  It is initialised by main(), so there's nothing   *
!  * for the boot function to do.                                             */
  
  /**/
  int
! setup_zsh(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_zsh(Module m)
  {
      return 0;
  }
  
  /**/
  int
! cleanup_zsh(Module m)
  {
      return 0;
  }
  
  /**/
  int
! finish_zsh(Module m)
  {
      return 0;
  }
--- 36,69 ----
  LinkList linkedmodules;
  
  
! /* The `zsh/main' module contains all the base code that can't actually be *
!  * built as a separate module.  It is initialised by main(), so there's    *
!  * nothing for the boot function to do.                                    */
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! cleanup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
***************
*** 358,379 ****
  
  #ifdef DLSYM_NEEDS_UNDERSCORE
  # define STR_SETUP     "_setup_"
- # define STR_SETUP_S   "_setup_%s"
  # define STR_BOOT      "_boot_"
- # define STR_BOOT_S    "_boot_%s"
  # define STR_CLEANUP   "_cleanup_"
- # define STR_CLEANUP_S "_cleanup_%s"
  # define STR_FINISH    "_finish_"
- # define STR_FINISH_S  "_finish_%s"
  #else /* !DLSYM_NEEDS_UNDERSCORE */
  # define STR_SETUP     "setup_"
- # define STR_SETUP_S   "setup_%s"
  # define STR_BOOT      "boot_"
- # define STR_BOOT_S    "boot_%s"
  # define STR_CLEANUP   "cleanup_"
- # define STR_CLEANUP_S "cleanup_%s"
  # define STR_FINISH    "finish_"
- # define STR_FINISH_S  "finish_%s"
  #endif /* !DLSYM_NEEDS_UNDERSCORE */
  
  /**/
--- 358,371 ----
***************
*** 395,415 ****
      void *ret = NULL;
      int l;
  
!     if (strchr(name, '/')) {
! 	ret = dlopen(unmeta(name), RTLD_LAZY | RTLD_GLOBAL);
! 	if (ret || 
! 	    unset(PATHDIRS) ||
! 	    (*name == '/') ||
! 	    (*name == '.' && name[1] == '/') ||
! 	    (*name == '.' && name[1] == '.' && name[2] == '/'))
! 	    return ret;
!     }
! 
!     l = strlen(name) + 1;
      for (pp = module_path; !ret && *pp; pp++) {
  	if (l + (**pp ? strlen(*pp) : 1) > PATH_MAX)
  	    continue;
! 	sprintf(buf, "%s/%s", **pp ? *pp : ".", name);
  	ret = dlopen(unmeta(buf), RTLD_LAZY | RTLD_GLOBAL);
      }
  
--- 387,397 ----
      void *ret = NULL;
      int l;
  
!     l = 1 + strlen(name) + 1 + strlen(DL_EXT);
      for (pp = module_path; !ret && *pp; pp++) {
  	if (l + (**pp ? strlen(*pp) : 1) > PATH_MAX)
  	    continue;
! 	sprintf(buf, "%s/%s.%s", **pp ? *pp : ".", name, DL_EXT);
  	ret = dlopen(unmeta(buf), RTLD_LAZY | RTLD_GLOBAL);
      }
  
***************
*** 420,434 ****
  static void *
  do_load_module(char const *name)
  {
!     void *ret = NULL;
!     char buf[PATH_MAX + 1];
  
!     if (strlen(name) + strlen(DL_EXT) < PATH_MAX) {
! 	sprintf(buf, "%s.%s", name, DL_EXT);
! 	ret = try_load_module(buf);
!     }
!     if (!ret)
! 	ret = try_load_module(name);
      if (!ret) {
  	int waserr = errflag;
  	zerr("failed to load module: %s", name, 0);
--- 402,410 ----
  static void *
  do_load_module(char const *name)
  {
!     void *ret;
  
!     ret = try_load_module(name);
      if (!ret) {
  	int waserr = errflag;
  	zerr("failed to load module: %s", name, 0);
***************
*** 505,541 ****
  #else
  
  static Module_func
! module_func(Module m, char *name, char *name_s)
  {
-     char *s, *t;
- #ifndef DYNAMIC_NAME_CLASH_OK
-     char buf[PATH_MAX + 1];
- #endif
-     Module_func fn;
- 
-     s = strrchr(m->nam, '/');
-     if (s)
- 	s = dupstring(++s);
-     else
- 	s = m->nam;
-     if ((t = strrchr(s, '.')))
- 	*t = '\0';
  #ifdef DYNAMIC_NAME_CLASH_OK
!     fn = (Module_func) dlsym(m->u.handle, name);
  #else /* !DYNAMIC_NAME_CLASH_OK */
!     if (strlen(s) + 6 > PATH_MAX)
! 	return NULL;
!     sprintf(buf, name_s, s);
!     fn = (Module_func) dlsym(m->u.handle, buf);
  #endif /* !DYNAMIC_NAME_CLASH_OK */
-     return fn;
  }
  
  /**/
  static int
  dyn_setup_module(Module m)
  {
!     Module_func fn = module_func(m, STR_SETUP, STR_SETUP_S);
  
      if (fn)
  	return fn(m);
--- 481,519 ----
  #else
  
  static Module_func
! module_func(Module m, char *name)
  {
  #ifdef DYNAMIC_NAME_CLASH_OK
!     return (Module_func) dlsym(m->u.handle, name);
  #else /* !DYNAMIC_NAME_CLASH_OK */
!     VARARR(char, buf, strlen(name) + strlen(m->nam)*2 + 1);
!     char const *p;
!     char *q;
!     strcpy(buf, name);
!     q = strchr(buf, 0);
!     for(p = m->nam; *p; p++) {
! 	if(*p == '/') {
! 	    *q++ = 'Q';
! 	    *q++ = 's';
! 	} else if(*p == '_') {
! 	    *q++ = 'Q';
! 	    *q++ = 'u';
! 	} else if(*p == 'Q') {
! 	    *q++ = 'Q';
! 	    *q++ = 'q';
! 	} else
! 	    *q++ = *p;
!     }
!     *q = 0;
!     return (Module_func) dlsym(m->u.handle, buf);
  #endif /* !DYNAMIC_NAME_CLASH_OK */
  }
  
  /**/
  static int
  dyn_setup_module(Module m)
  {
!     Module_func fn = module_func(m, STR_SETUP);
  
      if (fn)
  	return fn(m);
***************
*** 547,553 ****
  static int
  dyn_boot_module(Module m)
  {
!     Module_func fn = module_func(m, STR_BOOT, STR_BOOT_S);
  
      if(fn)
  	return fn(m);
--- 525,531 ----
  static int
  dyn_boot_module(Module m)
  {
!     Module_func fn = module_func(m, STR_BOOT);
  
      if(fn)
  	return fn(m);
***************
*** 559,565 ****
  static int
  dyn_cleanup_module(Module m)
  {
!     Module_func fn = module_func(m, STR_CLEANUP, STR_CLEANUP_S);
  
      if(fn)
  	return fn(m);
--- 537,543 ----
  static int
  dyn_cleanup_module(Module m)
  {
!     Module_func fn = module_func(m, STR_CLEANUP);
  
      if(fn)
  	return fn(m);
***************
*** 574,580 ****
  static int
  dyn_finish_module(Module m)
  {
!     Module_func fn = module_func(m, STR_FINISH, STR_FINISH_S);
      int r;
  
      if (fn)
--- 552,558 ----
  static int
  dyn_finish_module(Module m)
  {
!     Module_func fn = module_func(m, STR_FINISH);
      int r;
  
      if (fn)
***************
*** 657,662 ****
--- 635,656 ----
  #endif /* !DYNAMIC */
  
  /**/
+ static int
+ modname_ok(char const *p)
+ {
+     do {
+ 	if(*p != '_' && !ialnum(*p))
+ 	    return 0;
+ 	do {
+ 	    p++;
+ 	} while(*p == '_' || ialnum(*p));
+ 	if(!*p)
+ 	    return 1;
+     } while(*p++ == '/');
+     return 0;
+ }
+ 
+ /**/
  int
  load_module(char const *name)
  {
***************
*** 666,671 ****
--- 660,669 ----
      LinkNode node, n;
      int set;
  
+     if (!modname_ok(name)) {
+ 	zerr("invalid module name `%s'", name, 0);
+ 	return 0;
+     }
      if (!(node = find_module(name))) {
  	if (!(linked = module_linked(name)) &&
  	    !(handle = do_load_module(name)))
***************
*** 778,786 ****
  	    zwarnnam(nam, "module %s already loaded.", module, 0);
  	    return 0;
  	}
-     } else if (res && isset(RESTRICTED) && strchr(module, '/')) {
- 	zwarnnam(nam, "%s: restricted", module, 0);
- 	return 0;
      } else
  	return load_module(module);
  
--- 776,781 ----
***************
*** 984,996 ****
  	int ret = 0;
  	char *tnam = *args++;
  
! 	for(; *args; args++) {
! 	    if(isset(RESTRICTED) && strchr(*args, '/')) {
! 		zwarnnam(nam, "%s: restricted", *args, 0);
! 		ret = 1;
! 	    } else
! 		add_dep(tnam, *args);
! 	}
  	return ret;
      }
  }
--- 979,986 ----
  	int ret = 0;
  	char *tnam = *args++;
  
! 	for(; *args; args++)
! 	    add_dep(tnam, *args);
  	return ret;
      }
  }
***************
*** 1025,1034 ****
  	/* add autoloaded builtins */
  	char *modnam;
  	modnam = *args++;
- 	if(isset(RESTRICTED) && strchr(modnam, '/')) {
- 	    zwarnnam(nam, "%s: restricted", modnam, 0);
- 	    return 1;
- 	}
  	do {
  	    char *bnam = *args ? *args++ : modnam;
  	    if (strchr(bnam, '/')) {
--- 1015,1020 ----
***************
*** 1092,1101 ****
  	char *modnam;
  
  	modnam = *args++;
- 	if(isset(RESTRICTED) && strchr(modnam, '/')) {
- 	    zwarnnam(nam, "%s: restricted", modnam, 0);
- 	    return 1;
- 	}
  	do {
  	    char *cnam = *args ? *args++ : modnam;
  	    if (strchr(cnam, '/')) {
--- 1078,1083 ----
***************
*** 1152,1161 ****
  	char *modnam;
  
  	modnam = *args++;
- 	if(isset(RESTRICTED) && strchr(modnam, '/')) {
- 	    zwarnnam(nam, "%s: restricted", modnam, 0);
- 	    return 1;
- 	}
  	do {
  	    char *fnam = *args ? *args++ : modnam;
  	    if (strchr(fnam, '/')) {
--- 1134,1139 ----
***************
*** 1215,1224 ****
  	char *modnam;
  
  	modnam = *args++;
- 	if(isset(RESTRICTED) && strchr(modnam, '/')) {
- 	    zwarnnam(nam, "%s: restricted", modnam, 0);
- 	    return 1;
- 	}
  	do {
  	    char *pnam = *args ? *args++ : modnam;
  	    if (strchr(pnam, '/')) {
--- 1193,1198 ----
diff -cr ../zsh-/Src/xmods.conf ./Src/xmods.conf
*** ../zsh-/Src/xmods.conf	Fri Dec 10 19:39:49 1999
--- ./Src/xmods.conf	Thu Dec 16 10:14:15 1999
***************
*** 1,10 ****
! rlimits
! zle
! complete
! compctl
! sched
! complist
! zutil
! computil
! parameter
! zleparameter
--- 1,10 ----
! zsh/rlimits
! zsh/zle
! zsh/complete
! zsh/compctl
! zsh/sched
! zsh/complist
! zsh/zutil
! zsh/computil
! zsh/parameter
! zsh/zleparameter
diff -cr ../zsh-/Src/zsh.mdd ./Src/zsh.mdd
*** ../zsh-/Src/zsh.mdd	Fri Dec  3 18:54:50 1999
--- ./Src/zsh.mdd	Thu Dec 16 10:14:15 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/main
+ 
  nozshdep=1
  alwayslink=1
  
***************
*** 61,78 ****
  	@( \
  	    binmods=`sed 's/^/ /;s/$$/ /' modules-bltin`; \
  	    for mod in `cat $(sdir_src)/xmods.conf`; do \
  		case $$binmods in \
  		    *" $$mod "*) \
! 			echo "#define    LINKED_XMOD_$$mod 1" ;; \
  		    *)  echo "#ifdef DYNAMIC"; \
! 			echo "# define UNLINKED_XMOD_$$mod 1"; \
  			echo "#endif" ;; \
  		esac; \
! 	    done; \
! 	    echo; \
! 	    for mod in $$binmods; do \
! 		echo "int boot_$$mod _((Module));"; \
! 	    done; \
  	) > $@
  
  clean-here: clean.zsh
--- 63,77 ----
  	@( \
  	    binmods=`sed 's/^/ /;s/$$/ /' modules-bltin`; \
  	    for mod in `cat $(sdir_src)/xmods.conf`; do \
+ 		q_mod=`echo $$mod | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`; \
  		case $$binmods in \
  		    *" $$mod "*) \
! 			echo "#define    LINKED_XMOD_$$q_mod 1" ;; \
  		    *)  echo "#ifdef DYNAMIC"; \
! 			echo "# define UNLINKED_XMOD_$$q_mod 1"; \
  			echo "#endif" ;; \
  		esac; \
! 	    done \
  	) > $@
  
  clean-here: clean.zsh
diff -cr ../zsh-/Test/ztst.zsh ./Test/ztst.zsh
*** ../zsh-/Test/ztst.zsh	Mon Dec 13 18:48:02 1999
--- ./Test/ztst.zsh	Thu Dec 16 10:14:15 1999
***************
*** 24,30 ****
  
  # We need to be able to save and restore the options used in the test.
  # We use the $options variable of the parameter module for this.
! zmodload -i parameter
  
  # Note that both the following are regular arrays, since we only use them
  # in whole array assignments to/from $options.
--- 24,30 ----
  
  # We need to be able to save and restore the options used in the test.
  # We use the $options variable of the parameter module for this.
! zmodload -i zsh/parameter
  
  # Note that both the following are regular arrays, since we only use them
  # in whole array assignments to/from $options.
diff -cr ../zsh-/configure.in ./configure.in
*** ../zsh-/configure.in	Thu Dec  9 23:29:24 1999
--- ./configure.in	Thu Dec 16 10:14:15 1999
***************
*** 1525,1530 ****
--- 1525,1537 ----
    E=N
  fi
  
+ if test "x$zsh_cv_sys_dynamic_clash_ok" = xyes; then
+   SHORTBOOTNAMES=yes
+ else
+   SHORTBOOTNAMES=no
+ fi
+ AC_SUBST(SHORTBOOTNAMES)
+ 
  AC_DEFINE_UNQUOTED(DL_EXT, "$DL_EXT")dnl
  AC_SUBST(D)dnl
  AC_SUBST(DL_EXT)dnl

Don't worry if these two patches don't apply because you don't have the files.

diff -cr ../zsh-/Src/Modules/zprof.c ./Src/Modules/zprof.c
*** ../zsh-/Src/Modules/zprof.c	Tue Dec 14 11:07:33 1999
--- ./Src/Modules/zprof.c	Tue Dec 14 14:45:13 1999
***************
*** 291,304 ****
  
  /**/
  int
! setup_zprof(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_zprof(Module m)
  {
      calls = NULL;
      ncalls = 0;
--- 291,304 ----
  
  /**/
  int
! setup_(Module m)
  {
      return 0;
  }
  
  /**/
  int
! boot_(Module m)
  {
      calls = NULL;
      ncalls = 0;
***************
*** 311,317 ****
  
  /**/
  int
! cleanup_zprof(Module m)
  {
      freepfuncs(calls);
      freeparcs(arcs);
--- 311,317 ----
  
  /**/
  int
! cleanup_(Module m)
  {
      freepfuncs(calls);
      freeparcs(arcs);
***************
*** 322,328 ****
  
  /**/
  int
! finish_zprof(Module m)
  {
      return 0;
  }
--- 322,328 ----
  
  /**/
  int
! finish_(Module m)
  {
      return 0;
  }
diff -cr ../zsh-/Src/Modules/zprof.mdd ./Src/Modules/zprof.mdd
*** ../zsh-/Src/Modules/zprof.mdd	Tue Dec 14 11:07:33 1999
--- ./Src/Modules/zprof.mdd	Tue Dec 14 11:52:25 1999
***************
*** 1,3 ****
--- 1,5 ----
+ name=zsh/zprof
+ 
  autobins="zprof"
  
  objects="zprof.o"
END



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