From b7c15c31519dc44c1f691e0466badd556ffe9423 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 18:18:56 +0200 Subject: Adding upstream version 3.7.10. Signed-off-by: Daniel Baumann --- mantools/README | 38 + mantools/ccformat | 207 +++++ mantools/check-double-cc | 8 + mantools/check-double-install-proto-text | 7 + mantools/check-double-proto-html | 7 + mantools/check-postfix-files | 32 + mantools/check-postlink | 57 ++ mantools/check-spell-cc | 8 + mantools/check-spell-install-proto-text | 7 + mantools/check-spell-proto-html | 7 + mantools/comment.c | 66 ++ mantools/dehtml | 9 + mantools/deroff | 7 + mantools/docparam | 378 +++++++++ mantools/docuseparam | 5 + mantools/double | 10 + mantools/enter | 145 ++++ mantools/find-double | 13 + mantools/find-fluff | 7 + mantools/fixman | 257 ++++++ mantools/get_anchors.pl | 50 ++ mantools/hchangered | 40 + mantools/html2readme | 31 + mantools/make-relnotes | 85 ++ mantools/make_soho_readme | 85 ++ mantools/makemanidx | 97 +++ mantools/makepostconf | 61 ++ mantools/makepostconflinks | 29 + mantools/makereadme | 13 + mantools/man2html | 48 ++ mantools/mandouble | 7 + mantools/manlint | 165 ++++ mantools/manlint.stop | 113 +++ mantools/mansect | 125 +++ mantools/manspell | 7 + mantools/missing-proxy-read-maps | 56 ++ mantools/postconf2html | 99 +++ mantools/postconf2man | 95 +++ mantools/postconffix | 72 ++ mantools/postlink | 1274 ++++++++++++++++++++++++++++++ mantools/postlink.sed | 603 ++++++++++++++ mantools/readme2html | 36 + mantools/specmiss | 27 + mantools/spell | 10 + mantools/spelldiff | 23 + mantools/srctoman | 214 +++++ mantools/useparam | 368 +++++++++ mantools/user2var | 13 + mantools/var2user | 13 + mantools/xpostconf | 153 ++++ mantools/xpostdef | 121 +++ 51 files changed, 5408 insertions(+) create mode 100644 mantools/README create mode 100755 mantools/ccformat create mode 100755 mantools/check-double-cc create mode 100755 mantools/check-double-install-proto-text create mode 100755 mantools/check-double-proto-html create mode 100755 mantools/check-postfix-files create mode 100755 mantools/check-postlink create mode 100755 mantools/check-spell-cc create mode 100755 mantools/check-spell-install-proto-text create mode 100755 mantools/check-spell-proto-html create mode 100644 mantools/comment.c create mode 100755 mantools/dehtml create mode 100755 mantools/deroff create mode 100755 mantools/docparam create mode 100755 mantools/docuseparam create mode 100755 mantools/double create mode 100755 mantools/enter create mode 100755 mantools/find-double create mode 100755 mantools/find-fluff create mode 100755 mantools/fixman create mode 100644 mantools/get_anchors.pl create mode 100755 mantools/hchangered create mode 100755 mantools/html2readme create mode 100755 mantools/make-relnotes create mode 100755 mantools/make_soho_readme create mode 100755 mantools/makemanidx create mode 100755 mantools/makepostconf create mode 100755 mantools/makepostconflinks create mode 100755 mantools/makereadme create mode 100755 mantools/man2html create mode 100644 mantools/mandouble create mode 100755 mantools/manlint create mode 100644 mantools/manlint.stop create mode 100755 mantools/mansect create mode 100644 mantools/manspell create mode 100755 mantools/missing-proxy-read-maps create mode 100755 mantools/postconf2html create mode 100755 mantools/postconf2man create mode 100755 mantools/postconffix create mode 100755 mantools/postlink create mode 100755 mantools/postlink.sed create mode 100755 mantools/readme2html create mode 100755 mantools/specmiss create mode 100755 mantools/spell create mode 100755 mantools/spelldiff create mode 100755 mantools/srctoman create mode 100755 mantools/useparam create mode 100755 mantools/user2var create mode 100755 mantools/var2user create mode 100755 mantools/xpostconf create mode 100755 mantools/xpostdef (limited to 'mantools') diff --git a/mantools/README b/mantools/README new file mode 100644 index 0000000..7b95fa9 --- /dev/null +++ b/mantools/README @@ -0,0 +1,38 @@ +Scripts and tools to format embedded manual pages, or to format C +source code files. Each has an embedded man page in the source. + +ccformat c code formatter + usage: ccformat (copy stdin to stdout) + usage: ccformat files... (format files in place) + +enter set project-specific environment + usage: enter project-name + +mansect extract manual page section from source file + usage: mansect file.suffix + usage: mansect -type file + +srctoman extract man page from source file + usage: srctoman file.suffix + usage: srctoman -type file + +man2html quick script to htmlize nroff -man output + +postlink quick script to hyperlink HTML text + +See the proto/README file for the following tools that generate +HTML and ASCII forms of README documents and of some manual pages. + +fixman quick hack to patch postconf.proto text into C sorce + +makereadme create README_FILES table of contents (AAAREADME) + +html2readme convert HTML to README file + +postconf2html postconf.proto -> postconf.5.html + +postconf2man postconf.proto -> postconf.5 (nroff input) + +xpostconf extract selected sections from postconf.proto + +xpostdef re-compute the defaults in postconf.proto diff --git a/mantools/ccformat b/mantools/ccformat new file mode 100755 index 0000000..9ac6c57 --- /dev/null +++ b/mantools/ccformat @@ -0,0 +1,207 @@ +#!/bin/sh + +# ccformat - convert C code to standard format + +# @(#) ccformat.sh 1.3 11/5/89 14:39:29 + +# how to suppress newlines in echo + +case `echo -n` in +"") n=-n; c=;; + *) n=; c='\c';; +esac + +# initialize + +TMPF=/tmp/ccformat.$$ +ERROR= +TROFF= +BCK= +FLAGS="-st -di8 -npsl -bap -bad -bbb -nbc -i4 -d0 -nip -nfc1 -cd41 -c49" + +trap 'rm -f .ind.$$ $TMPF; exit 1' 1 2 3 15 + +# parse command options + +while : +do + case $1 in + -t) TROFF=-troff;; + -b) case $# in + 1) ERROR="-b option requires backup argument"; break;; + *) BCK=$2; shift;; + esac;; + -T) case $# in + 1) ERROR="-T option requires typename argument"; break;; + *) FLAGS="$FLAGS -T$2"; shift;; + esac;; + -*) ERROR="invalid option: $1"; break;; + *) break;; + esac + shift +done + +# check for invalid commands + +test -z "$ERROR" || { + echo "$0: $ERROR" 1>&2 + echo "usage: $0 [-b backup] [-t] [-T typename] [file(s)]" 1>&2 + exit 1; } + +# format the files + +case $# in + 0) indent $TROFF $FLAGS;; + *) case "$TROFF" in +-troff) for i in $* + do + indent $TROFF $FLAGS $i + done;; + *) for i in $* + do + echo $n $i... $c + test -z "$BCK" || cp $i $i"$BCK" || { echo backup FAILED; exit 1; } + { # some versions of indent return garbage exit status -- gack! + (indent $FLAGS <$i 2>.ind.$$ >$TMPF || test ! -s .ind.$$) >$TMPF && + # try a device full check + # echo >>$TMPF && + ( + # ignore interrupts while we overwrite the original file + trap '' 1 2 3 15; cp $TMPF $i + ) && echo replaced; } || { echo replacement FAILED; exit 1; } + done;; + esac;; +esac + +rm -f $TMPF .ind.$$ + +exit + +#++ +# NAME +# ccformat 1 +# SUMMARY +# convert C source text to standard format +# PROJECT +# sdetools +# SYNOPSIS +# ccformat [-b backup] [-t] [-T typename] [file(s)] +# DESCRIPTION +# The \fIccformat\fR command adjusts the layout of C program text +# such that it approximates the Kernighan and Ritchie coding style. +# +# If no file names are specified, \fIccformat\fR reads +# from standard input and writes the result to standard output. +# This is convenient for source formatting from within a text +# editor program. +# +# Otherwise, the named files are overwritten with their +# formatted equivalent. The \fI-b\fR option (see below) provides +# a way to create backup copies of the original files. +# +# Alternatively, the command can be used as a preprocessor for +# pretty-printing with the \fInroff\fR or \fItroff\fR commands +# (see the -t option below). In this case, output is always written +# to standard output and no change is made to source files. +# +# The following options are recognized: +# .TP +# -b backup +# Requests that a copy of the original files be saved. The backup +# file name is constructed by appending the specified \fIbackup\fR +# string to the original file name. +# This option is ignored when the \fI-t\fR +# option is specifid. +# .TP +# -t +# Makes the program act as a preprocessor +# for pretty-printing with \fInroff\fR or \fItroff\fR. +# For example, in order to produce a pretty-printed +# version on the line printer, use +# + ccformat -t file(s) | nroff -mindent | col | lp +# .TP +# -T typename +# Adds \fItypename\fR to the list of type keywords. +# Names accumulate: -T can be specified more +# than once. You need to specify all the +# typenames that appear in your program that +# are defined by typedefs - nothing will be +# harmed if you miss a few, but the program +# won't be formatted as nicely as it should. +# PROGRAM LAYOUT +# .fi +# .ad +# The following program layout is produced: +# .TP +# comments +# Comments starting in the first column are left untouched. +# These are often carefully laid out by the programmer. +# .sp +# Comments that appear in-between statements are lined up with +# the surrounding program text, and are adjusted to accommodate +# as many words on a line as possible. +# However, a blank line in the middle of a comment is respected. +# .sp +# Trailing comments after declarations begin at column 41 +# (5 tab stops). +# Trailing comments after executable statements start at +# column 49 (6 tab stops). +# .TP +# indentation +# Statements are indented by multiples of four columns. +# There is only one statement per line. A control statement +# is always placed on a separate line. +# .TP +# braces +# If an opening brace is preceded by a control statement (\fCif, +# else, do, for\fR or \fCswitch\fR), it is placed on the same line +# as the control statement. +# .sp +# A closing brace is placed at the same level of indentation as the +# program text that precedes the corresponding opening brace. +# If a closing brace is followed by a control statement (\fCelse\fR +# or \fCwhile\fR), that control statement is placed on the same line +# as the closing brace. +# .sp +# In practice, brace placement is as +# exemplified by the books on C by B.W. Kernighan and D.M. Ritchie. +# .TP +# blanks +# Blanks are placed around assignment and arithmetic operators. +# Commas in declarations or parameter lists are followed by one blank. +# .sp +# In the following cases a +# blank line is inserted if it is not already present in the text: +# 1) in front of a block comment, 2) between local declarations and +# executable statements 3) after each function body. +# .TP +# declarations +# In the output, each variable declaration appears on +# a separate line. +# COMMANDS +# indent(1) +# FILES +# /tmp/ccformat.* intermediate files +# SEE ALSO +# indent(1) +# DIAGNOSTICS +# Indent may complain in case of syntax errors. These show +# up as comments in the resulting program text. +# BUGS +# The programs seems to beave even when fed ANSI C or even C++ +# code; this has not been tested thoroughly, however. +# +# Will produce useless files when fed with anything that is +# not C program text. This does not imply a judgment about +# C programs in general. +# AUTHOR(S) +# W.Z. Venema +# Eindhoven University of Technology +# Department of Mathematics and Computer Science +# Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands +# CREATION DATE +# Fri May 6 14:07:04 MET DST 1988 +# STATUS +# ccformat.sh 1.3 11/5/89 14:39:29 (draft) +#-- diff --git a/mantools/check-double-cc b/mantools/check-double-cc new file mode 100755 index 0000000..61ffc5b --- /dev/null +++ b/mantools/check-double-cc @@ -0,0 +1,8 @@ +#!/bin/sh + +# Finds double words in C comments. See mantools/comment.c for 'comment' +# source code. + +LANG=C; export LANG + +find src -name '*.[hc]' | xargs cat | comment | mantools/deroff | mantools/find-double | fgrep -vxf proto/stop.double-cc diff --git a/mantools/check-double-install-proto-text b/mantools/check-double-install-proto-text new file mode 100755 index 0000000..bab88bc --- /dev/null +++ b/mantools/check-double-install-proto-text @@ -0,0 +1,7 @@ +#!/bin/sh + +# Finds double words in install and proto text files. + +LANG=C; export LANG + +(ls *install* proto/* | egrep -v 'stop|Makefile|html|\.proto' | xargs mantools/deroff; cat RELEASE_NOTES) | mantools/find-double | fgrep -vxf proto/stop.double-install-proto-text diff --git a/mantools/check-double-proto-html b/mantools/check-double-proto-html new file mode 100755 index 0000000..234a774 --- /dev/null +++ b/mantools/check-double-proto-html @@ -0,0 +1,7 @@ +#!/bin/sh + +# Finds double words in proto html files. + +LANG=C; export LANG + +ls proto/*.html proto/*.proto | xargs mantools/dehtml | mantools/find-double | fgrep -vxf proto/stop.double-proto-html diff --git a/mantools/check-postfix-files b/mantools/check-postfix-files new file mode 100755 index 0000000..ea85d40 --- /dev/null +++ b/mantools/check-postfix-files @@ -0,0 +1,32 @@ +#!/bin/sh + +# Reports missing documentation file names in postfix-files. For +# simplicity and maintainability this looks at file basenames only. +# The odds that a file is installed in the wrong place are small. + +trap 'rm -f expected.tmp actual.tmp' 0 1 2 3 15 + +LANG=C; export LANG +LC_ALL=C; export LC_ALL + +# Extract file basenames from postfix-files. + +awk -F: ' + BEGIN { want["f"] = want["h"] = want["l"] = want["p"] = 1 } + want[$2] == 1 { n = split($1, path, "/"); print path[n] } +' conf/postfix-files | sort >actual.tmp + +# Create a list of expected names, excluding files that aren't installed. + +(ls man/man?/* html/*.html |sed 's/.*\///' | egrep -v '^makedefs.1 +^posttls-finger.1 +^qmqp-sink.1 +^qmqp-source.1 +^qshape.1 +^smtp-sink.1 +^smtp-source.1' +ls README_FILES) | sort >expected.tmp + +# Compare the expected names against the names in postfix-files. + +comm -23 expected.tmp actual.tmp diff --git a/mantools/check-postlink b/mantools/check-postlink new file mode 100755 index 0000000..21472d6 --- /dev/null +++ b/mantools/check-postlink @@ -0,0 +1,57 @@ +#!/bin/sh + +# Reports parameter names that have no postlink rules. + +LANG=C; export LANG +LC_ALL=C; export LC_ALL + +trap 'rm -f postlink.tmp postconf.tmp stoplist.tmp 2>/dev/null' 0 1 2 3 15 + +# Extract parameters from postlink script. This also produces names +# of obsolete parameters, and non-parameter names such as SMTPD +# access restrictions and mask names. + +sed -n '/[ ].*href="postconf\.5\.html#/{ + s/^[^#]*#// + s/".*// + p +}' mantools/postlink | sort > postlink.tmp + +# Extract parameters from postconf output, using the stock configurations. + +bin/postconf -dHc conf | sort >postconf.tmp + +# Filter the postconf output through a stoplist. First, parameter +# names prefixed by their service name. + +for xport in error lmtp local relay retry smtp virtual +do + cat <stoplist.tmp + +# Second, pseudo parameters, read-only parameters, etc. + +cat >>stoplist.tmp <<'EOF' +stress +EOF + +# Report names from postconf that have no rule in mantools/postlink. + +comm -23 postconf.tmp postlink.tmp | fgrep -vx -f stoplist.tmp diff --git a/mantools/check-spell-cc b/mantools/check-spell-cc new file mode 100755 index 0000000..ab22470 --- /dev/null +++ b/mantools/check-spell-cc @@ -0,0 +1,8 @@ +#!/bin/sh + +# Spellchecks comments in C source code. See mantools/comment.c for +# 'comment' source code. + +LANG=C; export LANG + +find . -name *.[hc] | xargs cat | comment | mantools/deroff | spell | fgrep -vxf proto/stop | fgrep -vxf proto/stop.spell-cc diff --git a/mantools/check-spell-install-proto-text b/mantools/check-spell-install-proto-text new file mode 100755 index 0000000..19b8140 --- /dev/null +++ b/mantools/check-spell-install-proto-text @@ -0,0 +1,7 @@ +#!/bin/sh + +# Spellchecks the release notes, install scripts, and proto non-html files. + +LANG=C; export LANG + +(ls *install* proto/* | egrep -v 'stop|Makefile|html|\.proto' | mantools/deroff; cat RELEASE_NOTES) | spell | fgrep -vxf proto/stop diff --git a/mantools/check-spell-proto-html b/mantools/check-spell-proto-html new file mode 100755 index 0000000..3d05d66 --- /dev/null +++ b/mantools/check-spell-proto-html @@ -0,0 +1,7 @@ +#!/bin/sh + +# Spellchecks the proto HTML files. + +LANG=C; export LANG + +mantools/dehtml proto/*html proto/*.proto | spell | fgrep -vxf proto/stop | fgrep -vxf proto/stop.spell-proto-html diff --git a/mantools/comment.c b/mantools/comment.c new file mode 100644 index 0000000..4372d44 --- /dev/null +++ b/mantools/comment.c @@ -0,0 +1,66 @@ +#include + +void copy_comment() +{ + int c; + + while ((c = getchar()) != EOF) { + if (c == '*') { + if ((c = getchar()) == '/') { + putchar('\n'); + return; + } + if (c != EOF) + ungetc(c, stdin); + putchar('*'); + } else { + putchar(c); + } + } +} + +void skip_string(int quote) +{ + int c; + + while ((c = getchar()) != EOF) { + if (c == quote) { + return; + } else if (c == '\\') { + getchar(); + } + } +} + +int main() +{ + int c; + + while ((c = getchar()) != EOF) { + switch (c) { + case '/': + if ((c = getchar()) == '*') { + copy_comment(); + } else if (c == '/') { + while ((c = getchar()) != EOF) { + putchar(c); + if (c == '\n') + break; + } + } else { + if (c != EOF) + ungetc(c, stdin); + } + break; + case '"': + case '\'': + skip_string(c); + break; + case '\\': + (void) getchar(); + break; + default: + break; + } + } +} diff --git a/mantools/dehtml b/mantools/dehtml new file mode 100755 index 0000000..cc120de --- /dev/null +++ b/mantools/dehtml @@ -0,0 +1,9 @@ +#!/bin/sh + +for i +do + case $i in + /*) lynx -dump file://localhost$i;; + *) lynx -dump file://localhost`pwd`/$i;; + esac +done diff --git a/mantools/deroff b/mantools/deroff new file mode 100755 index 0000000..d538e6e --- /dev/null +++ b/mantools/deroff @@ -0,0 +1,7 @@ +#!/bin/sh + +sed ' + s/^\.[^ ]*// + s/\\f.//g + s/\\(..//g +' "$@" diff --git a/mantools/docparam b/mantools/docparam new file mode 100755 index 0000000..7a6ddad --- /dev/null +++ b/mantools/docparam @@ -0,0 +1,378 @@ +#!/bin/sh + +# docparam - report what configuration parameters a subsystem documents + +# Usage: docparam src/mumble/*.c + +for name +do + sed -n ' + /^$/q + /^[^ ]* *\.\IP *"*\\fB\([a-zA-Z0-9_]*\).*/{ + s//\1/ + p + d + } + ' $name +done | awk ' + +BEGIN { + + # Table generated with: user2var mail_params.h + + table["mail_name"] = "var_mail_name" + table["helpful_warnings"] = "var_helpful_warnings" + table["show_user_unknown_table_name"] = "var_show_unk_rcpt_table" + table["notify_classes"] = "var_notify_classes" + table["empty_address_recipient"] = "var_empty_addr" + table["mail_owner"] = "var_mail_owner" + table["mail_owner"] = "var_owner_uid" + table["mail_owner"] = "var_owner_gid" + table["setgid_group"] = "var_sgid_group" + table["setgid_group"] = "var_sgid_gid" + table["default_privs"] = "var_default_privs" + table["default_privs"] = "var_default_uid" + table["default_privs"] = "var_default_gid" + table["myorigin"] = "var_myorigin" + table["mydestination"] = "var_mydest" + table["myhostname"] = "var_myhostname" + table["mydomain"] = "var_mydomain" + table["local_transport"] = "var_local_transport" + table["bounce_notice_recipient"] = "var_bounce_rcpt" + table["2bounce_notice_recipient"] = "var_2bounce_rcpt" + table["delay_notice_recipient"] = "var_delay_rcpt" + table["error_notice_recipient"] = "var_error_rcpt" + table["inet_interfaces"] = "var_inet_interfaces" + table["proxy_interfaces"] = "var_proxy_interfaces" + table["masquerade_domains"] = "var_masq_domains" + table["masquerade_exceptions"] = "var_masq_exceptions" + table["masquerade_classes"] = "var_masq_classes" + table["relayhost"] = "var_relayhost" + table["fallback_relay"] = "var_fallback_relay" + table["disable_dns_lookups"] = "var_disable_dns" + table["smtp_host_lookup"] = "var_smtp_dns_lookup" + table["smtp_mx_address_limit"] = "var_smtp_mxaddr_limit" + table["smtp_mx_session_limit"] = "var_smtp_mxsess_limit" + table["queue_directory"] = "var_queue_dir" + table["daemon_directory"] = "var_daemon_dir" + table["command_directory"] = "var_command_dir" + table["process_id_directory"] = "var_pid_dir" + table["process_id_directory"] = "var_starttime" + table["config_directory"] = "var_config_dir" + table["alternate_config_directories"] = "var_config_dirs" + table["default_database_type"] = "var_db_type" + table["syslog_facility"] = "var_syslog_facility" + table["always_bcc"] = "var_always_bcc" + table["undisclosed_recipients_header"] = "var_rcpt_witheld" + table["strict_rfc821_envelopes"] = "var_strict_rfc821_env" + table["broken_sasl_auth_clients"] = "var_broken_auth_clients" + table["disable_vrfy_command"] = "var_disable_vrfy_cmd" + table["virtual_alias_maps"] = "var_virt_alias_maps" + table["virtual_alias_domains"] = "var_virt_alias_doms" + table["unknown_virtual_alias_reject_code"] = "var_virt_alias_code" + table["canonical_maps"] = "var_canonical_maps" + table["sender_canonical_maps"] = "var_send_canon_maps" + table["recipient_canonical_maps"] = "var_rcpt_canon_maps" + table["sender_bcc_maps"] = "var_send_bcc_maps" + table["recipient_bcc_maps"] = "var_rcpt_bcc_maps" + table["transport_maps"] = "var_transport_maps" + table["default_transport"] = "var_def_transport" + table["swap_bangpath"] = "var_swap_bangpath" + table["append_at_myorigin"] = "var_append_at_myorigin" + table["append_dot_mydomain"] = "var_append_dot_mydomain" + table["allow_percent_hack"] = "var_percent_hack" + table["alias_maps"] = "var_alias_maps" + table["biff"] = "var_biff" + table["allow_mail_to_commands"] = "var_allow_commands" + table["command_time_limit"] = "var_command_maxtime" + table["allow_mail_to_files"] = "var_allow_files" + table["local_command_shell"] = "var_local_cmd_shell" + table["alias_database"] = "var_alias_db_map" + table["luser_relay"] = "var_luser_relay" + table["mail_spool_directory"] = "var_mail_spool_dir" + table["home_mailbox"] = "var_home_mailbox" + table["mailbox_command"] = "var_mailbox_command" + table["mailbox_command_maps"] = "var_mailbox_cmd_maps" + table["mailbox_transport"] = "var_mailbox_transport" + table["fallback_transport"] = "var_fallback_transport" + table["forward_path"] = "var_forward_path" + table["mailbox_delivery_lock"] = "var_mailbox_lock" + table["mailbox_size_limit"] = "var_mailbox_limit" + table["propagate_unmatched_extensions"] = "var_prop_extension" + table["recipient_delimiter"] = "var_rcpt_delim" + table["command_expansion_filter"] = "var_cmd_exp_filter" + table["forward_expansion_filter"] = "var_fwd_exp_filter" + table["prepend_delivered_header"] = "var_deliver_hdr" + table["enable_original_recipient"] = "var_enable_orcpt" + table["enable_errors_to"] = "var_enable_errors_to" + table["expand_owner_alias"] = "var_exp_own_alias" + table["require_home_directory"] = "var_stat_home_dir" + table["duplicate_filter_limit"] = "var_dup_filter_limit" + table["relocated_maps"] = "var_relocated_maps" + table["minimal_backoff_time"] = "var_min_backoff_time" + table["maximal_backoff_time"] = "var_max_backoff_time" + table["maximal_queue_lifetime"] = "var_max_queue_time" + table["bounce_queue_lifetime"] = "var_dsn_queue_time" + table["delay_warning_time"] = "var_delay_warn_time" + table["qmgr_message_active_limit"] = "var_qmgr_active_limit" + table["qmgr_message_recipient_limit"] = "var_qmgr_rcpt_limit" + table["qmgr_message_recipient_minimum"] = "var_qmgr_msg_rcpt_limit" + table["default_recipient_limit"] = "var_xport_rcpt_limit" + table["default_extra_recipient_limit"] = "var_stack_rcpt_limit" + table["default_delivery_slot_cost"] = "var_delivery_slot_cost" + table["default_delivery_slot_loan"] = "var_delivery_slot_loan" + table["default_delivery_slot_discount"] = "var_delivery_slot_discount" + table["default_minimum_delivery_slots"] = "var_min_delivery_slots" + table["qmgr_fudge_factor"] = "var_qmgr_fudge" + table["initial_destination_concurrency"] = "var_init_dest_concurrency" + table["default_destination_concurrency_limit"] = "var_dest_con_limit" + table["local"] = "var_local_con_lim" + table["default_destination_recipient_limit"] = "var_dest_rcpt_limit" + table["local"] = "var_local_rcpt_lim" + table["transport_retry_time"] = "var_transport_retry_time" + table["defer_transports"] = "var_defer_xports" + table["qmgr_clog_warn_time"] = "var_qmgr_clog_warn_time" + table["default_process_limit"] = "var_proc_limit" + table["service_throttle_time"] = "var_throttle_time" + table["max_use"] = "var_use_limit" + table["max_idle"] = "var_idle_limit" + table["application_event_drain_time"] = "var_event_drain" + table["ipc_idle"] = "var_ipc_idle_limit" + table["ipc_ttl"] = "var_ipc_ttl_limit" + table["line_length_limit"] = "var_line_limit" + table["debug_peer_list"] = "var_debug_peer_list" + table["debug_peer_level"] = "var_debug_peer_level" + table["hash_queue_names"] = "var_hash_queue_names" + table["hash_queue_depth"] = "var_hash_queue_depth" + table["best_mx_transport"] = "var_bestmx_transp" + table["smtp_connect_timeout"] = "var_smtp_conn_tmout" + table["smtp_helo_timeout"] = "var_smtp_helo_tmout" + table["smtp_xforward_timeout"] = "var_smtp_xfwd_tmout" + table["smtp_mail_timeout"] = "var_smtp_mail_tmout" + table["smtp_rcpt_timeout"] = "var_smtp_rcpt_tmout" + table["smtp_data_init_timeout"] = "var_smtp_data0_tmout" + table["smtp_data_xfer_timeout"] = "var_smtp_data1_tmout" + table["smtp_data_done_timeout"] = "var_smtp_data2_tmout" + table["smtp_rset_timeout"] = "var_smtp_rset_tmout" + table["smtp_quit_timeout"] = "var_smtp_quit_tmout" + table["smtp_quote_rfc821_envelope"] = "var_smtp_quote_821_env" + table["smtp_skip_4xx_greeting"] = "var_smtp_skip_4xx_greeting" + table["smtp_skip_5xx_greeting"] = "var_smtp_skip_5xx_greeting" + table["ignore_mx_lookup_error"] = "var_ign_mx_lookup_err" + table["smtp_skip_quit_response"] = "var_skip_quit_resp" + table["smtp_always_send_ehlo"] = "var_smtp_always_ehlo" + table["smtp_never_send_ehlo"] = "var_smtp_never_ehlo" + table["smtp_bind_address"] = "var_smtp_bind_addr" + table["smtp_helo_name"] = "var_smtp_helo_name" + table["smtp_randomize_addresses"] = "var_smtp_rand_addr" + table["smtp_line_length_limit"] = "var_smtp_line_limit" + table["smtp_pix_workaround_threshold_time"] = "var_smtp_pix_thresh" + table["smtp_pix_workaround_delay_time"] = "var_smtp_pix_delay" + table["smtp_defer_if_no_mx_address_found"] = "var_smtp_defer_mxaddr" + table["smtp_send_xforward_command"] = "var_smtp_send_xforward" + table["smtpd_banner"] = "var_smtpd_banner" + table["smtpd_timeout"] = "var_smtpd_tmout" + table["smtpd_recipient_limit"] = "var_smtpd_rcpt_limit" + table["smtpd_soft_error_limit"] = "var_smtpd_soft_erlim" + table["smtpd_hard_error_limit"] = "var_smtpd_hard_erlim" + table["smtpd_error_sleep_time"] = "var_smtpd_err_sleep" + table["smtpd_junk_command_limit"] = "var_smtpd_junk_cmd_limit" + table["smtpd_history_flush_threshold"] = "var_smtpd_hist_thrsh" + table["smtpd_noop_commands"] = "var_smtpd_noop_cmds" + table["smtpd_sasl_auth_enable"] = "var_smtpd_sasl_enable" + table["smtpd_sasl_security_options"] = "var_smtpd_sasl_opts" + table["smtpd_sasl_application_name"] = "var_smtpd_sasl_appname" + table["smtpd_sasl_local_domain"] = "var_smtpd_sasl_realm" + table["smtpd_sender_login_maps"] = "var_smtpd_snd_auth_maps" + table["smtp_sasl_auth_enable"] = "var_smtp_sasl_enable" + table["smtp_sasl_mechanism_filter"] = "var_smtp_sasl_mechs" + table["smtp_sasl_password_maps"] = "var_smtp_sasl_passwd" + table["smtp_sasl_security_options"] = "var_smtp_sasl_opts" + table["lmtpd_banner"] = "var_lmtpd_banner" + table["lmtpd_timeout"] = "var_lmtpd_tmout" + table["lmtpd_recipient_limit"] = "var_lmtpd_rcpt_limit" + table["lmtpd_soft_error_limit"] = "var_lmtpd_soft_erlim" + table["lmtpd_hard_error_limit"] = "var_lmtpd_hard_erlim" + table["lmtpd_error_sleep_time"] = "var_lmtpd_err_sleep" + table["lmtpd_junk_command_limit"] = "var_lmtpd_junk_cmd_limit" + table["smtpd_sasl_exceptions_networks"] = "var_smtpd_sasl_exceptions_networks" + table["lmtpd_sasl_auth_enable"] = "var_lmtpd_sasl_enable" + table["lmtpd_sasl_security_options"] = "var_lmtpd_sasl_opts" + table["lmtpd_sasl_local_domain"] = "var_lmtpd_sasl_realm" + table["lmtp_sasl_auth_enable"] = "var_lmtp_sasl_enable" + table["lmtp_sasl_password_maps"] = "var_lmtp_sasl_passwd" + table["lmtp_sasl_security_options"] = "var_lmtp_sasl_opts" + table["lmtp_tcp_port"] = "var_lmtp_tcp_port" + table["lmtp_cache_connection"] = "var_lmtp_cache_conn" + table["lmtp_skip_quit_response"] = "var_lmtp_skip_quit_resp" + table["lmtp_connect_timeout"] = "var_lmtp_conn_tmout" + table["lmtp_rset_timeout"] = "var_lmtp_rset_tmout" + table["lmtp_lhlo_timeout"] = "var_lmtp_lhlo_tmout" + table["lmtp_xforward_timeout"] = "var_lmtp_xfwd_tmout" + table["lmtp_mail_timeout"] = "var_lmtp_mail_tmout" + table["lmtp_rcpt_timeout"] = "var_lmtp_rcpt_tmout" + table["lmtp_data_init_timeout"] = "var_lmtp_data0_tmout" + table["lmtp_data_xfer_timeout"] = "var_lmtp_data1_tmout" + table["lmtp_data_done_timeout"] = "var_lmtp_data2_tmout" + table["lmtp_quit_timeout"] = "var_lmtp_quit_tmout" + table["lmtp_send_xforward_command"] = "var_lmtp_send_xforward" + table["hopcount_limit"] = "var_hopcount_limit" + table["header_size_limit"] = "var_header_limit" + table["header_address_token_limit"] = "var_token_limit" + table["virtual_alias_recursion_limit"] = "var_virt_recur_limit" + table["virtual_alias_expansion_limit"] = "var_virt_expan_limit" + table["message_size_limit"] = "var_message_limit" + table["queue_minfree"] = "var_queue_minfree" + table["header_checks"] = "var_header_checks" + table["mime_header_checks"] = "var_mimehdr_checks" + table["nested_header_checks"] = "var_nesthdr_checks" + table["body_checks"] = "var_body_checks" + table["body_checks_size_limit"] = "var_body_check_len" + table["bounce_size_limit"] = "var_bounce_limit" + table["double_bounce_sender"] = "var_double_bounce_sender" + table["fork_attempts"] = "var_fork_tries" + table["fork_delay"] = "var_fork_delay" + table["deliver_lock_attempts"] = "var_flock_tries" + table["deliver_lock_delay"] = "var_flock_delay" + table["stale_lock_time"] = "var_flock_stale" + table["sun_mailtool_compatibility"] = "var_mailtool_compat" + table["daemon_timeout"] = "var_daemon_timeout" + table["ipc_timeout"] = "var_ipc_timeout" + table["trigger_timeout"] = "var_trigger_timeout" + table["mynetworks"] = "var_mynetworks" + table["mynetworks_style"] = "var_mynetworks_style" + table["relay_domains"] = "var_relay_domains" + table["relay_transport"] = "var_relay_transport" + table["relay_recipient_maps"] = "var_relay_rcpt_maps" + table["unknown_relay_recipient_reject_code"] = "var_relay_rcpt_code" + table["smtpd_client_restrictions"] = "var_client_checks" + table["smtpd_helo_required"] = "var_helo_required" + table["smtpd_helo_restrictions"] = "var_helo_checks" + table["smtpd_sender_restrictions"] = "var_mail_checks" + table["smtpd_recipient_restrictions"] = "var_rcpt_checks" + table["smtpd_etrn_restrictions"] = "var_etrn_checks" + table["smtpd_data_restrictions"] = "var_data_checks" + table["smtpd_restriction_classes"] = "var_rest_classes" + table["allow_untrusted_routing"] = "var_allow_untrust_route" + table["reject_code"] = "var_reject_code" + table["defer_code"] = "var_defer_code" + table["unknown_client_reject_code"] = "var_unk_client_code" + table["invalid_hostname_reject_code"] = "var_bad_name_code" + table["unknown_hostname_reject_code"] = "var_unk_name_code" + table["non_fqdn_reject_code"] = "var_non_fqdn_code" + table["unknown_address_reject_code"] = "var_unk_addr_code" + table["smtpd_reject_unlisted_sender"] = "var_smtpd_rej_unl_from" + table["smtpd_reject_unlisted_recipient"] = "var_smtpd_rej_unl_rcpt" + table["unverified_recipient_reject_code"] = "var_unv_rcpt_code" + table["unverified_sender_reject_code"] = "var_unv_from_code" + table["multi_recipient_bounce_reject_code"] = "var_mul_rcpt_code" + table["relay_domains_reject_code"] = "var_relay_code" + table["permit_mx_backup_networks"] = "var_perm_mx_networks" + table["access_map_reject_code"] = "var_access_map_code" + table["rbl_reply_maps"] = "var_rbl_reply_maps" + table["default_rbl_reply"] = "var_def_rbl_reply" + table["maps_rbl_reject_code"] = "var_maps_rbl_code" + table["maps_rbl_domains"] = "var_maps_rbl_domains" + table["smtpd_delay_reject"] = "var_smtpd_delay_reject" + table["smtpd_null_access_lookup_key"] = "var_smtpd_null_key" + table["smtpd_expansion_filter"] = "var_smtpd_exp_filter" + table["local_recipient_maps"] = "var_local_rcpt_maps" + table["unknown_local_recipient_reject_code"] = "var_local_rcpt_code" + table["proxy_read_maps"] = "var_proxy_read_maps" + table["process_name"] = "var_procname" + table["process_id"] = "var_pid" + table["dont_remove"] = "var_dont_remove" + table["soft_bounce"] = "var_soft_bounce" + table["owner_request_special"] = "var_ownreq_special" + table["allow_min_user"] = "var_allow_min_user" + table["content_filter"] = "var_filter_xport" + table["fast_flush_domains"] = "var_fflush_domains" + table["fast_flush_purge_time"] = "var_fflush_purge" + table["fast_flush_refresh_time"] = "var_fflush_refresh" + table["import_environment"] = "var_import_environ" + table["export_environment"] = "var_export_environ" + table["virtual_transport"] = "var_virt_transport" + table["virtual_mailbox_maps"] = "var_virt_mailbox_maps" + table["virtual_mailbox_domains"] = "var_virt_mailbox_doms" + table["unknown_virtual_mailbox_reject_code"] = "var_virt_mailbox_code" + table["virtual_uid_maps"] = "var_virt_uid_maps" + table["virtual_gid_maps"] = "var_virt_gid_maps" + table["virtual_minimum_uid"] = "var_virt_minimum_uid" + table["virtual_mailbox_base"] = "var_virt_mailbox_base" + table["virtual_mailbox_limit"] = "var_virt_mailbox_limit" + table["virtual_mailbox_lock"] = "var_virt_mailbox_lock" + table["syslog_name"] = "var_syslog_name" + table["qmqpd_authorized_clients"] = "var_qmqpd_clients" + table["qmqpd_timeout"] = "var_qmqpd_timeout" + table["qmqpd_error_delay"] = "var_qmqpd_err_sleep" + table["default_verp_delimiters"] = "var_verp_delims" + table["verp_delimiter_filter"] = "var_verp_filter" + table["disable_verp_bounces"] = "var_verp_bounce_off" + table["smtpd_authorized_verp_clients"] = "var_verp_clients" + table["smtpd_authorized_xclient_hosts"] = "var_xclient_hosts" + table["smtpd_authorized_xforward_hosts"] = "var_xforward_hosts" + table["in_flow_delay"] = "var_in_flow_delay" + table["parent_domain_matches_subdomains"] = "var_par_dom_match" + table["fault_injection_code"] = "var_fault_inj_code" + table["resolve_dequoted_address"] = "var_resolve_dequoted" + table["bounce_service_name"] = "var_bounce_service" + table["cleanup_service_name"] = "var_cleanup_service" + table["defer_service_name"] = "var_defer_service" + table["pickup_service_name"] = "var_pickup_service" + table["queue_service_name"] = "var_queue_service" + table["rewrite_service_name"] = "var_rewrite_service" + table["showq_service_name"] = "var_showq_service" + table["error_service_name"] = "var_error_service" + table["flush_service_name"] = "var_flush_service" + table["address_verify_service_name"] = "var_verify_service" + table["address_verify_map"] = "var_verify_map" + table["address_verify_positive_expire_time"] = "var_verify_pos_exp" + table["address_verify_positive_refresh_time"] = "var_verify_pos_try" + table["address_verify_negative_expire_time"] = "var_verify_neg_exp" + table["address_verify_negative_refresh_time"] = "var_verify_neg_try" + table["address_verify_negative_cache"] = "var_verify_neg_cache" + table["address_verify_sender"] = "var_verify_sender" + table["address_verify_poll_count"] = "var_verify_poll_count" + table["address_verify_poll_delay"] = "var_verify_poll_delay" + table["address_verify_local_transport"] = "var_vrfy_local_xport" + table["address_verify_virtual_transport"] = "var_vrfy_virt_xport" + table["address_verify_relay_transport"] = "var_vrfy_relay_xport" + table["address_verify_default_transport"] = "var_vrfy_def_xport" + table["address_verify_relayhost"] = "var_vrfy_relayhost" + table["address_verify_transport_maps"] = "var_vrfy_xport_maps" + table["trace_service_name"] = "var_trace_service" + table["mailbox_defer_errors"] = "var_mbx_defer_errs" + table["maildir_defer_errors"] = "var_mdr_defer_errs" + table["berkeley_db_create_buffer_size"] = "var_db_create_buf" + table["berkeley_db_read_buffer_size"] = "var_db_read_buf" + table["queue_file_attribute_count_limit"] = "var_qattr_count_limit" + table["mime_nesting_limit"] = "var_mime_maxdepth" + table["mime_boundary_length_limit"] = "var_mime_bound_len" + table["disable_mime_input_processing"] = "var_disable_mime_input" + table["disable_mime_output_conversion"] = "var_disable_mime_oconv" + table["strict_8bitmime"] = "var_strict_8bitmime" + table["strict_7bit_headers"] = "var_strict_7bit_hdrs" + table["strict_8bitmime_body"] = "var_strict_8bit_body" + table["strict_mime_encoding_domain"] = "var_strict_encoding" + table["sender_based_routing"] = "var_sender_routing" + table["transport_null_address_lookup_key"] = "var_xport_null_key" + table["backwards_bounce_logfile_compatibility"] = "var_oldlog_compat" + table["smtpd_proxy_filter"] = "var_smtpd_proxy_filt" + table["smtpd_proxy_ehlo"] = "var_smtpd_proxy_ehlo" + table["smtpd_proxy_timeout"] = "var_smtpd_proxy_tmout" + table["receive_override_options"] = "var_smtpd_input_transp" + table["smtpd_policy_service_timeout"] = "var_smtpd_policy_tmout" + table["smtpd_policy_service_max_idle"] = "var_smtpd_policy_idle" + table["smtpd_policy_service_max_ttl"] = "var_smtpd_policy_ttl" + table["smtpd_client_connection_rate_limit"] = "var_smtpd_crate_limit" + table["smtpd_client_connection_count_limit"] = "var_smtpd_cconn_limit" + table["smtpd_client_connection_limit_exceptions"] = "var_smtpd_hoggers" + table["client_rate_time_unit"] = "var_anvil_time_unit" + table["client_event_status_update_time"] = "var_anvil_stat_time" + table["client_connection_rate_service"] = "var_anvil_service" + +} + +{ if (name = table[$1]) print $1 } + +' | sort -u diff --git a/mantools/docuseparam b/mantools/docuseparam new file mode 100755 index 0000000..5113b5b --- /dev/null +++ b/mantools/docuseparam @@ -0,0 +1,5 @@ +#!/bin/sh + +mantools/docparam "$@" >/tmp/doc +mantools/useparam "$@" >/tmp/use +diff /tmp/doc /tmp/use diff --git a/mantools/double b/mantools/double new file mode 100755 index 0000000..2103969 --- /dev/null +++ b/mantools/double @@ -0,0 +1,10 @@ +#!/bin/sh + +LC_ALL=C +export LC_ALL + +for i in $* +do + echo === $i === + dehtml $i | tr A-Z a-z | double +done diff --git a/mantools/enter b/mantools/enter new file mode 100755 index 0000000..4287c1a --- /dev/null +++ b/mantools/enter @@ -0,0 +1,145 @@ +#!/bin/sh + +# enter - set up project-specific environment + +# @(#) enter.sh 1.5 11/4/89 15:56:03 + +# initialize + +IFS=" +" + +: ${HOME?} ${SHELL=/bin/sh} make sure these are set + +# sanity checks... + +test $# = 1 || { + echo "Usage: ${0} project" 1>&2; exit 1 +} + +test -r ${HOME}/.${1} || { + echo "${0}: can't read environment file: '${HOME}/.${1}'" 1>&2; exit 1 +} + +test -x ${SHELL} || { + echo "${0}: can't execute command shell: '${SHELL}'" 1>&2; exit 1 +} + +# set up default Bourne-shell prompt + +export PS1; PS1="$1%${PS1- }" + +# load environment + +. ${HOME}/.${1} + +# define UPPER and lower-case environment variables with the project name + +_PNAME_=`echo ${1} | case \`echo -n\` in # assume $1 lower case + "") tr a-z A-Z;; # this is for V7, BSD + *) tr '[a-z]' '[A-Z]';; # and this is for SYSV + esac` +eval ${1}=\${${_PNAME_}=\${${1}}} + +eval test "X\${${1}}" != X || { + echo "${0}: ${HOME}/.${1} should set '${1}' or '${_PNAME_}'" 1>&2; exit 1 +} + +export ${1} MANPATH PATH ${_PNAME_} + +# become a new shell + +echo "Entering project '${1}' - leave with 'exit' or 'control-d'" 1>&2 + +exec ${SHELL} + +echo "project ${1} NOT entered" 1>&2; exit 1; + +#++ +# NAME +# enter 1 +# SUMMARY +# set up a project-specific environment +# PROJECT +# sdetools +# SYNOPSIS +# enter project +# exit +# DESCRIPTION +# The \fIenter\fR command sets up an environment that makes +# it easy to access \fIproject\fR-specific programs and files. +# +# \fIenter\fP consults a file with environment information +# ($HOME/.\fIproject\fR, Bourne-shell syntax) and invokes +# a new command shell of the same type as the login shell. +# Typically, project environment files are maintained and +# given out by the project administrator. +# +# In order to leave the project environment use the \fIexit\fP +# command or type a control-d; +# the details may depend on the type of login shell involved. +# +# As a minimum, the environment file should set an environment +# variable with the same name as the \fIproject\fP. The variable +# name can be either be identical to \fIproject\fP or in upper case. +# For consistency, \fIenter\fP will set both variables to the same value. +# EXAMPLE +# .fi +# .ad +# In this example, +# all files pertaining to a project \fIfoobar\fR are located under the +# directory \fI/usr/foo/bar/foobar\fR. For example, there +# are subdirectories +# \fI/usr/foo/bar/foobar/man\fR with manual pages, +# \fI/usr/foo/bar/foobar/bin\fR with executable +# programs, other directories for object libraries and include files, +# and so on. +# +# In order to enter a project \fIfoobar\fR, the command +# .PP +# .ti +5 +# .ft C +# enter foobar +# .ft +# .PP +# consults a file \fI.foobar\fR (in the user\'s home directory) +# with contents: +# .PP +# .ft C +# .nf +# .in +5 +# export FOOBAR; FOOBAR=/usr/foo/bar/foobar +# export PATH; PATH=$PATH:$FOOBAR/bin +# export MANPATH; MANPATH=$MANPATH:$FOOBAR/man +# .ft +# .fi +# .PP +# The second line automatically makes all project-specific +# executable programs accessible. The third line makes it possible +# to use the standard UNIX \fIman\fR command for retrieval of +# project-specific manual pages. The \fIenter\fR command +# makes sure that both the \fIfoobar\fR and \fIFOOBAR\fR +# environment variables are set to the same value. +# COMMANDS +# sh(1), echo(1), test(1), tr(1), login shell +# FILES +# $HOME/.\fIproject\fR +# ENVIRONMENT VARIABLES +# SHELL, login shell +# HOME, login directory +# PATH, search path for commands +# MANPATH, search path for the \fIman\fR command. +# BUGS +# Name clashes may occur if people have entered several projects +# at the same time. This can be avoided by using unique project names, +# which is a good idea anyway. +# AUTHOR(S) +# W.Z. Venema +# Eindhoven University of Technology +# Department of Mathematics and Computer Science +# Den Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands +# CREATION DATE +# Tue Apr 19 15:35:41 MET DST 1988 +# STATUS +# enter.sh 1.5 11/4/89 15:56:03 (draft) +#-- diff --git a/mantools/find-double b/mantools/find-double new file mode 100755 index 0000000..371663e --- /dev/null +++ b/mantools/find-double @@ -0,0 +1,13 @@ +#!/bin/sh + +sed 's/[^A-Z0-9a-z_][^A-Z0-9a-z_]*/ /g' "$@" | awk ' + { for (i = 1; i <= NF; i++) { + if (length($i) > 1 && $(i) == last) { + if (i == 1) + printf("%s ", last) + print + } + last = $(i) + } + } +' diff --git a/mantools/find-fluff b/mantools/find-fluff new file mode 100755 index 0000000..8556f6c --- /dev/null +++ b/mantools/find-fluff @@ -0,0 +1,7 @@ +#!/bin/sh + +for i in $* +do + echo === $i === + grep '

