Index: modules/base64/base64.n
===================================================================
RCS file: base64.n
diff -N base64.n
--- /dev/null	Thu May 24 22:33:05 2001
+++ base64.n	Tue Jul 31 16:36:35 2001
@@ -0,0 +1,35 @@
+'\" 
+'\" Copyright (c) 2001 by Andreas Kupries <a.kupries@westend.com>
+'\" All rights reserved.
+'\" 
+'\" RCS: @(#) $Id: base64.n,v 1.3 2001/07/06 18:30:52 andreas_kupries Exp $
+'\" 
+.so man.macros
+.TH base64 n 1.0 Base64 "base64 en- & decoding"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+::base64 \- Procedures to encode and decode base64
+.SH SYNOPSIS
+\fBpackage require base64 ?2.2?\fR
+.sp
+\fB::base64::encode\fR ?-maxlen \fImaxlen\fR? ?-wrapchar \fIchar\fR? \fIstring\fR
+.sp
+\fB::base64::decode\fR \fIstring\fR
+.BE
+.SH DESCRIPTION
+.PP
+This package provides procedures to encode binary data into base64 and back.
+.TP
+\fB::base64::encode\fR ?-maxlen \fImaxlen\fR? ?-wrapchar \fIwrapchar\fR? \fIstring\fR
+Base64 encodes the given binary \fIstring\fR and returns the encoded
+result. Inserts the character \fIwrapchar\fR every \fImaxlen\fR
+characters of output. \fIwrapchar\fR defaults to newline. \fImaxlen\fR
+defaults to 60.
+.TP
+\fB::base64::decode\fR \fIstring\fR
+Base64 decodes the given \fIstring\fR and returns the binary
+data. The decoder ignores whitespace in the string.
+
+.SH KEYWORDS
+encoding, base64
Index: modules/cmdline/cmdline.n
===================================================================
RCS file: cmdline.n
diff -N cmdline.n
--- /dev/null	Thu May 24 22:33:05 2001
+++ cmdline.n	Tue Jul 31 16:36:35 2001
@@ -0,0 +1,95 @@
+'\" 
+'\" Copyright (c) 2001 by Andreas Kupries <a.kupries@westend.com>
+'\" All rights reserved.
+'\" 
+'\" RCS: @(#) $Id: cmdline.n,v 1.3 2001/07/06 18:30:52 andreas_kupries Exp $
+'\" 
+.so man.macros
+.TH cmdline n 1.0 Cmdline "command line / option processing"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+::cmdline \- Procedures to process command lines and options.
+.SH SYNOPSIS
+\fBpackage require cmdline ?1.1?\fR
+.sp
+\fB::cmdline::getopt\fR \fIargvVar optstring optVar valVar\fR
+.sp
+\fB::cmdline::getoptions\fR \fIarglistVar optlist\fR ?\fIusage\fR?
+.sp
+\fB::cmdline::usage\fR \fIoptlist\fR ?\fIusage\fR?
+.sp
+\fB::cmdline::getfiles\fR \fIpatterns quiet\fR
+.sp
+\fB::cmdline::getArgv0\fR
+.BE
+.SH DESCRIPTION
+.PP
+This package provides commands to parse command lines and options.
+.TP
+\fB::cmdline::getopt\fR \fIargvVar optstring optVar valVar\fR
+This command works in a fashion like the standard C based \fBgetopt\fR
+function.  Given an option string and a pointer to an array or args
+this command will process the first argument and return info on how to
+procede. The command returns 1 if an option was found, 0 if no more
+options were found, and -1 if an error occurred.
+.sp
+\fIargvVar\fR contains the name of the argv list to process. If
+options are found the arg list is modified and the processed arguments
+are removed from the start of the list.
+.sp
+\fIoptstring\fR contains a list of command options that the
+application will accept.  If the option ends in ".arg" the command
+will use the next argument as an argument to the option.  Otherwise
+the option is a boolean that is set to 1 if present.
+.sp
+\fIoptVar\fR refers to the variable the command will store the found
+option into (without the leading '-' and without the .arg extension).
+.sp
+\fIvalVar\fR refers to the variable to store either the value for the
+specified option into upon success or an error message in the case of
+failure. The stored value comes from the command line for .arg
+options, otherwise the value is 1.
+.TP
+\fB::cmdline::getoptions\fR \fIarglistVar optlist\fR ?\fIusage\fR?
+Processes the set of command line options found in the list variable
+named by \fIarglistVar\fR and fills in defaults for those not
+specified.  This also generates an error message that lists the
+allowed flags if an incorrect flag is specified. The optional
+\fIusage\fR-argument contains a string to include in front of the
+generated message. If not present it defaults to "options:".
+.sp
+\fIoptlist\fR contains a list of lists where each element specifies an
+option in the form: \fIflag default comment\fR
+.sp
+If \fIflag\fR ends in ".arg" then the value is taken from the command
+line. Otherwise it is a boolean and appears in the result if present
+on the command line. If \fIflag\fR ends in ".secret", it will not be
+displayed in the usage.
+.TP
+\fB::cmdline::usage\fR \fIoptlist\fR ?\fIusage\fR?
+Generates and returns an error message that lists the allowed
+flags. \fIoptlist\fR is defined as for
+\fB::cmdline::getoptions\fI. The optional \fIusage\fR-argument
+contains a string to include in front of the generated message. If not
+present it defaults to "options:".
+.TP
+\fB::cmdline::getfiles\fR \fIpatterns quiet\fR
+Given a list of file \fIpatterns\fR this command computes the set of
+valid files.  On windows, file globbing is performed on each argument.
+On Unix, only file existence is tested.  If a file argument produces
+no valid files, a warning is optionally generated (set \fIquiet\fR to
+true).
+.sp
+This code also uses the full path for each file.  If not given it
+prepends the current working directory to the filename. This ensures
+that these files will never conflict with files in a wrapped zip
+file. The last sentence refers to the pro-tools.
+.TP
+\fB::cmdline::getArgv0\fR
+This command returns the "sanitized" version of \fIargv0\fR.  It will
+strip off the leading path and removes the ".bin" extensions that the
+pro-apps use because they must be wrapped by a shell script.
+
+.SH KEYWORDS
+cmdline processing
Index: modules/fileutil/fileutil.n
===================================================================
RCS file: fileutil.n
diff -N fileutil.n
--- /dev/null	Thu May 24 22:33:05 2001
+++ fileutil.n	Tue Jul 31 16:36:35 2001
@@ -0,0 +1,52 @@
+'\" 
+'\" Copyright (c) 2001 by Andreas Kupries <a.kupries@westend.com>
+'\" All rights reserved.
+'\" 
+'\" RCS: @(#) $Id: fileutil.n,v 1.3 2001/07/06 18:30:52 andreas_kupries Exp $
+'\" 
+.so man.macros
+.TH fileutil n 1.0 Fileutil "file utilities"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+::fileutil \- Procedures implementing some file utilities
+.SH SYNOPSIS
+\fBpackage require fileutil ?1.1?\fR
+.sp
+\fB::fileutil::grep\fR ?-maxlen \fImaxlen\fR? ?-wrapchar \fIchar\fR? \fIstring\fR
+.sp
+\fB::fileutil::find\fR \fIstring\fR
+.sp
+\fB::fileutil::cat\fR \fIfilename\fR
+.BE
+.SH DESCRIPTION
+.PP
+This package provides implementations of standard unix utilities
+.TP
+\fB::fileutil::grep\fR \fIpattern\fR ?\fIfiles\fR?
+Implementation of grep. Adapted from the Tcler's Wiki. The first
+argument defiens the \fIpattern\fR to search for. This is followed by
+a list of \fIfiles\fR to search through. The list is optional and
+\fBstdin\fR will be used if is missing. The result of the procedures
+is a list containing the matches. Each match is a single element of
+the list and contains filename, number and contents of the matching
+line, separated by a colons.
+.TP
+\fB::fileutil::find\fR ?\fIbasedir\fR ?\fIfiltercmd\fR??
+An implementation of the unix command \fBfind\fR. Adapted from the
+Tcler's Wiki. Takes at most two arguments, the path to the directory
+to start searching from and a command to use to evaluate interest in
+each file. The path defaults to \fB.\fR, i.e. the current
+directory. The command defaults to the empty string, which means that
+all files are of interest. The command takes care \fBnot\fR to loose
+itself in infinite loops upon encountering circular link structures.
+The result of the command is a list containing the paths to the
+interesting files.
+.TP
+\fB::fileutil::cat\fR \fIfilename\fR
+A tcl implementation of the UNIX "cat" command.  Returns the contents
+of the specified file. The first argument is the name of the file to
+read.
+
+.SH KEYWORDS
+file utilities
