Use roomof macro for rounding up divisions

This commit is contained in:
Nobuyoshi Nakada 2022-10-04 18:10:41 +09:00
parent ee8bcbf405
commit 5ccb625fbb
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
7 changed files with 15 additions and 12 deletions

View file

@ -125,10 +125,9 @@ typedef struct {
#define POSIX_BRACKET_ENTRY_INIT(name, ctype) \
{(short int )(sizeof(name) - 1), name, (ctype)}
#ifndef numberof
# define numberof(array) (int )(sizeof(array) / sizeof((array)[0]))
#endif
#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
#define roomof(x, y) (((x) + (y) - 1) / (y))
#define type_roomof(x, y) roomof(sizeof(x), sizeof(y))
#define USE_CRNL_AS_LINE_TERMINATOR
#define USE_UNICODE_PROPERTIES