Remove LENGTH macro and replace with glib one
This commit is contained in:
parent
4d59e3a2e2
commit
bc3c6466ca
@ -20,8 +20,6 @@
|
|||||||
#include "x11/x.h"
|
#include "x11/x.h"
|
||||||
#include "x11/screen.h"
|
#include "x11/screen.h"
|
||||||
|
|
||||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
|
||||||
|
|
||||||
#ifndef VERSION
|
#ifndef VERSION
|
||||||
#define VERSION "version info needed"
|
#define VERSION "version info needed"
|
||||||
#endif
|
#endif
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
#define ERR(msg) printf("%s : %d\n", (msg), __LINE__)
|
#define ERR(msg) printf("%s : %d\n", (msg), __LINE__)
|
||||||
#define PERR(msg, errnum) printf("(%d) %s : %s\n", __LINE__, (msg), (strerror(errnum)))
|
#define PERR(msg, errnum) printf("(%d) %s : %s\n", __LINE__, (msg), (strerror(errnum)))
|
||||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
|
||||||
|
|
||||||
#define ColLast 3
|
#define ColLast 3
|
||||||
#define ColFrame 2
|
#define ColFrame 2
|
||||||
|
@ -598,7 +598,7 @@ void load_settings(char *cmdline_config_path)
|
|||||||
);
|
);
|
||||||
|
|
||||||
/* push hardcoded default rules into rules list */
|
/* push hardcoded default rules into rules list */
|
||||||
for (int i = 0; i < LENGTH(default_rules); i++) {
|
for (int i = 0; i < G_N_ELEMENTS(default_rules); i++) {
|
||||||
rules = g_slist_insert(rules, &(default_rules[i]), -1);
|
rules = g_slist_insert(rules, &(default_rules[i]), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user