*$' $i +done diff --git a/mantools/fixman b/mantools/fixman new file mode 100755 index 0000000..6c2c6ea --- /dev/null +++ b/mantools/fixman @@ -0,0 +1,257 @@ +#!/usr/bin/perl + +use Getopt::Std; + +# Usage: fixman [-f] postconf.proto filename.c >filename.c.new + +# fixman - fix parameter text in embedded man pages + +# Basic operation: +# +# - Read definitions fron postconf.proto like file +# +# - Read source file with embedded manual page +# +# - Write to stdout the updated source file. +# + +#use Getopt::Std; + +#$opt_h = undef; +#$opt_v = undef; +#getopts("hv"); + +#push @ARGV, "/dev/null"; # XXX + +$opt_f = undef; +$opt_v = undef; +getopts("fv"); + +die "Usage: $0 [-fv] protofile [sourcefile...] +-f: include full parameter description instead of one-line summary +-v: verbose mode\n" + unless $protofile = shift(@ARGV); + +# Save one definition. + +sub save_text +{ + if ($category eq "PARAM") { + $text =~ s/\.\s.*/.\n/s unless $opt_f; + $param_text{$name} = $text; + $defval = "empty" unless $defval ne ""; + $defval_text{$name} = $defval; + if ($opt_v) { + printf "saving entry %s %.20s..\n", $name, $text; + } + } elsif ($category eq "CLASS") { + $class_text{$name} = $text; + if ($opt_v) { + printf "saving class %s %.20s..\n", $name, $text; + } + } else { + die "Unknown category: $category. Need PARAM or CLASS.\n"; + } +} + +# Emit one parameter name and text + +sub emit_text +{ + my ($delim) = @_; + if ($block = $param_text{$name}) { + print "$delim .IP \"\\fB$name ($defval_text{$name})\\fR\"\n"; + $wantpp = 0; + $block =~ s/]*>//g; + $block =~ s/<\/a>//g; + $block =~ s//\\fB/g; + $block =~ s//\\fI/g; + $block =~ s/<\/b>/\\fR/g; + $block =~ s/<\/i>/\\fR/g; + $block =~ s/\n()/\n.sp\n\1/g ; # if ($wantpp); + $block =~ s/^()/.sp\n\1/ ; # if ($wantpp); + $block =~ s/

*/\n/g; + $block =~ s/<\/p>/\n/g; + $block =~ s/

/\n.nf\n.na\n.ft C\n/g;
+	$block =~ s/<\/pre>/\n.fi\n.ad\n.ft R\n/g;
+	$block =~ s/]*>/\n.RS\n/g;
+	$block =~ s/