diff options
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.208 2009-01-07 19:53:17 nicm Exp $ */ +/* $Id: tmux.h,v 1.209 2009-01-07 22:52:33 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -135,6 +135,9 @@ extern const char *__progname; #define printflike3 __attribute__ ((format (printf, 3, 4))) #define printflike4 __attribute__ ((format (printf, 4, 5))) +/* Number of items in array. */ +#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) + /* Buffer macros. */ #define BUFFER_USED(b) ((b)->size) #define BUFFER_FREE(b) ((b)->space - (b)->off - (b)->size) |