This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
manual: Refactor documentation of CHAR_BIT.
- From: Rical Jasan <ricaljasan at pacific dot net>
- To: libc-alpha at sourceware dot org
- Cc: Joseph Myers <joseph at codesourcery dot com>, Zack Weinberg <zackw at panix dot com>, Carlos O'Donell <carlos at redhat dot com>, Michael Kerrisk <mtk dot manpages at gmail dot com>
- Date: Sat, 17 Jun 2017 01:42:02 -0700
- Subject: manual: Refactor documentation of CHAR_BIT.
- Authentication-results: sourceware.org; auth=none
- References: <20170617084202.4662-1-ricaljasan@pacific.net>
This single-@item @table is better defined with @defvr, since the
CHAR_BIT macro has @standards (being declared in a header), and @items
in @tables are not considered annotatable. Using @defvr automatically
includes the macro in the Variable and Constant Macro Index and
ensures its inclusion the Summary of Library Facilities. The file
include/limits.h identifies the macro as coming from C99.
* manual/lang.texi (CHAR_BIT): Convert from an @table to an
@defvr. Change standard from ISO to C99.
---
manual/lang.texi | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/manual/lang.texi b/manual/lang.texi
index cf0e4e73cd..4b04232e3c 100644
--- a/manual/lang.texi
+++ b/manual/lang.texi
@@ -629,9 +629,8 @@ There is no operator in the C language that can give you the number of
bits in an integer data type. But you can compute it from the macro
@code{CHAR_BIT}, defined in the header file @file{limits.h}.
-@table @code
-@item CHAR_BIT
-@standards{ISO, limits.h}
+@defvr Macro CHAR_BIT
+@standards{C99, limits.h}
This is the number of bits in a @code{char}---eight, on most systems.
The value has type @code{int}.
@@ -641,7 +640,7 @@ this:
@smallexample
sizeof (@var{type}) * CHAR_BIT
@end smallexample
-@end table
+@end defvr
That expression includes padding bits as well as value and sign bits.
On all systems supported by @theglibc{}, standard integer types other