1{+ AutoGen5 template  -*- nroff -*-
2
3texi
4
5## aginfo3.tpl -- Template for function texi doc
6##
7## Author:          Bruce Korb <bkorb@gnu.org>
8##
9##  This file is part of AutoOpts, a companion to AutoGen.
10##  AutoOpts is free software.
11##  AutoOpts is Copyright (C) 1992-2018 by Bruce Korb - all rights reserved
12##
13##  AutoOpts is available under any one of two licenses.  The license
14##  in use must be one of these two and the choice is under the control
15##  of the user of the license.
16##
17##   The GNU Lesser General Public License, version 3 or later
18##      See the files "COPYING.lgplv3" and "COPYING.gplv3"
19##
20##   The Modified Berkeley Software Distribution License
21##      See the file "COPYING.mbsd"
22##
23##  These files have the following sha256 sums:
24##
25##  8584710e9b04216a394078dc156b781d0b47e1729104d666658aecef8ee32e95  COPYING.gplv3
26##  4379e7444a0e2ce2b12dd6f5a52a27a4d02d39d247901d3285c88cf0d37f477b  COPYING.lgplv3
27##  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
28
29+}{+
30
31(out-push-new (sprintf "%s.menu" (base-name)))
32(define lib-name (get "library"))
33(if (< (string-length lib-name) 1)
34    (set! lib-name (base-name)) )
35(define node-name (sprintf "lib%s procedures" lib-name))
36(define sec-name  (sprintf "lib%s External Procedures" lib-name))
37
38(define doc-level (getenv "LEVEL"))
39(if (not (string? doc-level))
40    (set! doc-level "section"))
41(sprintf "* %-28s %s\n" (string-append node-name "::") sec-name)  +}{+
42(out-pop)
43+}@node {+ (. node-name) +}
44@{+ (. doc-level) +} {+ (. sec-name) +}
45
46{+
47
48IF (not (exist? "lib-description"))
49
50+}These are the publicly exported procedures from the lib@i{{+(. lib-name)+}}
51library.  Any other functions mentioned in the @i{header} file are
52for the private use of the library.{+
53
54ELSE  +}{+  lib-description +}{+
55ENDIF +}
56
57@menu{+
58
59FOR export-func               +}{+
60  IF (not (exist? "private")) +}
61* lib{+(sprintf "%-24s" (string-append
62       lib-name "-" (get "name") "::"))
63    +} {+name      +}{+
64
65  ENDIF private    +}{+
66
67ENDFOR export-func +}
68@end menu
69
70This {+(. doc-level)+} was automatically generated by AutoGen
71using extracted information and the {+(tpl-file)+} template.{+
72
73FOR export-func                +}{+
74  IF (not (exist? "private"))
75
76+}
77
78@node lib{+library+}-{+name+}
79@{+CASE (. doc-level)+}{+
80   = chapter    +}{+
81   = section    +}sub{+
82   = subsection +}subsub{+
83   ESAC +}section {+name+}
84@findex {+name+}
85
86{+what+}
87
88@noindent
89Usage:
90@example
91{+ % ret-type "%s res = "
92+}{+name+}({+
93  IF (exist? "arg") +} {+
94    FOR arg ", " +}{+arg-name+}{+
95    ENDFOR +} {+
96  ENDIF +});
97@end example{+
98  IF (or (exist? "arg") (exist? "ret-type")) +}
99@noindent
100Where the arguments are:
101@multitable @columnfractions .05 .15 .20 .55
102@item @tab Name @tab Type @tab Description
103@item @tab ----- @tab ----- @tab -------------{+
104    FOR arg "\n" +}
105@item @tab {+arg-name+} @tab @code{{+arg-type+}}
106@tab {+arg-desc+}{+
107    ENDFOR+}{+
108    IF (exist? "ret-type") +}
109@item @tab returns @tab {+ret-type+}
110@tab {+ ret-desc +}{+
111
112    ENDIF +}
113@end multitable{+
114
115  ENDIF
116+}
117
118{+doc+}
119{+ % err "\n%s\n" +}{+
120
121  ENDIF private  +}{+
122
123ENDFOR  export-func
124
125
126+}
127