Install msysDTK-1.0.1
[msysgit.git] / share / autogen / agman3.tpl
blob15e65b5c4e9564deacfc3b7bc2a5ed8fb0fdb988
1 {+ AutoGen5 template  -*- nroff -*-
3 ## agman3.tpl -- Template for command line man pages
4 ##
5 ##  AutoOpts copyright 1992-2002 Bruce Korb
6 ##
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
11 ##              by: bkorb
12 ## ---------------------------------------------------------------------
13 ## $Id: agman3.tpl,v 2.3 2002/06/11 01:45:31 bkorb Exp $
14 ## ---------------------------------------------------------------------
16 null
18 (setenv "SHELL" "/bin/sh")
20 +}{+
22 (if (exist? "see-also")
23     (define see-also (string-append (get "see-also") " "))
24     (define see-also "")  )
26 +}{+
28 FOR export_func     +}{+
29   (if (not (exist? "private"))
30       (set! see-also (string-append see-also
31             (get "name") "(3) " ))  )
32   +}{+
34 ENDFOR export_func  +}{+
37 FOR export_func                +}{+
38   IF (not (exist? "private"))  +}{+
40     (out-push-new (string-append
41          (get "name") ".3" ))
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.
49 (dne ".\\\"  ")
52 .\"
53 .SH NAME
54 {+name+} - {+what+}
55 .sp 1
56 .SH SYNOPSIS
57 cc [...] -o outfile infile.c -l{+library+} [...]
60   IF (exist? "header") +}
61 #include "\fI{+header+}\fP"
62 {+ENDIF+}
63 {+ ?% ret-type "%s" void
64 +} \fB{+name+}\fP({+
65   IF (not (exist? "arg")) +}void{+
66   ELSE  +}{+
67     FOR arg ", " +}{+arg-type+} {+arg-name+}{+
68     ENDFOR arg +}{+
69   ENDIF +});
70 .sp 1
71 .SH DESCRIPTION
73 (out-push-new) +}
74 sed \
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' \
80  -e 's,^\$\*$,.br,' \
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/' \
87  -e '/^ *@ *table/d' \
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_'
94 (get "doc")    +}{+
96   IF (exist? "ret-type") +}
97 .sp 1
98 .SH RETURN VALUE
99 {+ret-desc+}{+
101   ENDIF +}{+
103   IF (exist? "err") +}
104 .sp 1
105 .SH ERRORS
106 {+err+}{+
108   ENDIF +}
109 _End_Of_Man_{+
111 (shell (out-pop #t) ) +}
112 .SH SEE ALSO
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"))+}
119     (out-pop)    +}{+
121   ENDIF private  +}{+
123 ENDFOR  export_func