#ifndef nitems to avoid redefining it if it is already in a header.

This commit is contained in:
Nicholas Marriott 2009-06-25 22:08:15 +00:00
parent e8c10f5b34
commit e225ce0fd7

2
tmux.h
View File

@ -73,7 +73,9 @@ extern const char *__progname;
#define printflike5 __attribute__ ((format (printf, 5, 6)))
/* Number of items in array. */
#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
#endif
/* Buffer macros. */
#define BUFFER_USED(b) ((b)->size)