path: root/bin/
diff options
Diffstat (limited to 'bin/')
1 files changed, 332 insertions, 0 deletions
diff --git a/bin/ b/bin/
new file mode 100644
index 0000000..3aaa934
--- /dev/null
+++ b/bin/
@@ -0,0 +1,332 @@
+''' $Id:,v 1995/05/12 11:57:31 ram Exp $
+''' Copyright (c) 1991-1993, Raphael Manfredi
+''' You may redistribute only under the terms of the Artistic Licence,
+''' as specified in the README file that comes with the distribution.
+''' You may reuse parts of this distribution only within the terms of
+''' that same Artistic Licence; a copy of which may be found at the root
+''' of the source tree for dist 3.0.
+''' $Log:,v $
+''' Revision 1995/05/12 11:57:31 ram
+''' patch54: updated my e-mail address
+''' Revision 1994/01/24 13:52:55 ram
+''' patch16: typo fix
+''' Revision 1993/08/24 12:11:02 ram
+''' patch3: typo fix
+''' Revision 3.0 1993/08/18 12:04:04 ram
+''' Baseline for dist 3.0 netwide release.
+manilist \- report status of files in a source directory
+.B manilist
+.B \-abcdhnptV
+] [
+.B \-i
+.I extension
+] [
+.B \-f
+.I manifest
+] [
+.B \-p
+.I format
+] [
+.B \-s
+.I string
+] [
+.B \-w
+.I which
+] [
+.B \-x
+.I extension
+] [
+.B \-C
+.I separator
+] [
+.B \-I
+.I included
+] [
+.B \-L
+.I colsize
+] [
+.B \-X
+.I excluded
+] [
+.I files or directories
+.I Manilist
+scans a source directory and produces a report on the status of each file:
+whether it is up-to-date or not with respect to
+.I patchlevel.h ,
+if it is missing from, and some other useful information which
+may be dynamically configured. It can be use to maintain a file,
+produce a detailed listing and status of a group of directories, etc... The
+rich set of options concur to make \fImanilist\fR a perfect low-level tool.
+Under its simplest invocation form at the top level directory of a package,
+with no arguments, \fImanilist\fR will scan the and produce
+a report on the status of each file listed there. Each line starts with a
+single character flag which indicates the state of the file, followed by the
+name of the file.
+What happens in fact is more complex than that. \fIManilist\fR scans the file and then loops over all the files listed there. Internally,
+\fImanilist\fR maintains an inclusion and an exclusion list, both specifying
+extensions for files. For instance, the inclusion list could be ('.c', '.h')
+and the exclusion ('.o', ',v') so that C sources are included and object
+or RCS files excluded. By default, all files but those excluded are used.
+Some other selections may be applied at this stage, as will be explained later
+on. For those files which pass this selection process, a report is issued
+according to a report \fIformat\fR, which by default is "\fIA:%c %n\fR".
+The letter \fIA\fR (or anything before the initial ':' character is the
+file selection specification we've been talking about. The remaining is the
+formatting, a string which is printed as-is, modulo some escape sequences.
+It so happens that \fI%c\fR is the character flag and \fI%n\fR is the name
+of the current file.
+Generally speaking, \fImanilist\fR should be regarded as a tool which emits
+configurable reports on a set of files, selectively picking them among a list
+or by directly scanning the directories to see what's out there...
+By specifying a set of directories or files as arguments on the command line,
+you restrict the scanning area, limiting to reports concerning those files
+or directories. If you do not specify any, manilist restricts its report to
+the current directory and its subdirectories, unless the \fB\-t\fR option is
+.I Manilist
+recognizes the following options:
+.TP 15
+.B \-a
+Make a report for \fIall\fR the files, regardless of what is specified by
+the \fIincluded\fR and \fIexcluded\fR suffix lists.
+.B \-b
+Assume current directory is the base (root) of the package tree. When this
+option is not specified, \fImanilist\fR will look for a \fI.package\fR file
+to indicate the root directory of the package (also called the top) and
+complain if it does not find it.
+.B \-c
+Check files against those listed in (or whatever file specified
+via the \fB\-f\fR option) and report discrepancies via the \fI%c\fR macro.
+.B \-d
+Dump included and excluded suffix lists on stderr, extensions being space
+separated. A good way to know the default lists is to run: \fImanilist
+\-f /dev/null \-bd.
+.B \-f\fI manifest
+Specify an alternate manifest file, the default being to use
+.B \-h
+Print the usage help message and exit.
+.B \-i\fI extensions
+Add new extensions to the included suffix list. The \fIextensions\fR argument
+must list the suffixes separated by spaces, as in \fB\-i\fI '.ph .pl'\fR to add
+both \\fR and \\fR to the existing suffixes. Note that the argument
+needs to be quoted to protect spaces against shell interpretation.
+.B \-n
+Do not use any manifest file. Rather scan the directories and act as with all
+the files there were already listed in a manifest.
+.B \-p\fI format
+Set the new printing format, which has the form \fIselection\fR:\fIstring\fR,
+with \fIselection\fR being a list of single letters specifying which files
+from the manifest are to be used for reports, and \fIstring\fR being a
+message to print as report, with some macro substitutions. It is also possible
+to have column formatting by specifying a '|' inside the string to delimit
+the different columns you wish to see. See also \fB\-C\fR and \fB\-L\fR for
+more formatting parameters.
+.B \-s\fI string
+Specify the \fIstring\fR part of the printing format (see \fB\-p\fR for a
+general description of the \fIformat\fR). Available macros are listed further
+down the manual page.
+.B \-t
+Start from the top directory (the root directory of the distribution) regardless
+of the current directory. There must be a \fI.package\fR file to indicate
+what the top directory is.
+.B \-w\fI selection
+Specifiy the \fIselection\fR part of the printing format. Available selections
+will be discussed later.
+.B \-x\fI extensions
+Add new extensions to the excluded suffix list. The \fIextensions\fR argument
+must list the suffixes separated by spaces, as in \fB\-x\fI '.s .p'\fR to add
+both \fI.s\fR and \fI.p\fR to the existing list. Note that the argument
+needs to be quoted to protect spaces against shell interpretation.
+.B \-C\fI separator
+Give the column separator, which is to be used in place of the '|' character
+in the report format string. By default, it is a single space.
+.B \-I\fI included
+Specify a new list of suffixes to be included in the reports. This overrides
+the original default list (whereas \fB\-i\fR is used to \fIadd\fR suffixes to
+the list). Suffixes must be space separated.
+.B \-L\fI colsize
+When using column formatting (the '|' character being used to denote columns),
+this option may be used to specify the maximum column width, separating each
+width by a single ','. Leaving a width unspecified does not impose any limit
+on its width. For instance, if the format string is \fI%n|%d|%t\fR, one could
+limit the middle column (descriptions from to 40 characters and
+the name column (first one) to 15 characters, leaving the last one with no
+imposed limits, by using \fB\-L\fI 15,40,\fR.
+.B \-V
+Print version number and exit.
+.B \-X\fI excluded
+Specify a new list of suffixes to be excluded in the reports. This overrides
+the original default list (whereas \fB\-x\fR is used to \fIadd\fR suffixes to
+the list). Suffixes must be space separated.
+The flexibility of \fImanilist\fR is brought by its use of a dynamic formatting
+string for providing its reports. It is possible to specify a format via the
+\fB\-p\fR option or just parts of it: the text string via \fB\-s\fR and the
+file selection with \fB\-w\fR.
+.SS "File Selection"
+The leading part of the formatting string tells \fImanilist\fR which files you
+wish to see in the final report. Available selectors are:
+.PD 0
+.TP 5
+.B A
+All the files but the excluded ones (i.e. those files whose suffix is listed
+in the exclusion list). This is the default action.
+.B a
+All the files included and/or excluded (shortcut for \fIix\fR). Note that files
+which are neither included nor excluded will not appear in the report.
+.B d
+Report only for directories.
+.B f
+Report only for files.
+.B i
+Only included files are listed.
+.B m
+Only those files or directories found in the manifest are listed.
+.B n
+Only those files or directories \fInot\fR found in the manifest are listed.
+.B x
+Only excluded files are listed.
+When you specify more than one letter, the resulting report depends on the
+nature of the selection. For \fId\fR, \fIf\fR, \fIm\fR and \fIn\fR, a logical
+union is performed. This means specifying \fIfd\fR or \fImn\fR is the same
+as not specifying anything, but it's less efficient since \fImanilist\fR is
+forced to perform the checks it would otherwise bypass. The \fIi\fR and \fIx\fR
+selectors are special: by default, all the files not excluded are reported.
+Specifying \fIx\fR also asks for excluded files. Specifying \fIi\fR restricts
+the report to the included files. Using both at the same time (\fIix\fR) will
+force a report for files which are included or excluded.
+.SS "Macro Substitution"
+The string part of the report format can make use of the following macros:
+.PD 0
+.TP 5
+A character coding the status of the file.
+Description from the manifest file, if any.
+Name of the file (its path from the top directory).
+Size of the file, in bytes.
+Time stamp of the last modification.
+.SS "File Status"
+The \fI%c\fR macro, giving a single character coding the file status, can
+expand into one of the following.
+.PD 0
+.TP 5
+The file is up to date (not newer than \fIpatchlevel.h\fR).
+The file is present in the manifest but is missing.
+The file has been modified since last patch (newer than \fIpatchlevel.h\fR).
+The file exists but is not listed in the manifest.
+The file exists but is not listed in the manifest and is older than
+The file is listed in the manifest and exists, but has been excluded. Naturally,
+this will appear in the report only if the \fIx\fR selector is given in the
+report format.
+The file is listed in the manifest, does not exist, and was excluded.
+The command +5
+\fImanilist -ct -p 'ni:%n'\fR
+.sp -5
+will list all the source files from your distribution which are not listed
+in your file. Note that this includes only "source" files, that
+is to say files whose extension is listed in the inclusion list.
+If you do not wish this restriction, replace the formatting string with
+\fIn:%n\fR (only the excluded files will not appear).
+To build an initial MANIFEST file, use: +5
+\fImanilist -n -p 'Af:%n' > MANIFEST\fR
+.sp -5
+from the top directory. You will eventually want to fill in descriptions for
+each file listed in the manifest.
+.PD 0
+.TP 20
+Default manifest file, listing files and giving a small description for each
+of them.
+Raphael Manfredi <>
+manifake(1), makedist(1), pat(1).