From a036d985d72ba78dd3ad4bc4c6763dc3f3b3d33e Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Fri, 20 Oct 2023 18:34:14 -0400 Subject: [PATCH] common: rename array-size.h to macros.h --- CONTRIBUTING.md | 4 ++-- include/common/{array-size.h => macros.h} | 6 +++--- include/ssd-internal.h | 2 +- src/action.c | 2 +- src/cursor.c | 2 +- src/layers.c | 2 +- src/output.c | 2 +- src/theme.c | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) rename include/common/{array-size.h => macros.h} (86%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 099253e6..8b0b543a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -228,12 +228,12 @@ We have a very small, modest API and encourage you to use it. 4. `wl_array_len()` to get number of elements in a `wl_array` [common/array.h] 5. `ARRAY_SIZE()` to get number of elements in visible array - [common/array-size.h] + [common/macros.h] [common/mem.h]: https://github.com/labwc/labwc/blob/master/include/common/mem.h [common/list.h]: https://github.com/labwc/labwc/blob/master/include/common/list.h [common/array.h]: https://github.com/labwc/labwc/blob/master/include/common/array.h -[common/array-size.h]: https://github.com/labwc/labwc/blob/master/include/common/array-size.h +[common/macros.h]: https://github.com/labwc/labwc/blob/master/include/common/macros.h ### The Use of glib diff --git a/include/common/array-size.h b/include/common/macros.h similarity index 86% rename from include/common/array-size.h rename to include/common/macros.h index 67443943..0fb62ca6 100644 --- a/include/common/array-size.h +++ b/include/common/macros.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef LABWC_ARRAY_SIZE_H -#define LABWC_ARRAY_SIZE_H +#ifndef LABWC_MACROS_H +#define LABWC_MACROS_H /** * ARRAY_SIZE() - Get the number of elements in array. @@ -16,4 +16,4 @@ */ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) -#endif /* LABWC_ARRAY_SIZE_H */ +#endif /* LABWC_MACROS_H */ diff --git a/include/ssd-internal.h b/include/ssd-internal.h index b4c06ad6..e52ae49d 100644 --- a/include/ssd-internal.h +++ b/include/ssd-internal.h @@ -3,7 +3,7 @@ #define LABWC_SSD_INTERNAL_H #include -#include "common/array-size.h" +#include "common/macros.h" #include "ssd.h" #define FOR_EACH(tmp, ...) \ diff --git a/src/action.c b/src/action.c index f9b15c38..8b67403f 100644 --- a/src/action.c +++ b/src/action.c @@ -7,7 +7,7 @@ #include #include #include "action.h" -#include "common/array-size.h" +#include "common/macros.h" #include "common/list.h" #include "common/mem.h" #include "common/parse-bool.h" diff --git a/src/cursor.c b/src/cursor.c index de6d0db0..5261fb30 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -7,7 +7,7 @@ #include #include #include "action.h" -#include "common/array-size.h" +#include "common/macros.h" #include "common/mem.h" #include "common/scene-helpers.h" #include "config/mousebind.h" diff --git a/src/layers.c b/src/layers.c index f812a016..a55e8a50 100644 --- a/src/layers.c +++ b/src/layers.c @@ -14,7 +14,7 @@ #include #include #include -#include "common/array-size.h" +#include "common/macros.h" #include "common/list.h" #include "common/mem.h" #include "config/rcxml.h" diff --git a/src/output.c b/src/output.c index eef34629..f7f95ab1 100644 --- a/src/output.c +++ b/src/output.c @@ -16,7 +16,7 @@ #include #include #include -#include "common/array-size.h" +#include "common/macros.h" #include "common/mem.h" #include "labwc.h" #include "layers.h" diff --git a/src/theme.c b/src/theme.c index 634519d4..50797d2b 100644 --- a/src/theme.c +++ b/src/theme.c @@ -19,7 +19,7 @@ #include #include #include -#include "common/array-size.h" +#include "common/macros.h" #include "common/dir.h" #include "common/font.h" #include "common/graphic-helpers.h" -- 2.52.0