unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (NetBSD-6.1.5)
Page:
Section:
Apropos / Subsearch:
optional field

__ARRAYCOUNT(3)            Library Functions Manual            __ARRAYCOUNT(3)

NAME
     __arraycount -- macro for statically allocated arrays

SYNOPSIS
     #include <&lt;sys/cdefs.h>&gt;

     size_t
     __arraycount(x);

DESCRIPTION
     The __arraycount() macro returns the number of elements in a statically
     allocated buffer.

EXAMPLES
     The following example demonstrates a typical usage of __arraycount():

           uint8_t buf[BUFSIZE];
           size_t i;

           ...

           for (i = 0; i < __arraycount(buf); i++)
                   ...

SEE ALSO
     cdefs(3)

HISTORY
     The __arraycount() macro first appeared in NetBSD 4.0.

NetBSD 6.1.5                   December 16, 2010                  NetBSD 6.1.5