File: README.c.src.html

package info (click to toggle)
cxref 1.5c-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,504 kB
  • ctags: 1,359
  • sloc: ansic: 16,721; yacc: 1,930; sh: 722; lex: 416; makefile: 345; lisp: 256; python: 80; perl: 78
file content (142 lines) | stat: -rw-r--r-- 6,386 bytes parent folder | download
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
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

<!-- This HTML file generated by cxref. -->
<!-- cxref program (c) Andrew M. Bishop 1995,96,97,98,99. -->

<!--
Cxref: /home/amb/cxref/cxref -O/home/amb/cxref/doc -NREADME -xref -latex2e -html32-src -rtf -sgml README.c
CPP  : gcc -E -C -dD -dI
-->

<HTML>

<HEAD>
<TITLE>Source File README.c</TITLE>
</HEAD>

<BODY>

<pre>
<a name="line1">1    |</a> /*****************
<a name="line2">2    |</a>   $Header: /home/amb/cxref/RCS/README.c 1.4 1997/05/26 11:23:40 amb Exp $
<a name="line3">3    |</a> 
<a name="line4">4    |</a>   A comment for the file, RCS header comments are treated specially when first.
<a name="line5">5    |</a>   *****************/
<a name="line6">6    |</a> 
<a name="line7">7    |</a> 
<a name="line8">8    |</a> 
<a name="line9">9    |</a> /*+ A #include comment +*/
<a name="line10">10   |</a> #include &lt;stdio.h&gt;
<a name="line11">11   |</a> 
<a name="line12">12   |</a> 
<a name="line13">13   |</a> #include &lt;math.h&gt;  /*+ An alternative #include comment. +*/
<a name="line14">14   |</a> 
<a name="line15">15   |</a> 
<a name="line16">16   |</a> /*+ A #define comment. +*/
<a name="line17">17   |</a> #define def1 1
<a name="line18">18   |</a> 
<a name="line19">19   |</a> 
<a name="line20">20   |</a> #define def2 2  /*+ An alternative #define comment. +*/
<a name="line21">21   |</a> 
<a name="line22">22   |</a> 
<a name="line23">23   |</a> /*+++++++++++
<a name="line24">24   |</a>   A #define with args
<a name="line25">25   |</a> 
<a name="line26">26   |</a>   arg1 The first arg
<a name="line27">27   |</a> 
<a name="line28">28   |</a>   arg2 The second arg
<a name="line29">29   |</a>   +++++++++++*/
<a name="line30">30   |</a> 
<a name="line31">31   |</a> #define def3(arg1,arg2) (arg1+arg2)
<a name="line32">32   |</a> 
<a name="line33">33   |</a> 
<a name="line34">34   |</a> /*+ An alternative #define with args. +*/
<a name="line35">35   |</a> 
<a name="line36">36   |</a> #define def4(arg1 /*+ The first arg  +*/, \
<a name="line37">37   |</a>              arg2 /*+ The second arg +*/) \
<a name="line38">38   |</a>            (arg1+arg2)
<a name="line39">39   |</a> 
<a name="line40">40   |</a> 
<a name="line41">41   |</a> /*+ An example typedef comment +*/
<a name="line42">42   |</a> typedef enum
<a name="line43">43   |</a> {
<a name="line44">44   |</a>  one,            /*+ one value +*/
<a name="line45">45   |</a>  two             /*+ another value +*/
<a name="line46">46   |</a> }
<a name="line47">47   |</a> type1;
<a name="line48">48   |</a> 
<a name="line49">49   |</a> 
<a name="line50">50   |</a> /*+ Another example typedef comment, +*/
<a name="line51">51   |</a> typedef struct
<a name="line52">52   |</a> {
<a name="line53">53   |</a>  int a;         /*+ A variable in a struct. +*/
<a name="line54">54   |</a>  union bar
<a name="line55">55   |</a>   {
<a name="line56">56   |</a>    char a;      /*+ Each element +*/
<a name="line57">57   |</a>    int  b,      /*+ of a struct +*/
<a name="line58">58   |</a>         c;      /*+ or a union +*/
<a name="line59">59   |</a>    long d;      /*+ can have a comment +*/
<a name="line60">60   |</a>   }
<a name="line61">61   |</a>  e;             /*+ Nested structs and unions also work. +*/
<a name="line62">62   |</a> }
<a name="line63">63   |</a> type2,          /*+ a type that is a struct. +*/
<a name="line64">64   |</a> *ptype2;        /*+ a pointer to a struct type. +*/
<a name="line65">65   |</a> 
<a name="line66">66   |</a> 
<a name="line67">67   |</a> /*+ A leading comment only. +*/
<a name="line68">68   |</a> int var1,var2;
<a name="line69">69   |</a> 
<a name="line70">70   |</a> 
<a name="line71">71   |</a> static int var3; /*+ A trailing comment only. +*/
<a name="line72">72   |</a> 
<a name="line73">73   |</a> 
<a name="line74">74   |</a> /*+ A variable for +*/
<a name="line75">75   |</a> int var4,    /*+ one thing. +*/
<a name="line76">76   |</a>     var5,    /*+ a second thing. +*/
<a name="line77">77   |</a>     var6;    /*+ a third thing. +*/
<a name="line78">78   |</a> 
<a name="line79">79   |</a> /* Note: The leading comment is combined with each of the trailing comments. */
<a name="line80">80   |</a> /* Note: the push through of the comment above on the ',' and ';', see README. */
<a name="line81">81   |</a> 
<a name="line82">82   |</a> 
<a name="line83">83   |</a> /*+++++++++++
<a name="line84">84   |</a>   A function comment (the comments for the args need to be separated by a blank line).
<a name="line85">85   |</a> 
<a name="line86">86   |</a>   int function1 The return value.
<a name="line87">87   |</a> 
<a name="line88">88   |</a>   int arg1 The first argument.
<a name="line89">89   |</a> 
<a name="line90">90   |</a>   int arg2 The second argument.
<a name="line91">91   |</a> 
<a name="line92">92   |</a>   Some more comments
<a name="line93">93   |</a> 
<a name="line94">94   |</a>   +none+  Note: this line and the two below are processed specially.
<a name="line95">95   |</a>   +html+  This comment is only visible in the HTML output, and can contain HTML markup.
<a name="line96">96   |</a>   +latex+ This comment is only visible in the \LaTeX output, and can contain \LaTeX markup.
<a name="line97">97   |</a>   +++++++++++*/
<a name="line98">98   |</a> 
<a name="line99">99   |</a> int function1(int arg1,int arg2)
<a name="line100">100  |</a> {
<a name="line101">101  |</a>  /*+ An internal comment in a function that appears as a
<a name="line102">102  |</a>    new paragraph at the end of the comment. +*/
<a name="line103">103  |</a> 
<a name="line104">104  |</a>  var1=0;
<a name="line105">105  |</a> 
<a name="line106">106  |</a>  function2(var3,var4);
<a name="line107">107  |</a> }
<a name="line108">108  |</a> 
<a name="line109">109  |</a> 
<a name="line110">110  |</a> /*+ An alternative function comment +*/
<a name="line111">111  |</a> 
<a name="line112">112  |</a> int function2(int arg1,  /*+ The first argument.  +*/
<a name="line113">113  |</a>               int arg2)  /*+ The second argument. +*/
<a name="line114">114  |</a> /*+ Returns a value +*/
<a name="line115">115  |</a> {
<a name="line116">116  |</a>  int (*funcp)()=&amp;function1;
<a name="line117">117  |</a> }
<a name="line118">118  |</a> 
<a name="line119">119  |</a> /* Note: the push through of the comment above on the ',' and ')', see README. */
</pre>

</BODY>
</HTML>