From d3ef15de829dab647e1ea49fb2fc8a5101ca10e5 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 18 Sep 2017 18:05:38 -0700 Subject: [PATCH] Updated DUMB to move some macros for internal use only. --- Frameworks/Dumb/dumb/include/dumb.h | 12 ------------ Frameworks/Dumb/dumb/include/internal/dumb.h | 11 +++++++++++ Frameworks/Dumb/dumb/src/core/dumbfile.c | 1 + Frameworks/Dumb/dumb/src/it/readmod.c | 1 + 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Frameworks/Dumb/dumb/include/dumb.h b/Frameworks/Dumb/dumb/include/dumb.h index dad2fd049..3f1144b06 100644 --- a/Frameworks/Dumb/dumb/include/dumb.h +++ b/Frameworks/Dumb/dumb/include/dumb.h @@ -77,18 +77,6 @@ #define DUMB_DATE_STR DUMB_DAY_STR1 "." DUMB_MONTH_STR1 "." DUMB_YEAR_STR4 -#undef MIN -#undef MAX -#undef MID - -#define MIN(x,y) (((x) < (y)) ? (x) : (y)) -#define MAX(x,y) (((x) > (y)) ? (x) : (y)) -#define MID(x,y,z) MAX((x), MIN((y), (z))) - -#undef ABS -#define ABS(x) (((x) >= 0) ? (x) : (-(x))) - - #ifdef DEBUGMODE #ifndef ASSERT diff --git a/Frameworks/Dumb/dumb/include/internal/dumb.h b/Frameworks/Dumb/dumb/include/internal/dumb.h index bed595666..c725e8610 100644 --- a/Frameworks/Dumb/dumb/include/internal/dumb.h +++ b/Frameworks/Dumb/dumb/include/internal/dumb.h @@ -27,6 +27,17 @@ #define INTERNAL_DUMB_H +#undef MIN +#undef MAX +#undef MID + +#define MIN(x,y) (((x) < (y)) ? (x) : (y)) +#define MAX(x,y) (((x) > (y)) ? (x) : (y)) +#define MID(x,y,z) MAX((x), MIN((y), (z))) + +#undef ABS +#define ABS(x) (((x) >= 0) ? (x) : (-(x))) + typedef struct DUH_SIGTYPE_DESC_LINK { struct DUH_SIGTYPE_DESC_LINK *next; diff --git a/Frameworks/Dumb/dumb/src/core/dumbfile.c b/Frameworks/Dumb/dumb/src/core/dumbfile.c index 65e89746b..ebcb601ce 100644 --- a/Frameworks/Dumb/dumb/src/core/dumbfile.c +++ b/Frameworks/Dumb/dumb/src/core/dumbfile.c @@ -20,6 +20,7 @@ #include #include "dumb.h" +#include "internal/dumb.h" diff --git a/Frameworks/Dumb/dumb/src/it/readmod.c b/Frameworks/Dumb/dumb/src/it/readmod.c index fdff3ca62..a4dad5c14 100644 --- a/Frameworks/Dumb/dumb/src/it/readmod.c +++ b/Frameworks/Dumb/dumb/src/it/readmod.c @@ -22,6 +22,7 @@ #include #include "dumb.h" +#include "internal/dumb.h" #include "internal/it.h"