alsa.audio: use correct name of libasound so file
[AROS.git] / tools / cxref / README_c.tex
blobd5c24ce8930f0a5cf95b709f6940b4b641fddc72
1 % This LaTeX file generated by cxref
2 % cxref program (c) Andrew M. Bishop 1995,96,97,98,99.
4 % Cxref: /home/amb/cxref/cxref -O/home/amb/cxref/doc -NREADME -xref -latex2e -html32-src -rtf -sgml README.c
5 % CPP : /home/amb/cxref/cpp/cxref-cpp -cxref-cpp-defines /home/amb/cxref/cpp/cxref-cpp.defines -C -dD -dI
7 \markboth{File README.c}{File README.c}
8 \section{File README.c}
9 \label{file_README.c}
11 {\bf RCS Header: /home/amb/cxref/RCS/README.c 1.4 1997/05/26 11:23:40 amb Exp }
13 \smallskip
15 A comment for the file, RCS header comments are treated specially when first.
18 \subsection*{Included Files}
20 A \#include comment
22 \smallskip
23 \begin{cxreftabi}
24 {\stt \#include <stdio.h>} &\\
25 \end{cxreftabi}
27 \medskip
28 An alternative \#include comment.
30 \smallskip
31 \begin{cxreftabi}
32 {\stt \#include <math.h>} &\\
33 \end{cxreftabi}
36 \subsection*{Preprocessor definitions}
38 A \#define comment.
40 \smallskip
41 {\stt \#define def1 1}
43 \medskip
44 An alternative \#define comment.
46 \smallskip
47 {\stt \#define def2 2}
49 \medskip
50 A \#define with args
52 \smallskip
53 {\stt \#define def3( arg1, arg2 )}
55 \smallskip
56 \begin{cxrefarglist}
57 \cxrefargitem{arg1} The first arg
58 \cxrefargitem{arg2} The second arg
59 \end{cxrefarglist}
61 \medskip
62 An alternative \#define with args.
64 \smallskip
65 {\stt \#define def4( arg1, arg2 )}
67 \smallskip
68 \begin{cxrefarglist}
69 \cxrefargitem{arg1} The first arg
70 \cxrefargitem{arg2} The second arg
71 \end{cxrefarglist}
74 \subsection{Type definitions}
77 \subsubsection{Typedef type1}
78 \label{type_type1_README.c}
80 An example typedef comment
82 \smallskip
83 {\stt typedef enum \{...\} type1}
85 \smallskip
86 \begin{cxreftabiia}
87 \hspace*{0.0in}{\stt enum} &\\
88 \hspace*{0.1in}{\stt \{} &\\
89 \hspace*{0.2in}{\stt one;} & one value \\
90 \hspace*{0.2in}{\stt two;} & another value \\
91 \hspace*{0.1in}{\stt \}} &\\
92 \end{cxreftabiia}
95 \subsubsection{Type union bar}
96 \label{type_union_bar_README.c}
98 Nested structs and unions also work.
100 \smallskip
101 \smallskip
102 \begin{cxreftabiia}
103 \hspace*{0.0in}{\stt union bar} &\\
104 \hspace*{0.1in}{\stt \{} &\\
105 \hspace*{0.2in}{\stt char a;} & Each element \\
106 \hspace*{0.2in}{\stt int b;} & of a struct \\
107 \hspace*{0.2in}{\stt int c;} & or a union \\
108 \cxreftabbreak{cxreftabiia}
109 \hspace*{0.2in}{\stt long d;} & can have a comment \\
110 \hspace*{0.1in}{\stt \}} &\\
111 \end{cxreftabiia}
114 \subsubsection{Typedef type2}
115 \label{type_type2_README.c}
117 Another example typedef comment, a type that is a struct.
119 \smallskip
120 {\stt typedef struct \{...\} type2}
122 \smallskip
123 \begin{cxreftabiia}
124 \hspace*{0.0in}{\stt struct} &\\
125 \hspace*{0.1in}{\stt \{} &\\
126 \hspace*{0.2in}{\stt int a;} & A variable in a struct. \\
127 \hspace*{0.2in}{\stt union bar} &\\
128 \hspace*{0.3in}{\stt \{} &\\
129 \hspace*{0.4in}{\stt char a;} & Each element \\
130 \cxreftabbreak{cxreftabiia}
131 \hspace*{0.4in}{\stt int b;} & of a struct \\
132 \hspace*{0.4in}{\stt int c;} & or a union \\
133 \hspace*{0.4in}{\stt long d;} & can have a comment \\
134 \hspace*{0.3in}{\stt \}} &\\
135 \hspace*{0.3in}{\stt e;} & Nested structs and unions also work. \\
136 \hspace*{0.1in}{\stt \}} &\\
137 \end{cxreftabiia}
140 \subsubsection{Typedef ptype2}
141 \label{type_ptype2_README.c}
143 Another example typedef comment, a pointer to a struct type.
145 \smallskip
146 {\stt typedef struct \{...\}* ptype2}
148 \smallskip
149 \begin{cxreftabii}
150 See:& Typedef type2 & \cxreftype{type2}{README.c}\\
151 \end{cxreftabii}
154 \subsection{Variables}
157 \subsubsection{Variable var1}
158 \label{var_var1_README.c}
160 A leading comment only.
162 \smallskip
163 {\stt int var1}
165 \smallskip
166 \begin{cxreftabiii}
167 Visible in:\ & README.c & \ & \cxreffile{README.c}\\
168 Used in:\ & function1() & README.c & \cxreffunc{function1}{README.c}\\
169 \end{cxreftabiii}
172 \subsubsection{Variable var2}
173 \label{var_var2_README.c}
175 A leading comment only.
177 \smallskip
178 {\stt int var2}
180 \smallskip
181 \begin{cxreftabiii}
182 Visible in:\ & README.c & \ & \cxreffile{README.c}\\
183 \end{cxreftabiii}
186 \subsubsection{Variable var4}
187 \label{var_var4_README.c}
189 A variable for one thing.
191 \smallskip
192 {\stt int var4}
194 \smallskip
195 \begin{cxreftabiii}
196 Visible in:\ & README.c & \ & \cxreffile{README.c}\\
197 Used in:\ & function1() & README.c & \cxreffunc{function1}{README.c}\\
198 \end{cxreftabiii}
201 \subsubsection{Variable var5}
202 \label{var_var5_README.c}
204 A variable for a second thing.
206 \smallskip
207 {\stt int var5}
209 \smallskip
210 \begin{cxreftabiii}
211 Visible in:\ & README.c & \ & \cxreffile{README.c}\\
212 \end{cxreftabiii}
215 \subsubsection{Variable var6}
216 \label{var_var6_README.c}
218 A variable for a third thing.
220 \smallskip
221 {\stt int var6}
223 \smallskip
224 \begin{cxreftabiii}
225 Visible in:\ & README.c & \ & \cxreffile{README.c}\\
226 \end{cxreftabiii}
229 \subsubsection{Local Variables}
231 {\bf var3}
232 \label{var_var3_README.c}
234 A trailing comment only.
236 \smallskip
237 {\stt static int var3}
239 \smallskip
240 \begin{cxreftabiii}
241 Used in:\ & function1() & \ & \cxreffunc{function1}{README.c}\\
242 \end{cxreftabiii}
245 \subsection{Functions}
248 \subsubsection{Global Function function1()}
249 \label{func_function1_README.c}
251 A function comment (the comments for the args need to be separated by a blank line).
253 \smallskip
254 {\stt int function1 ( int arg1, int arg2 )}
256 \smallskip
257 \begin{cxrefarglist}
258 \cxrefargitem{int function1} The return value.
259 \cxrefargitem{int arg1} The first argument.
260 \cxrefargitem{int arg2} The second argument.
261 \end{cxrefarglist}
263 \smallskip
264 Some more comments
266 This comment is only visible in the \LaTeX output, and can contain \LaTeX markup.
268 An internal comment in a function that appears as a
269 new paragraph at the end of the comment.
271 \smallskip
272 \begin{cxreftabiii}
273 Calls:\ & function2() & README.c & \cxreffunc{function2}{README.c}\\
274 Used in:\ & function2() & README.c & \cxreffunc{function2}{README.c}\\
275 Refs Var:\ & var1 & README.c & \cxrefvar{var1}{README.c}\\
276 \ & var3 & README.c & \cxrefvar{var3}{README.c}\\
277 \cxreftabbreak{cxreftabiii}
278 \ & var4 & README.c & \cxrefvar{var4}{README.c}\\
279 \end{cxreftabiii}
282 \subsubsection{Global Function function2()}
283 \label{func_function2_README.c}
285 An alternative function comment
287 \smallskip
288 {\stt int function2 ( int arg1, int arg2, void )}
290 \smallskip
291 \begin{cxrefarglist}
292 \cxrefargitem{int function2} Returns a value
293 \cxrefargitem{int arg1} The first argument.
294 \cxrefargitem{int arg2} The second argument.
295 \cxrefargitem{void} \
296 \end{cxrefarglist}
298 \smallskip
299 \begin{cxreftabiii}
300 Called by:\ & function1() & README.c & \cxreffunc{function1}{README.c}\\
301 Refs Func:\ & function1() & README.c & \cxreffunc{function1}{README.c}\\
302 \end{cxreftabiii}