diff options
author | grog <grog@FreeBSD.org> | 2001-09-05 00:46:51 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 2001-09-05 00:46:51 +0000 |
commit | 3f5e413d6b206d7f91aa6060214be1042492bd6a (patch) | |
tree | 3dd331dd29ee8c9619726b405699d4d8597b0cdb /share | |
parent | e9b73edf31a55a2b0bd50a85249525c3464ce225 (diff) | |
download | FreeBSD-src-3f5e413d6b206d7f91aa6060214be1042492bd6a.zip FreeBSD-src-3f5e413d6b206d7f91aa6060214be1042492bd6a.tar.gz |
Correct (English language) style. No change in (C language) style.
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/style.9 | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index fcb23c6..f8b1335 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -58,12 +58,12 @@ After any copyright header, there is a blank line, and the for source files. Version control system ID tags should only exist once in a file (unlike this one). -Non-C/C++ source files follow the above example, while C/C++ source files -follow the below one. +Non-C/C++ source files follow the example above, while C/C++ source files +follow the one below. All VCS (version control system) revision identification from files obtained -from elsewhere should be maintained, including if there are multiple IDs +from elsewhere should be maintained, including, where applicable, multiple IDs showing a file's history. -In general, keep the IDs in tact, including any `$'s. +In general, keep the IDs intact, including any `$'s. Most .No non- Ns Fx VCS IDs should be indented by a tab if in a comment. @@ -77,17 +77,17 @@ static const char rcsid[] = #endif /* not lint */ .Ed .Pp -Followed by another blank line. +Leave another blank line before the header files. .Pp -Kernel include files (i.e. sys/*.h) come first; normally, you'll need +Kernel include files (i.e. sys/*.h) come first; normally, include <sys/types.h> -OR <sys/param.h>, but not both! <sys/types.h> includes <sys/cdefs.h>, +OR <sys/param.h>, but not both. <sys/types.h> includes <sys/cdefs.h>, and it's okay to depend on that. .Bd -literal #include <sys/types.h> /* Non-local includes in angle brackets. */ .Ed .Pp -If it's a network program, put the network include files next. +For a network program, put the network include files next. .Bd -literal #include <net/if.h> #include <net/if_dl.h> @@ -96,8 +96,8 @@ If it's a network program, put the network include files next. #include <protocols/rwhod.h> .Ed .Pp -Then there's a blank line, followed by the /usr include files. -The /usr include files should be sorted! +Leave a blank line before the next group, the /usr include files, +which should be sorted alphabetically by name. .Bd -literal #include <stdio.h> .Ed @@ -108,7 +108,7 @@ to the program go in pathnames.h in the local directory. #include <paths.h> .Ed .Pp -Then, there's a blank line, and the user include files. +Leave another blank line before the user include files. .Bd -literal #include "pathnames.h" /* Local includes in double quotes. */ .Ed @@ -416,7 +416,7 @@ If a line overflows reuse the type keyword. .Pp Be careful to not obfuscate the code by initializing variables in the declarations. Use this feature only thoughtfully. -DO NOT use function calls in initializers! +DO NOT use function calls in initializers. .Bd -literal struct foo one, *two; double three; @@ -469,7 +469,7 @@ Use .Xr err 3 or .Xr warn 3 , -don't roll your own! +don't roll your own. .Bd -literal if ((four = malloc(sizeof(struct foo))) == NULL) err(1, (char *)NULL); |