[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The GNU Coding Standards were written by Richard Stallman and other GNU Project volunteers. Their purpose is to make the GNU system clean, consistent, and easy to install. This document can also be read as a guide to writing portable, robust and reliable programs. It focuses on programs written in C, but many of the rules and principles are useful even if you write in another programming language. The rules often state reasons for writing in a certain way.
This release of the GNU Coding Standards was last updated February 20, 2004.
If you did not obtain this file directly from the GNU project and recently, please check for a newer version. You can get the GNU Coding Standards from the GNU World Wide Web server host in several different formats: http://www.gnu.org/prep/standards.text, http://www.gnu.org/prep/standards.info, and http://www.gnu.org/prep/standards.dvi, as well as the Texinfo "source" which is divided in two files: http://www.gnu.org/prep/standards.texi and http://www.gnu.org/prep/make-stds.texi. The GNU Coding Standards are also available in HTML format starting at http://www.gnu.org/prep/standards_toc.html.
Corrections or suggestions for this document should be sent to bug-standards@gnu.org. If you make a suggestion, please include a suggested new wording for it; our time is limited. We prefer a context diff to the `standards.texi' or `make-stds.texi' files, but if you don't have those files, please mail your suggestion anyway.
These standards cover the minimum of what is important when writing a GNU package. Likely, the needs for additional standards will come up. Sometimes, you might suggest that such standards be added to this document. If you think your standards would be generally useful, please do suggest them.
You should also set standards for your package on many questions not addressed or not firmly specified here. The most important point is to be self-consistent--try to stick to the conventions you pick, and try to document them as much as possible. That way, your program will be more maintainable by others.
The GNU Hello program serves as an example of how to follow the GNU coding standards for a trivial program which prints `Hello, world!'. http://www.gnu.org/software/hello/hello.html.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |