diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-10-25 20:19:24 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-10-25 20:21:04 +0100 |
commit | b5f56c0c13c92232c9f77b548476fa10f1aec28f (patch) | |
tree | bb2af9cbcb949f1ffbc2a716c8461d31e2f4862b | |
parent | f1a8b636cc4fe9419b31ed21c62b6e8d40fa4f1e (diff) |
Fix silly mistake in gs_debug_flags changes.
I'd inadvertently caused the gs_debug_flags tables to be built in every
object that included gdebug.h.
Move them into gsmisc.c.
-rw-r--r-- | gs/base/gdebug.h | 21 | ||||
-rw-r--r-- | gs/base/gsmisc.c | 20 |
2 files changed, 23 insertions, 18 deletions
diff --git a/gs/base/gdebug.h b/gs/base/gdebug.h index 5635689d9..c351dad01 100644 --- a/gs/base/gdebug.h +++ b/gs/base/gdebug.h @@ -68,25 +68,10 @@ typedef struct { char long_desc[80]; } gs_debug_flag_details; -static gs_debug_flag_details gs_debug_flags[] = -{ -#define FLAG(a,b,c,d) {1, # a ,d} -#define UNUSED(a) { 0, "", "" }, -#include "gdbflags.h" -#undef FLAG -#undef UNUSED -}; - -static const byte gs_debug_flag_implies[] = -{ -#define FLAG(a,b,c,d) c -#define UNUSED(a) 0, -#include "gdbflags.h" -#undef FLAG -#undef UNUSED -}; +#define gs_debug_flags_max 127 +extern const byte gs_debug_flag_implies[gs_debug_flags_max]; +const gs_debug_flag_details gs_debug_flags[gs_debug_flags_max]; -#define gs_debug_flags_max sizeof(gs_debug_flag_implies) int gs_debug_flags_parse(gs_memory_t *heap, const char *arg); void gs_debug_flags_list(gs_memory_t *heap); diff --git a/gs/base/gsmisc.c b/gs/base/gsmisc.c index e1bbc090f..de934bfd8 100644 --- a/gs/base/gsmisc.c +++ b/gs/base/gsmisc.c @@ -1070,6 +1070,26 @@ gx_intersect_small_bars(fixed q0x, fixed q0y, fixed q1x, fixed q1y, fixed q2x, f return false; } +/* gs_debug_flags handling code */ + +const gs_debug_flag_details gs_debug_flags[] = +{ +#define FLAG(a,b,c,d) {1, # a ,d} +#define UNUSED(a) { 0, "", "" }, +#include "gdbflags.h" +#undef FLAG +#undef UNUSED +}; + +const byte gs_debug_flag_implies[] = +{ +#define FLAG(a,b,c,d) c +#define UNUSED(a) 0, +#include "gdbflags.h" +#undef FLAG +#undef UNUSED +}; + int gs_debug_flags_parse(gs_memory_t *heap, const char *arg) { #ifdef DEBUG |