From e3e77ce75e2d7f84b1245ae56f05ad5c32ddfdca Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 1 Oct 2009 01:25:24 +0200 Subject: [PATCH] move the SIZE_DEFAULTS() macro to where it belongs to --- src/core.c | 5 ----- src/specials.h | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core.c b/src/core.c index 27312df2..97fea578 100644 --- a/src/core.c +++ b/src/core.c @@ -232,11 +232,6 @@ struct text_object *construct_text_object(const char *s, const char *arg, long #define OBJ_IF_ARG(a, n, ...) __OBJ_HEAD(a, n) __OBJ_ARG(__VA_ARGS__) __OBJ_IF; { #define END } } else -#define SIZE_DEFAULTS(arg) { \ - obj->a = default_##arg##_width; \ - obj->b = default_##arg##_height; \ -} - #ifdef X11 if (s[0] == '#') { obj->type = OBJ_color; diff --git a/src/specials.h b/src/specials.h index d506306f..c659c1ac 100644 --- a/src/specials.h +++ b/src/specials.h @@ -86,6 +86,12 @@ extern int default_gauge_width; extern int default_gauge_height; #endif +/* set the obj's default width and height (FIXME: referencing the global obj is evil) */ +#define SIZE_DEFAULTS(arg) { \ + obj->a = default_##arg##_width; \ + obj->b = default_##arg##_height; \ +} + /* max number of specials allowed (TODO: use linked list instead) */ extern int max_specials;