summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-16 05:24:30 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-16 05:24:30 +0000
commit1a301849034da9956b893453acce8e0f9168e150 (patch)
treea39f7a6c6b4c54b7993e58cd22ea6b6bd25f37cf /src/lib/util
parent91f928d6cd774c9526c7fde7e0860aded24d08a5 (diff)
Final round of struct/union/enum normalization.
Diffstat (limited to 'src/lib/util')
-rw-r--r--src/lib/util/aviio.c2
-rw-r--r--src/lib/util/aviio.h8
-rw-r--r--src/lib/util/cdrom.c2
-rw-r--r--src/lib/util/cdrom.h2
-rw-r--r--src/lib/util/corefile.c6
-rw-r--r--src/lib/util/corefile.h2
-rw-r--r--src/lib/util/opresolv.c2
-rw-r--r--src/lib/util/opresolv.h2
-rw-r--r--src/lib/util/palette.c4
-rw-r--r--src/lib/util/palette.h4
-rw-r--r--src/lib/util/png.h3
-rw-r--r--src/lib/util/pool.c4
-rw-r--r--src/lib/util/pool.h4
-rw-r--r--src/lib/util/un7z.h19
-rw-r--r--src/lib/util/unzip.h3
15 files changed, 30 insertions, 37 deletions
diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c
index 13b34692936..aec1a68b81a 100644
--- a/src/lib/util/aviio.c
+++ b/src/lib/util/aviio.c
@@ -169,7 +169,7 @@ struct avi_stream
};
-struct _avi_file
+struct avi_file
{
/* shared data */
osd_file * file; /* pointer to open file */
diff --git a/src/lib/util/aviio.h b/src/lib/util/aviio.h
index cf524a44381..6c07c9b2669 100644
--- a/src/lib/util/aviio.h
+++ b/src/lib/util/aviio.h
@@ -48,7 +48,7 @@
CONSTANTS
***************************************************************************/
-enum _avi_error
+enum avi_error
{
AVIERR_NONE = 0,
AVIERR_END,
@@ -68,10 +68,9 @@ enum _avi_error
AVIERR_UNSUPPORTED_AUDIO_FORMAT,
AVIERR_EXCEEDED_SOUND_BUFFER
};
-typedef enum _avi_error avi_error;
-enum _avi_datatype
+enum avi_datatype
{
AVIDATA_VIDEO,
AVIDATA_AUDIO_CHAN0,
@@ -83,7 +82,6 @@ enum _avi_datatype
AVIDATA_AUDIO_CHAN6,
AVIDATA_AUDIO_CHAN7
};
-typedef enum _avi_datatype avi_datatype;
@@ -104,7 +102,7 @@ typedef enum _avi_datatype avi_datatype;
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _avi_file avi_file;
+struct avi_file;
struct avi_movie_info
diff --git a/src/lib/util/cdrom.c b/src/lib/util/cdrom.c
index 964051b6fcf..924d45770f0 100644
--- a/src/lib/util/cdrom.c
+++ b/src/lib/util/cdrom.c
@@ -88,7 +88,7 @@ const int ECC_Q_COMP = 43; // 43 bytes each
TYPE DEFINITIONS
***************************************************************************/
-struct _cdrom_file
+struct cdrom_file
{
chd_file * chd; /* CHD file */
cdrom_toc cdtoc; /* TOC for the CD */
diff --git a/src/lib/util/cdrom.h b/src/lib/util/cdrom.h
index 8e3d776f99c..437501618b3 100644
--- a/src/lib/util/cdrom.h
+++ b/src/lib/util/cdrom.h
@@ -90,7 +90,7 @@ enum
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _cdrom_file cdrom_file;
+struct cdrom_file;
struct cdrom_track_info
{
diff --git a/src/lib/util/corefile.c b/src/lib/util/corefile.c
index ad32a0e4d1a..cf154c3c529 100644
--- a/src/lib/util/corefile.c
+++ b/src/lib/util/corefile.c
@@ -70,7 +70,7 @@
TYPE DEFINITIONS
***************************************************************************/
-enum _text_file_type
+enum text_file_type
{
TFT_OSD = 0, /* OSD depdendent encoding format used when BOMs missing */
TFT_UTF8, /* UTF-8 */
@@ -79,7 +79,6 @@ enum _text_file_type
TFT_UTF32BE, /* UTF-32 (UCS-4) (big endian) */
TFT_UTF32LE /* UTF-32 (UCS-4) (little endian) */
};
-typedef enum _text_file_type text_file_type;
struct zlib_data
@@ -91,8 +90,7 @@ struct zlib_data
};
-/* typedef struct _core_file core_file -- declared in corefile.h */
-struct _core_file
+struct core_file
{
osd_file * file; /* OSD file handle */
zlib_data * zdata; /* compression data */
diff --git a/src/lib/util/corefile.h b/src/lib/util/corefile.h
index 182d8c76ad9..79ec9518cac 100644
--- a/src/lib/util/corefile.h
+++ b/src/lib/util/corefile.h
@@ -66,7 +66,7 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _core_file core_file;
+struct core_file;
diff --git a/src/lib/util/opresolv.c b/src/lib/util/opresolv.c
index efc9306b8b5..d39bcc10c4e 100644
--- a/src/lib/util/opresolv.c
+++ b/src/lib/util/opresolv.c
@@ -32,7 +32,7 @@ struct option_resolution_entry
} u;
};
-struct _option_resolution
+struct option_resolution
{
object_pool *pool;
const char *specification;
diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h
index 3cc3ad1cc24..dbd891181ea 100644
--- a/src/lib/util/opresolv.h
+++ b/src/lib/util/opresolv.h
@@ -114,7 +114,7 @@ struct OptionResolutionError
-typedef struct _option_resolution option_resolution;
+struct option_resolution;
struct OptionRange
{
diff --git a/src/lib/util/palette.c b/src/lib/util/palette.c
index 10b7dfc0fe8..b44f0e8cdb1 100644
--- a/src/lib/util/palette.c
+++ b/src/lib/util/palette.c
@@ -57,7 +57,7 @@ struct dirty_state
/* a single palette client */
-struct _palette_client
+struct palette_client
{
palette_client *next; /* pointer to next client */
palette_t * palette; /* reference to the palette */
@@ -67,7 +67,7 @@ struct _palette_client
/* a palette object */
-struct _palette_t
+struct palette_t
{
UINT32 refcount; /* reference count on the palette */
UINT32 numcolors; /* number of colors in the palette */
diff --git a/src/lib/util/palette.h b/src/lib/util/palette.h
index c8c15f4734b..d54ee279fbf 100644
--- a/src/lib/util/palette.h
+++ b/src/lib/util/palette.h
@@ -56,10 +56,10 @@ typedef UINT32 rgb_t;
typedef UINT16 rgb15_t;
/* a palette is an opaque, reference counted object */
-typedef struct _palette_t palette_t;
+struct palette_t;
/* a palette client is someone who is tracking the dirty state of a palette */
-typedef struct _palette_client palette_client;
+struct palette_client;
diff --git a/src/lib/util/png.h b/src/lib/util/png.h
index 9e00f423b11..ce7b7f7e261 100644
--- a/src/lib/util/png.h
+++ b/src/lib/util/png.h
@@ -87,7 +87,7 @@
#define PNG_PF_Paeth 4
/* Error types */
-enum _png_error
+enum png_error
{
PNGERR_NONE,
PNGERR_OUT_OF_MEMORY,
@@ -101,7 +101,6 @@ enum _png_error
PNGERR_COMPRESS_ERROR,
PNGERR_UNSUPPORTED_FORMAT
};
-typedef enum _png_error png_error;
diff --git a/src/lib/util/pool.c b/src/lib/util/pool.c
index 97d6236f66d..ab0c0ef3270 100644
--- a/src/lib/util/pool.c
+++ b/src/lib/util/pool.c
@@ -90,7 +90,7 @@ struct object_entry_block
/* the object pool itself */
-struct _object_pool
+struct object_pool
{
object_entry * hashtable[POOL_HASH_SIZE];
object_entry * globallist;
@@ -102,7 +102,7 @@ struct _object_pool
/* an iterator over objects in a pool */
-struct _object_pool_iterator
+struct object_pool_iterator
{
object_pool * pool;
object_type type;
diff --git a/src/lib/util/pool.h b/src/lib/util/pool.h
index ed65741a48a..77bf7456da4 100644
--- a/src/lib/util/pool.h
+++ b/src/lib/util/pool.h
@@ -69,10 +69,10 @@
typedef UINT32 object_type;
/* opaque type representing a pool of objects */
-typedef struct _object_pool object_pool;
+struct object_pool;
/* opaque type representing an iterator over pool objects */
-typedef struct _object_pool_iterator object_pool_iterator;
+struct object_pool_iterator;
diff --git a/src/lib/util/un7z.h b/src/lib/util/un7z.h
index 1051887f81c..f80bc4b12ab 100644
--- a/src/lib/util/un7z.h
+++ b/src/lib/util/un7z.h
@@ -56,38 +56,38 @@ void SZipFree(void *p, void *address);
void *SZipAllocTemp(void *p, size_t size);
void SZipFreeTemp(void *p, void *address);
-typedef struct
+struct CSzFile
{
long _7z_currfpos;
UINT64 _7z_length;
osd_file * _7z_osdfile; /* OSD file handle */
-} CSzFile;
+};
-typedef struct
+struct CFileSeqInStream
{
ISeqInStream s;
CSzFile file;
-} CFileSeqInStream;
+};
void FileSeqInStream_CreateVTable(CFileSeqInStream *p);
-typedef struct
+struct CFileInStream
{
ISeekInStream s;
CSzFile file;
-} CFileInStream;
+};
void FileInStream_CreateVTable(CFileInStream *p);
-typedef struct
+struct CFileOutStream
{
ISeqOutStream s;
CSzFile file;
-} CFileOutStream;
+} ;
void FileOutStream_CreateVTable(CFileOutStream *p);
@@ -99,7 +99,7 @@ void FileOutStream_CreateVTable(CFileOutStream *p);
/* Error types */
-enum __7z_error
+enum _7z_error
{
_7ZERR_NONE = 0,
_7ZERR_OUT_OF_MEMORY,
@@ -111,7 +111,6 @@ enum __7z_error
_7ZERR_UNSUPPORTED,
_7ZERR_BUFFER_TOO_SMALL
};
-typedef enum __7z_error _7z_error;
diff --git a/src/lib/util/unzip.h b/src/lib/util/unzip.h
index 078d38c8736..e199e1c3b74 100644
--- a/src/lib/util/unzip.h
+++ b/src/lib/util/unzip.h
@@ -52,7 +52,7 @@
#define ZIP_DECOMPRESS_BUFSIZE 16384
/* Error types */
-enum _zip_error
+enum zip_error
{
ZIPERR_NONE = 0,
ZIPERR_OUT_OF_MEMORY,
@@ -64,7 +64,6 @@ enum _zip_error
ZIPERR_UNSUPPORTED,
ZIPERR_BUFFER_TOO_SMALL
};
-typedef enum _zip_error zip_error;