blob: 9f87b37612ce7ecf13761c5ebda3f99771a6f6f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
.ds ST \\fB@PACKAGE_NAME@\\fP
.
.
.TH "tedoc.tes" 1 \
"@DATE@" \
"@PACKAGE_NAME@ Version @PACKAGE_VERSION@"
.
.
.SCITECO_TOPIC tedoc tedoc.tes
.SH NAME
tedoc \-\-
Source code documentation tool for \*(ST
.
.
.SH SYNOPSIS
.
.SY tedoc.tes
.OP "-C"
.OP "--"
.I output
.I template
.I sources...
.YS
.
.
.SH DESCRIPTION
.
.
\fBtedoc\fP is a tool for extracting documentation from \*(ST macros
and C/C++ code.
It is used to document \*(ST's internal commands as well as macro
packages.
.SCITECO_TOPIC .TEDOC
It processes special \*(ST comment blocks from the \fIsources\fP,
generating \fBtroff\fP man-page markup and inserts them into
a man-page \fItemplate\fP at the position of the \fBTEDOC\fP
pseudo-request.
The result is written to an \fIoutput\fP file.
\fBtedoc\fP can thus be understood as a \fBtroff\fP preprocessor.
.
.SH OPTIONS
.
.IP "\fB-C\fP"
Instruct \fBtedoc\fP to extract C/C++ comments instead of
\*(ST comments.
The C comments begin with \(lq/*$\(rq and end with \(lq*/\(rq.
The \*(ST comments in contrast begin with \(lq!*$\(rq and end
with \(lq*!\(rq.
.IP "\fIoutput\fP"
The resulting man-page file.
.IP "\fItemplate\fP"
A man-page template, i.e. a man-page with the \fBTEDOC\fP
request.
.IP "\fIsources...\fP"
An arbitrary number of source code files to scan through.
The comments are extracted in document order, i.e. from the
first comment in the first source file to the last comment
in the last source file specified.
.
.
.SH TEDOC COMMENTS
.\" FIXME: !*$ cannot be indexed since it terminates the
.\" header comment in *.woman.tec files.
.SCITECO_TOPIC "/*$"
.
The \fBtedoc\fP source code comments support a small but powerful
semantic markup for documenting \*(ST commands and macros:
.IP \(bu 4
Comments start with \(lq!*$\(rq (or \(lq/*$\(rq in C/C++ mode).
.IP \(bu
The first line (immediately after the starting comment) may
contain \fItopic\fP keywords for \*(ST's online help system that
will point to the beginning of the section generated for this
\fBtedoc\fP comment.
This generates \fBSCITECO_TOPIC\fP macro calls defined
in \fBsciteco.tmac\fP (see \fBgrosciteco.tes\fP(1).
.IP \(bu
All lines until first empty line are syntax descriptions.
.IP \(bu
Text followed by \(lq--\(rq is a short description.
.IP \(bu
Variable values and characters of syntactic significance should be
detected automatically.
.IP \(bu
Alternatives are denoted by \(lq|\(rq.
.IP \(bu
Every line is an alternative (e.g. different calling forms of the
same command or macro).
.IP \(bu
Return values may be specified after \(lq->\(rq.
.IP \(bu
The remaining text is the verbose command description.
.RS
. IP \(bu
\(lq<name>\(rq denotes a variable from the syntax description.
. IP \(bu
Empty lines introduce paragraphs.
. IP \(bu
Lines beginning with \(lq-\(rq are unordered lists.
. IP \(bu
Lines beginning with numbers and dot (\(lq1.\(rq, \(lq2.\(rq, etc.) are
ordered lists.
. IP \(bu
These transformations are only preprocessing, so that
\fBtroff\fP requests, macros and escapes may also be used freely.
.RE
.
.
.SH SEE ALSO
.
.TP
\*(ST invocation and help on its environment variables:
.BR sciteco (1)
.TP
A \fBGNU roff\fP post-processor for rendering \fBtroff\fP
markup into \(lqwomanpages\(rq for \*(ST's online help system
\(em also documents special \fBtroff\fP macros in \fBsciteco.tmac\fP:
.BR grosciteco.tes (1)
.TP
The \fBGNU roff\fP \(lqman\(rq macros for writing man pages:
.BR groff_man (7)
.
.
.SH AUTHOR
.
This manpage and the \*(ST program was written by
.MT robin.haberkorn@googlemail.com
Robin Haberkorn
.ME .
\# EOF
|