Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > 37e222326095a93978d54b1564dd9954 > files > 152

apcupsd-3.10.5-1mdk.ppc.rpm

Okay let's start to put something on paper.

I prefer:

type function(type arg1, type arg2,...) {
}

because is more readable to me.

Local and global variable are all lowercase and with a meaningful name.
Functions and globans not exported to other modules are `static'.
Function names are meaningful.
Indentation is (pick one):
	a) a TAB
	b) 4 chars
	c) 3 chars

Data structures are all in apc_struct.h
Defines are all uppercase and with meaningful name.
Defines are all in apc_defines.h
Externs are all in apc_externs.h
Flow control is indented like the function example above.
Comments are not only welcome: piece of code that may resemble like black
magic _must_ be well commented.
Diffs are to be submitted as `diff -u -r --new-file <old-tree> <new-tree>'
Configure is your friend: learn how to add modules to Makefile.in and tests to
configure.in
Try to keep logical position of files: docs in doc/, config files in etc/,
include files in include/ sources in ./, distribution specific files in
distributions/<whatever>.

Nothing more come to my mind right now.

- RF