Sender: itm AT delorie DOT com Message-ID: <34588079.3C79AA54@dera.gov.uk> Date: Thu, 30 Oct 1997 12:41:29 +0000 From: Ian Miller Organization: DERA MIME-Version: 1.0 To: DJGPP workers CC: Vik Heyndrickx Subject: Re: Style Sheet Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Allow me to suggest the following as a style sheet. It's mainly a cut down version of Vik Heyndrickx' original. (I don't like people telling me how to program. IMHO a "style sheet" should stick to code layout. No offence intended, by the way :) - Indentation Use the style (apparently) favoured by DJ Delorie: if (expr) { stat1; } else { stat2; } Not-nested function definitions and declarations start at the most left hand position. Preprocessor directive lines start at the most left hand position. There is no whitespace after the `#' of a preprocessor directive. Put #include <...> lines before #include "..." lines. - Variable names: Avoid polluting the ANSI and POSIX namespaces. Example of bad practice? - Compilation: Make sure your code compiles without warnings when you use the -Wall switch and everyone will love you. - File names: Stick to 8+3 filenames. DJGPP has to compile on vanilla MS-DOS. Regards, Ian -- Ian Miller, Dorset, UK -- The views expressed above are entirely those of the writer and do not represent the views, policy, or understanding of any other person or official body.