Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)

This commit is contained in:
Denis Vlasenko
2007-06-25 10:55:35 +00:00
parent 1399282b47
commit 80b8b39899
26 changed files with 55 additions and 66 deletions

View File

@ -146,8 +146,8 @@ static const struct built_in_command bltins[] = {
/* to do: add ulimit */
};
#define VEC_SIZE(v) (sizeof(v)/sizeof(v[0]))
#define VEC_LAST(v) v[VEC_SIZE(v)-1]
#define VEC_LAST(v) v[ARRAY_SIZE(v)-1]
static int shell_context; /* Type prompt trigger (PS1 or PS2) */