1 {+ AutoGen5 template -*- nroff -*-
3 ## agman3.tpl -- Template for command line man pages
5 ## AutoOpts copyright 1992-2002 Bruce Korb
7 ## Time-stamp: "2002-06-10 17:10:34 bkorb"
8 ## Author: Bruce Korb <bkorb@gnu.org>
9 ## Maintainer: Bruce Korb <bkorb@gnu.org>
10 ## Created: Mon Jun 28 15:35:12 1999
12 ## ---------------------------------------------------------------------
13 ## $Id: agman3.tpl,v 2.3 2002/06/11 01:45:31 bkorb Exp $
14 ## ---------------------------------------------------------------------
18 (setenv "SHELL" "/bin/sh")
22 (if (exist? "see-also")
23 (define see-also (string-append (get "see-also") " "))
24 (define see-also "") )
29 (if (not (exist? "private"))
30 (set! see-also (string-append see-also
31 (get "name") "(3) " )) )
34 ENDFOR export_func +}{+
38 IF (not (exist? "private")) +}{+
40 (out-push-new (string-append
43 +}.TH {+name+} 3 {+ `date +%Y-%m-%d` +} "" "Programmer's Manual"
46 ;; The following "dne" argument is a string of 5 characters:
47 ;; '.' '\\' '"' and two spaces. It _is_ hard to read.
57 cc [...] -o outfile infile.c -l{+library+} [...]
60 IF (exist? "header") +}
61 #include "\fI{+header+}\fP"
63 {+ ?% ret-type "%s" void
65 IF (not (exist? "arg")) +}void{+
67 FOR arg ", " +}{+arg-type+} {+arg-name+}{+
75 -e 's;@code{\([^}]*\)};\\fB\1\\fP;g' \
76 -e 's;@var{\([^}]*\)};\\fB\1\\fP;g' \
77 -e 's;@samp{\([^}]*\)};\\fB\1\\fP;g' \
78 -e 's;@file{\([^}]*\)};\\fI\1\\fP;g' \
79 -e 's/@\([{}]\)/\1/g' \
81 -e '/@ *example/,/@ *end *example/s/^/ /' \
82 -e 's/^ *@ *example/.nf/' \
83 -e 's/^ *@ *end *example/.fi/' \
84 -e '/^ *@ *noindent/d' \
85 -e '/^ *@ *enumerate/d' \
86 -e 's/^ *@ *end *enumerate/.br/' \
88 -e 's/^ *@ *end *table/.br/' \
89 -e 's/^@item/.sp 1/' \
90 -e 's/\*\([a-zA-Z0-9=_ -]*\)\*/\\fB\1\\fP/g' \
91 -e 's/``\([a-zA-Z0-9=_ -]*\)'"''"'/\\fI\1\\fP/g' \
92 -e 's/^@\*/.br/' <<'_End_Of_Man_'
96 IF (exist? "ret-type") +}
111 (shell (out-pop #t) ) +}
113 The \fIinfo\fP documentation for the \fI-l{+library+}\fP library.
115 {+(shellf "echo '%s' | \
116 sed 's,%s(3) ,,;s/3) $/3)/;s/(3) /(3), /g'" see-also (get "name"))+}