From 5eece7e783e177e6fcf7ed4a7185d180f9fc5565 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 17 Nov 2022 12:36:12 +0100 Subject: Use LIBLUX_ as a macro prefix --- src/common.h | 6 +++--- src/lux.h | 8 ++++---- src/luxinit.c | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/common.h b/src/common.h index a7739c2..7b1aff6 100644 --- a/src/common.h +++ b/src/common.h @@ -15,8 +15,8 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#ifndef LUX_COMMON_H -#define LUX_COMMON_H +#ifndef LIBLUX_COMMON_H +#define LIBLUX_COMMON_H #ifdef __cplusplus extern "C" { @@ -28,4 +28,4 @@ FILE *getbstream(int); } #endif -#endif /* !LUX_COMMON_H */ +#endif /* !LIBLUX_COMMON_H */ diff --git a/src/lux.h b/src/lux.h index 8473081..2e83f5d 100644 --- a/src/lux.h +++ b/src/lux.h @@ -15,12 +15,12 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#ifndef LUX_H -#define LUX_H +#ifndef LIBLUX_LUX_H +#define LIBLUX_LUX_H #include -#define LUX_BACKLIGHT_DIR "/sys/class/backlight" +#define LIBLUX_BACKLIGHT_DIR "/sys/class/backlight" #ifdef O_PATH #define LUX_GDIR_FLAGS O_PATH #else @@ -54,4 +54,4 @@ double luxdecp(lux_t *, double); } #endif -#endif /* !LUX_H */ +#endif /* !LIBLUX_LUX_H */ diff --git a/src/luxinit.c b/src/luxinit.c index 949f3a2..55151b4 100644 --- a/src/luxinit.c +++ b/src/luxinit.c @@ -48,14 +48,14 @@ getdir(void) DIR *dir; /* To get the file descriptor for the directory where all the brightness - * files are located, we first need to open LUX_BACKLIGHT_DIR which is - * the directory where the backlight directories are located. Then we - * need to get a DIR* of that directory and get the 3rd entry. We need - * the third because the fist and second are the . and .. folders. + * files are located, we first need to open LIBLUX_BACKLIGHT_DIR which + * is the directory where the backlight directories are located. Then + * we need to get a DIR* of that directory and get the 3rd entry. We + * need the third because the fist and second are the . and .. folders. * Finally we open the folder so that we have a file descriptor we can * return. */ - if ((dfd = open(LUX_BACKLIGHT_DIR, O_RDONLY)) == -1) + if ((dfd = open(LIBLUX_BACKLIGHT_DIR, O_RDONLY)) == -1) return -1; if ((dir = fdopendir(dfd)) == NULL) { close(dfd); -- cgit v1.2.3