Skip to content

Commit 54db608

Browse files
committed
Add more information on how to use the cstyle script.
1 parent f6ac6b9 commit 54db608

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

docs/cstyle.html

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,22 @@
3232
will be judged by other people by the way your source code looks.
3333
Always try to write beautiful code.
3434

35-
</p><p>There are a few possible good C styles. We recommend one that is
36-
well documented and comes with a Perl script for checking. The script
37-
does not catch everything but is pretty good.
35+
</p><p>There are a few possible good C styles. We recommend one that is well
36+
documented and comes with a Perl script for checking. The script does not catch
37+
everything but is good enough. However, in order to use it propertly, <b>you
38+
need to start with following the C style after reading the document below, then
39+
check the resulting code with the script.</b> It will not work well if you
40+
start with non-conforming code and keep fixing the warnings until the script no
41+
longer reports anything. In that case, the resulting code may still be pretty
42+
bad style-wise.
3843

3944
</p><p>The <b>recommended C style is used for the Oracle Solaris operating
40-
system source code</b> and is explained in a short (~20 pages) nicely
41-
formatted document: <a href="http://mff.devnull.cz/cstyle/cstyle.ms.pdf">C Style and Coding
42-
Standards for SunOS</a>.
45+
system source code</b> and is explained in a short (~20 pages) nicely formatted
46+
document: <a href="http://mff.devnull.cz/cstyle/cstyle.ms.pdf">C Style and
47+
Coding Standards for SunOS</a>.
4348

44-
</p><p>The <a href="http://mff.devnull.cz/cstyle/cstyle.pl">cstyle.pl</a> for verification is provided,
45-
and it works like this:
49+
</p><p>The <a href="http://mff.devnull.cz/cstyle/cstyle.pl">cstyle.pl</a> for
50+
verification is provided, and it works like this:
4651

4752
</p><pre>$ chmod u+x cstyle.pl
4853
$ ./cstyle.pl src/exams/parallel-udp/*.c

0 commit comments

Comments
 (0)