about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-01-24 09:42:20 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2015-01-25 11:34:26 -0800
commit2fa11b7c54d766d6987fb5c0008f8209e6a2529f (patch)
tree178c4c39a89806174ffc49c6190881fcbd15a463 /Doc
parentf7a2fba5342a3cf8c2590111a0a296acd8c8a211 (diff)
downloadzsh-2fa11b7c54d766d6987fb5c0008f8209e6a2529f.tar.gz
zsh-2fa11b7c54d766d6987fb5c0008f8209e6a2529f.tar.xz
zsh-2fa11b7c54d766d6987fb5c0008f8209e6a2529f.zip
34350, 34353: document zsh/db/gdbm module, clean up a few things in the code
Still core dumps at this revision if the tied parameter is forced to be a local and is not untied before end of scope.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Makefile.in2
-rw-r--r--Doc/Zsh/mod_db_gdbm.yo27
2 files changed, 28 insertions, 1 deletions
diff --git a/Doc/Makefile.in b/Doc/Makefile.in
index 41af4a33e..a420781ee 100644
--- a/Doc/Makefile.in
+++ b/Doc/Makefile.in
@@ -60,7 +60,7 @@ MODDOCSRC = \
 Zsh/mod_attr.yo Zsh/mod_cap.yo Zsh/mod_clone.yo \
 Zsh/mod_compctl.yo Zsh/mod_complete.yo Zsh/mod_complist.yo \
 Zsh/mod_computil.yo Zsh/mod_curses.yo \
-Zsh/mod_datetime.yo Zsh/mod_deltochar.yo \
+Zsh/mod_datetime.yo Zsh/mod_db_gdbm.yo Zsh/mod_deltochar.yo \
 Zsh/mod_example.yo Zsh/mod_files.yo Zsh/mod_langinfo.yo \
 Zsh/mod_mapfile.yo Zsh/mod_mathfunc.yo Zsh/mod_newuser.yo \
 Zsh/mod_parameter.yo Zsh/mod_pcre.yo Zsh/mod_regex.yo \
diff --git a/Doc/Zsh/mod_db_gdbm.yo b/Doc/Zsh/mod_db_gdbm.yo
new file mode 100644
index 000000000..6065f860e
--- /dev/null
+++ b/Doc/Zsh/mod_db_gdbm.yo
@@ -0,0 +1,27 @@
+COMMENT(!MOD!zsh/db/gdbm
+Builtins for managing associative array parameters tied to GDBM databases.
+!MOD!)
+The tt(zsh/db/gdbm) module is used to create "tied" associative arrays
+that interface to database files.  If the GDBM interface is not available,
+the builtins defined by this module will report an error.  This module is
+also intended as a prototype for creating additional database interfaces,
+so the tt(ztie) builtin may move to a more generic module in the future.
+
+The builtins in this module are:
+
+startitem()
+findex(ztie)
+cindex(tied array, creating)
+item(tt(ztie -d db/gdbm -f) var(filename) var(arrayname))(
+Open the GDBM database identified by var(filename) and, if successful,
+create the associative array var(arrayname) linked to the file.  Note
+that var(arrayname) must be unset at the time tt(ztie) is called, and
+is always created as a global parameter (as if with `tt(typeset -g)').
+)
+findex(zuntie)
+cindex(tied array, destroying)
+item(tt(zuntie) var(arrayname) ...)(
+Close the GDBM database associated with each var(arrayname) and then
+unset the variable.
+)
+enditem()