Deleted Added
full compact
style.9 (87858) style.9 (88545)
1.\" Copyright (c) 1995-2001 FreeBSD Inc.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 29 unchanged lines hidden (view full) ---

38Be careful to check the examples before assuming that
39.Nm
40is silent on an issue.
41.Bd -literal
42/*
43 * Style guide for FreeBSD. Based on the CSRG's KNF (Kernel Normal Form).
44 *
45 * @(#)style 1.14 (Berkeley) 4/28/95
1.\" Copyright (c) 1995-2001 FreeBSD Inc.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 29 unchanged lines hidden (view full) ---

38Be careful to check the examples before assuming that
39.Nm
40is silent on an issue.
41.Bd -literal
42/*
43 * Style guide for FreeBSD. Based on the CSRG's KNF (Kernel Normal Form).
44 *
45 * @(#)style 1.14 (Berkeley) 4/28/95
46 * $FreeBSD: head/share/man/man9/style.9 87858 2001-12-14 09:22:34Z ru $
46 * $FreeBSD: head/share/man/man9/style.9 88545 2001-12-27 20:05:47Z alfred $
47 */
48
49/*
50 * VERY important single-line comments look like this.
51 */
52
53/* Most single-line comments look like this. */
54

--- 19 unchanged lines hidden (view full) ---

74.Qq Li "From"
75in front of foreign VCS IDs.
76Most
77.No non- Ns Fx
78VCS IDs should be indented by a tab if in a comment.
79.Bd -literal
80#include <sys/cdefs.h>
81__RCSID("@(#)style 1.14 (Berkeley) 4/28/95");
47 */
48
49/*
50 * VERY important single-line comments look like this.
51 */
52
53/* Most single-line comments look like this. */
54

--- 19 unchanged lines hidden (view full) ---

74.Qq Li "From"
75in front of foreign VCS IDs.
76Most
77.No non- Ns Fx
78VCS IDs should be indented by a tab if in a comment.
79.Bd -literal
80#include <sys/cdefs.h>
81__RCSID("@(#)style 1.14 (Berkeley) 4/28/95");
82__FBSDID("$FreeBSD: head/share/man/man9/style.9 87858 2001-12-14 09:22:34Z ru $");
82__FBSDID("$FreeBSD: head/share/man/man9/style.9 88545 2001-12-27 20:05:47Z alfred $");
83.Ed
84.Pp
85Leave another blank line before the header files.
86.Pp
87Kernel include files (i.e.\&
88.Pa sys/*.h )
89come first; normally, include
90.Aq Pa sys/types.h

--- 387 unchanged lines hidden (view full) ---

478 * Avoid obvious comments such as
479 * "Exit 0 on success."
480 */
481}
482.Ed
483.Pp
484The function type should be on a line by itself
485preceding the function.
83.Ed
84.Pp
85Leave another blank line before the header files.
86.Pp
87Kernel include files (i.e.\&
88.Pa sys/*.h )
89come first; normally, include
90.Aq Pa sys/types.h

--- 387 unchanged lines hidden (view full) ---

478 * Avoid obvious comments such as
479 * "Exit 0 on success."
480 */
481}
482.Ed
483.Pp
484The function type should be on a line by itself
485preceding the function.
486The opening brace of the function body should be
487on a line by itself.
486.Bd -literal
487static char *
488function(int a1, int a2, float fl, int a4)
489{
490.Ed
491.Pp
492When declaring variables in functions declare them sorted by size,
493then in alphabetical order; multiple ones per line are okay.

--- 221 unchanged lines hidden ---
488.Bd -literal
489static char *
490function(int a1, int a2, float fl, int a4)
491{
492.Ed
493.Pp
494When declaring variables in functions declare them sorted by size,
495then in alphabetical order; multiple ones per line are okay.

--- 221 unchanged lines hidden ---