Tue Mar 2 05:59:57 2010 UTC ()
Speak about typical instead of possible usage in the example.


(jruoho)
diff -r1.3 -r1.4 src/share/man/man3/__arraycount.3

cvs diff -r1.3 -r1.4 src/share/man/man3/__arraycount.3 (expand / switch to unified diff)

--- src/share/man/man3/__arraycount.3 2010/03/01 21:34:30 1.3
+++ src/share/man/man3/__arraycount.3 2010/03/02 05:59:56 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: __arraycount.3,v 1.3 2010/03/01 21:34:30 wiz Exp $ 1.\" $NetBSD: __arraycount.3,v 1.4 2010/03/02 05:59:56 jruoho Exp $
2.\" 2.\"
3.\" Copyright (c) 2010 The NetBSD Foundation, Inc. 3.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jukka Ruohonen. 7.\" by Jukka Ruohonen.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
@@ -32,27 +32,27 @@ @@ -32,27 +32,27 @@
32.Dt __ARRAYCOUNT 3 32.Dt __ARRAYCOUNT 3
33.Sh NAME 33.Sh NAME
34.Nm __arraycount 34.Nm __arraycount
35.Nd macro for statically allocated arrays 35.Nd macro for statically allocated arrays
36.Sh SYNOPSIS 36.Sh SYNOPSIS
37.In sys/cdefs.h 37.In sys/cdefs.h
38.Ft size_t 38.Ft size_t
39.Fn __arraycount x 39.Fn __arraycount x
40.Sh DESCRIPTION 40.Sh DESCRIPTION
41The 41The
42.Fn __arraycount 42.Fn __arraycount
43macro returns the number of elements in a statically allocated buffer. 43macro returns the number of elements in a statically allocated buffer.
44.Sh EXAMPLES 44.Sh EXAMPLES
45The following example demonstrates a possible usage of 45The following example demonstrates a typical usage of
46.Fn __arraycount : 46.Fn __arraycount :
47.Bd -literal -offset indent 47.Bd -literal -offset indent
48uint8_t buf[BUFSIZE]; 48uint8_t buf[BUFSIZE];
49size_t i; 49size_t i;
50 50
51\&... 51\&...
52 52
53for (i = 0; i \*[Lt] __arraycount(buf); i++) 53for (i = 0; i \*[Lt] __arraycount(buf); i++)
54 \&... 54 \&...
55.Ed 55.Ed
56.Sh HISTORY 56.Sh HISTORY
57The 57The
58.Fn __arraycount 58.Fn __arraycount