This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v2] 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: Tue, 20 Jun 2017 04:23:21 -0700
- Subject: [PATCH v2] manual: Refactor documentation of CHAR_BIT.
- Authentication-results: sourceware.org; auth=none
- References: <20170617084202.4662-2-ricaljasan@pacific.net>
This single-@item @table is better defined with @deftypevr, since the
CHAR_BIT macro has @standards (being declared in a header), and @items
in @tables are not considered annotatable. Using @deftypevr
automatically includes the macro in the Variable and Constant Macro
Index and ensures its inclusion the Summary of Library Facilities.
@deftypevr is used to record the type of the macro so that it also
appears in the Summary.
* manual/lang.texi (CHAR_BIT): Convert from an @table to an
@deftypevr. Change standard from ISO to C90.
---
manual/lang.texi | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/manual/lang.texi b/manual/lang.texi
index 0ba002a396..6d0a44062c 100644
--- a/manual/lang.texi
+++ b/manual/lang.texi
@@ -631,11 +631,9 @@ 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}
+@deftypevr Macro int CHAR_BIT
+@standards{C90, limits.h}
This is the number of bits in a @code{char}---eight, on most systems.
-The value has type @code{int}.
You can compute the number of bits in any data type @var{type} like
this:
@@ -643,7 +641,7 @@ this:
@smallexample
sizeof (@var{type}) * CHAR_BIT
@end smallexample
-@end table
+@end deftypevr
That expression includes padding bits as well as value and sign bits.
On all systems supported by @theglibc{}, standard integer types other
--
2.12.2