svn commit: r291861 - head/share/man/man9
Conrad E. Meyer
cem at FreeBSD.org
Sat Dec 5 17:01:39 UTC 2015
Author: cem
Date: Sat Dec 5 17:01:38 2015
New Revision: 291861
URL: https://svnweb.freebsd.org/changeset/base/291861
Log:
style.9: Add a small blurb about allowing bool
It was allowed before, but make it very explicit it is allowed now. And
prefer 'bool' to older types that were used for the same purpose -- int and
boolean_t.
Like with the C99 fixed-width types, use common sense when changing old
code.
No igor regressions.
Suggested by: bde <20151205031713.T3286 at besplex.bde.org>
Reviewed by: glebius, davide, bapt (earlier versions)
Reviewed by: imp
Feedback from: julian
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D4384
Modified:
head/share/man/man9/style.9
Modified: head/share/man/man9/style.9
==============================================================================
--- head/share/man/man9/style.9 Sat Dec 5 16:28:14 2015 (r291860)
+++ head/share/man/man9/style.9 Sat Dec 5 17:01:38 2015 (r291861)
@@ -26,7 +26,7 @@
.\" From: @(#)style 1.14 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
-.Dd November 22, 2015
+.Dd December 5, 2015
.Dt STYLE 9
.Os
.Sh NAME
@@ -288,6 +288,30 @@ Like white-space commits, care should be
.Vt uintXX_t
only commits.
.Pp
+Similarly, the project is slowly moving to use the
+.St -isoC-99
+.Vt bool
+in preference to the older
+.Vt int
+or
+.Vt boolean_t .
+New code should use
+.Vt bool ,
+and old code may be converted if it is
+reasonable to do so.
+Literal values are named
+.Dv true
+and
+.Dv false .
+These are preferred to the old spellings
+.Dv TRUE
+and
+.Dv FALSE .
+Userspace code should include
+.In stdbool.h ,
+while kernel code should include
+.In sys/types.h .
+.Pp
Enumeration values are all uppercase.
.Bd -literal
enum enumtype { ONE, TWO } et;
More information about the svn-src-head
mailing list