Workbook: big pile of rendering cleanups
[AROS.git] / tools / cxref / README.c
blobb67cb926ec19c1953bc3d37db0849dcf1120e48f
1 /*****************
2 $Header$
4 A comment for the file, RCS header comments are treated specially when first.
5 *****************/
9 /*+ A #include comment +*/
10 #include <stdio.h>
13 #include <math.h> /*+ An alternative #include comment. +*/
16 /*+ A #define comment. +*/
17 #define def1 1
20 #define def2 2 /*+ An alternative #define comment. +*/
23 /*+++++++++++
24 A #define with args
26 arg1 The first arg
28 arg2 The second arg
29 +++++++++++*/
31 #define def3(arg1,arg2) (arg1+arg2)
34 /*+ An alternative #define with args. +*/
36 #define def4(arg1 /*+ The first arg +*/, \
37 arg2 /*+ The second arg +*/) \
38 (arg1+arg2)
41 /*+ An example typedef comment +*/
42 typedef enum
44 one, /*+ one value +*/
45 two /*+ another value +*/
47 type1;
50 /*+ Another example typedef comment, +*/
51 typedef struct
53 int a; /*+ A variable in a struct. +*/
54 union bar
56 char a; /*+ Each element +*/
57 int b, /*+ of a struct +*/
58 c; /*+ or a union +*/
59 long d; /*+ can have a comment +*/
61 e; /*+ Nested structs and unions also work. +*/
63 type2, /*+ a type that is a struct. +*/
64 *ptype2; /*+ a pointer to a struct type. +*/
67 /*+ A leading comment only. +*/
68 int var1,var2;
71 static int var3; /*+ A trailing comment only. +*/
74 /*+ A variable for +*/
75 int var4, /*+ one thing. +*/
76 var5, /*+ a second thing. +*/
77 var6; /*+ a third thing. +*/
79 /* Note: The leading comment is combined with each of the trailing comments. */
80 /* Note: the push through of the comment above on the ',' and ';', see README. */
83 /*+++++++++++
84 A function comment (the comments for the args need to be separated by a blank line).
86 int function1 The return value.
88 int arg1 The first argument.
90 int arg2 The second argument.
92 Some more comments
94 +none+ Note: this line and the two below are processed specially.
95 +html+ This comment is only visible in the HTML output, and can contain HTML markup.
96 +latex+ This comment is only visible in the \LaTeX output, and can contain \LaTeX markup.
97 +++++++++++*/
99 int function1(int arg1,int arg2)
101 /*+ An internal comment in a function that appears as a
102 new paragraph at the end of the comment. +*/
104 var1=0;
106 function2(var3,var4);
110 /*+ An alternative function comment +*/
112 int function2(int arg1, /*+ The first argument. +*/
113 int arg2) /*+ The second argument. +*/
114 /*+ Returns a value +*/
116 int (*funcp)()=&function1;
119 /* Note: the push through of the comment above on the ',' and ')', see README. */