From 9c6e217f29bb0a76ec153574a3d493b020e5fb60 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 29 May 2010 08:12:39 +0000 Subject: Doom plugin: In anticipation of moving to the EABI toolchain, because of its assumptions about enums being sized as ints, convert enum typdefs to int or unsigned depending upon whether they have negative values in the enumeration. This should effectively preserve the manner in which it is compiled under the old toolchain and avoids having to closely inspect and possibly change many places in the code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26368 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/m_misc.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'apps/plugins/doom/m_misc.h') diff --git a/apps/plugins/doom/m_misc.h b/apps/plugins/doom/m_misc.h index 25eb8540c0..3ea6af987f 100644 --- a/apps/plugins/doom/m_misc.h +++ b/apps/plugins/doom/m_misc.h @@ -61,6 +61,17 @@ struct default_s *M_LookupDefault(const char *name); /* killough 11/98 */ // CPhipps - struct to hold a value in a config file // Cannot be a union, as it must be initialised +enum { + def_none, // Dummy entry + def_str, // A string + def_int, // Integer + def_hex, // Integer (write in hex) + def_bool = def_int, // Boolean + def_key = def_hex, // Key code (byte) + def_mouseb = def_int,// Mouse button + def_colour = def_hex // Colour (256 colour palette entry) +}; /* type */ + typedef struct default_s { const char* name; @@ -84,16 +95,7 @@ typedef struct default_s // Limits (for an int) int minvalue; // jff 3/3/98 minimum allowed value int maxvalue; // jff 3/3/98 maximum allowed value - enum { - def_none, // Dummy entry - def_str, // A string - def_int, // Integer - def_hex, // Integer (write in hex) - def_bool = def_int, // Boolean - def_key = def_hex, // Key code (byte) - def_mouseb = def_int,// Mouse button - def_colour = def_hex // Colour (256 colour palette entry) - } type; // CPhipps - type of entry + unsigned type; // CPhipps - type of entry int setupscreen; // phares 4/19/98: setup screen where this appears int *current; /* cph - MBF-like pointer to current value */ // cph - removed the help strings from the config file -- cgit v1.2.3