Deleted Added
full compact
intro.9 (79727) intro.9 (141846)
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. 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.

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

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
1.\" Copyright (c) 1983, 1991, 1993
2.\" The Regents of the University of California. 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.

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

24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" $FreeBSD: head/share/man/man9/intro.9 79727 2001-07-14 19:41:16Z schweikh $
32.\" $FreeBSD: head/share/man/man9/intro.9 141846 2005-02-13 22:25:33Z ru $
33.\"
34.Dd December 13, 1995
35.Dt INTRO 9
36.Os
37.Sh NAME
38.Nm intro
39.Nd "introduction to system kernel interfaces"
40.Sh DESCRIPTION
41This section contains information about the interfaces and
42subroutines in the kernel.
43.Sh PROTOTYPES ANSI-C AND ALL THAT
44Yes please.
45.Pp
46We would like all code to be fully prototyped.
47.Pp
48If your code compiles cleanly with
49.Nm cc
50.Ar -Wall
51we would feel happy about it.
33.\"
34.Dd December 13, 1995
35.Dt INTRO 9
36.Os
37.Sh NAME
38.Nm intro
39.Nd "introduction to system kernel interfaces"
40.Sh DESCRIPTION
41This section contains information about the interfaces and
42subroutines in the kernel.
43.Sh PROTOTYPES ANSI-C AND ALL THAT
44Yes please.
45.Pp
46We would like all code to be fully prototyped.
47.Pp
48If your code compiles cleanly with
49.Nm cc
50.Ar -Wall
51we would feel happy about it.
52It is important to understand that this isn't a question of just shutting up
52It is important to understand that this is not a question of just shutting up
53.Nm cc ,
54it is a question about avoiding the things it complains about.
53.Nm cc ,
54it is a question about avoiding the things it complains about.
55To put it bluntly, don't hide the problem by casting and other
55To put it bluntly, do not hide the problem by casting and other
56obfuscating practices, solve the problem.
57.Sh INDENTATION AND STYLE
58Believe it or not, there actually exists a guide for indentation and style.
56obfuscating practices, solve the problem.
57.Sh INDENTATION AND STYLE
58Believe it or not, there actually exists a guide for indentation and style.
59It isn't generally applied though.
59It is not generally applied though.
60.Pp
61We would appreciate if people would pay attention to it, and at least not
62violate it blatantly.
63.Pp
60.Pp
61We would appreciate if people would pay attention to it, and at least not
62violate it blatantly.
63.Pp
64We don't mind it too badly if you have your own style, but please make
64We do not mind it too badly if you have your own style, but please make
65sure we can read it too.
66.Pp
67Please take time to read
68.Xr style 9
69for more information.
70.Sh NAMING THINGS
71Some general rules exist:
72.Bl -enum

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

87It is important to carefully consider the scope of symbols in the kernel.
88The default is to make everything static, unless some reason requires
89the opposite.
90.Pp
91There are several reasons for this policy,
92the main one is that the kernel is one monolithic name-space,
93and pollution is not a good idea here either.
94.Pp
65sure we can read it too.
66.Pp
67Please take time to read
68.Xr style 9
69for more information.
70.Sh NAMING THINGS
71Some general rules exist:
72.Bl -enum

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

87It is important to carefully consider the scope of symbols in the kernel.
88The default is to make everything static, unless some reason requires
89the opposite.
90.Pp
91There are several reasons for this policy,
92the main one is that the kernel is one monolithic name-space,
93and pollution is not a good idea here either.
94.Pp
95For device drivers and other modules that don't add new internal interfaces
95For device drivers and other modules that do not add new internal interfaces
96to the kernel, the entire source should be in one file if possible.
97That way all symbols can be made static.
98.Pp
99If for some reason a module is split over multiple source files, then try
100to split the module along some major fault-line and consider using the
101number of global symbols as your guide.
102The fewer the better.
103.Sh SEE ALSO
104.Xr style 9
105.Sh HISTORY
106The
107.Nm
108section manual page appeared in
109.Fx 2.2 .
96to the kernel, the entire source should be in one file if possible.
97That way all symbols can be made static.
98.Pp
99If for some reason a module is split over multiple source files, then try
100to split the module along some major fault-line and consider using the
101number of global symbols as your guide.
102The fewer the better.
103.Sh SEE ALSO
104.Xr style 9
105.Sh HISTORY
106The
107.Nm
108section manual page appeared in
109.Fx 2.2 .