I read someone mention 'man style' the other day and I'm glad I did. It's not a standard of any kind but it helped me understand OpenBSD source better. Seems like a lot of it conforms to most of these rules if not all.
Justin Mayes Infrastructure Solution Architect Career Education Corporation Office: 847.783.8150 x38150 | jma...@careered.com -----Original Message----- From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On Behalf Of Gleydson Soares Sent: Tuesday, November 27, 2012 8:54 PM To: Philip Guenther Cc: Tito Mari Francis Escaño; misc@openbsd.org Subject: Re: Recommended ANSI C language coding standard compliance checker +1. On Wed, Nov 28, 2012 at 12:46 AM, Philip Guenther <guent...@gmail.com> wrote: > On Mon, Nov 26, 2012 at 8:10 PM, Tito Mari Francis Escaño > <titomarifran...@gmail.com> wrote: >> I'm trying to re-learn ANSI C as part of the effort to write a book >> for beginners or intermediate level. I'm thinking of including the >> use of ANSI C code compliance checker, similar to PHP CodeSniffer, >> that detects whether a given C program file complies with a coding >> standard. Can you please give me pointers what tools OpenBSD >> developers use for this purpose? I understand that indent is used to >> format a given program file, but how about detecting whether a given file is coding standard compliant? > > The only tool *this* OpenBSD developer uses for checking *coding > standard* compliance is his brain. For KNF stuff (c.f. style(9)) you > just read enough of it and the stuff that's wrong starts to stick out. > But really, that's just the bottom level: syntax is important only > because it can obscure the semantics. It's like when reading a book: > the font it was printed in doesn't matter unless it distracts you from > the *words*. > > What's important in coding style are things like clarity, portability, > and efficiency. While a few aspects of portability can be checked > mechanically, those mostly have to be checked *and balanced* by a > brain. > > > I recommend the book "The Practice of Programming", by Brian W. > Kernighan and Rob Pike, for those interested in these sorts of > considerations. > > > Philip Guenther [demime 1.01d removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]