(This includes three local patches marked UMR-ONLY, I just haven't edited them out for this.)
Would appreciate hearing any comments on how this has been done... Documentation change for README.DEVEL is in afsdoc.diff. I'd also be interested in hearing if anyone has any trouble compiling with this patch applied. I've tested on sun4x_56, and i386_linux24. -- Nathan ------------------------------------------------------------ Nathan Neulinger EMail: [EMAIL PROTECTED] University of Missouri - Rolla Phone: (573) 341-4841 Computing Services Fax: (573) 341-4216
Index: README.DEVEL
===================================================================
RCS file: /cvs/openafs/README.DEVEL,v
retrieving revision 1.2
diff -u -r1.2 README.DEVEL
--- README.DEVEL 2002/01/02 04:12:20 1.2
+++ README.DEVEL 2002/02/14 17:52:42
@@ -16,3 +16,51 @@
Try to test builds using gmake -j # MAKE="gmake -j #", it seems like a good
way to find missing or order-dependent dependency rules. (Is there a better
way to do this?)
+
+-- Prototyping and Style --
+Prototypes for all source files in a given dir DDD should be placed
+int the file DDD/DDD_prototypes.h. All externally used (either API
+or used by other source files) routines and variables should be
+prototyped in this file.
+
+The prototypes should be a full prototype, with argument and return
+types. (Should not generate a warning with gcc -Wstrict-prototypes.)
+
+Format of the prototype files should look like:
+
+ Standard Copyright Notice
+
+ #ifdef AFS_SRC_DDD_PROTO_H
+ #define AFS_SRC_DDD_PROTO_H
+
+ /* filename.c */
+ prototypes
+
+ /* filename.c */
+ prototypes
+
+ #endif /* AFS_SRC_DDD_PROTO_H */
+
+The declaration of the routines should be done in ANSI style: (can we
+do this safely on all platforms? might want to use ansi2knr if not)
+
+ rettype routine(argtype arg)
+ {
+
+ }
+
+All routines should have a return type specified, void if nothing returned,
+and should have (void) if no arguments are taken. (still checking on this
+to make sure it works everywhere)
+
+Header files should not contain macros or other definitions unless they
+are used across multiple source files.
+
+All routines should be declared static if they are not used outside that
+source file.
+
+Compiles on gcc-using machines should strive to handle using
+-Wstrict-prototypes -Werror. (this may take a while)
+
+Routines shall be defined in source prior to use if possible, and
+prototyped in block at top of file if static.
afs.diff.bz2
Description: Binary data
