Changeset View
Changeset View
Standalone View
Standalone View
share/man/man9/style.9
Show All 30 Lines | |||||
.Sh NAME | .Sh NAME | ||||
.Nm style | .Nm style | ||||
.Nd "kernel source file style guide" | .Nd "kernel source file style guide" | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
This file specifies the preferred style for kernel source files in the | This file specifies the preferred style for kernel source files in the | ||||
.Fx | .Fx | ||||
source tree. | source tree. | ||||
It is also a guide for the preferred userland code style. | It is also a guide for the preferred userland code style. | ||||
The preferred line width is 80 characters, but some exceptions are | |||||
made when a slightly longer line is clearer or easier to read. | |||||
Anything that is frequently grepped for, such as diagnostic, error or panic | |||||
messages, should not be broken up over multiple lines despite this rule. | |||||
Many of the style rules are implicit in the examples. | Many of the style rules are implicit in the examples. | ||||
Be careful to check the examples before assuming that | Be careful to check the examples before assuming that | ||||
.Nm | .Nm | ||||
is silent on an issue. | is silent on an issue. | ||||
.Bd -literal | .Bd -literal | ||||
/* | /* | ||||
* Style guide for FreeBSD. Based on the CSRG's KNF (Kernel Normal Form). | * Style guide for FreeBSD. Based on the CSRG's KNF (Kernel Normal Form). | ||||
* | * | ||||
▲ Show 20 Lines • Show All 899 Lines • Show Last 20 Lines |