Unix/Linux Go Back    


NetBSD 6.1.5 - man page for __arraycount (netbsd section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)


__ARRAYCOUNT(3) 		   BSD Library Functions Manual 		  __ARRAYCOUNT(3)

NAME
     __arraycount -- macro for statically allocated arrays

SYNOPSIS
     #include <sys/cdefs.h>

     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.

BSD					December 16, 2010				      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums


All times are GMT -4. The time now is 09:48 AM.