summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-09-15 21:47:30 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-09-15 21:47:30 +0000
commitab97dc30efdd5cc1abf8c65b8ce29af364219167 (patch)
tree5ab46b3c21f6e0e4173a79a4151e019b3f2dc17e /src/lib
parentd1da89cc7817315f05269205a3f56d36ebba170b (diff)
First pass at modernizing struct definitions.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util/aviio.c15
-rw-r--r--src/lib/util/aviio.h3
-rw-r--r--src/lib/util/cdrom.h1
-rw-r--r--src/lib/util/corefile.c3
-rw-r--r--src/lib/util/jedparse.c3
-rw-r--r--src/lib/util/jedparse.h3
-rw-r--r--src/lib/util/opresolv.h3
-rw-r--r--src/lib/util/palette.c3
-rw-r--r--src/lib/util/png.c6
-rw-r--r--src/lib/util/png.h6
-rw-r--r--src/lib/util/pool.c9
-rw-r--r--src/lib/util/un7z.h3
-rw-r--r--src/lib/util/unzip.h9
-rw-r--r--src/lib/util/vbiparse.h3
-rw-r--r--src/lib/util/xmlfile.c3
-rw-r--r--src/lib/util/xmlfile.h12
16 files changed, 28 insertions, 57 deletions
diff --git a/src/lib/util/aviio.c b/src/lib/util/aviio.c
index 3dedeb19a2c..13b34692936 100644
--- a/src/lib/util/aviio.c
+++ b/src/lib/util/aviio.c
@@ -107,8 +107,7 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _avi_chunk avi_chunk;
-struct _avi_chunk
+struct avi_chunk
{
UINT64 offset; /* file offset of chunk header */
UINT64 size; /* size of this chunk */
@@ -117,16 +116,14 @@ struct _avi_chunk
};
-typedef struct _avi_chunk_list avi_chunk_list;
-struct _avi_chunk_list
+struct avi_chunk_list
{
UINT64 offset; /* offset in the file of header */
UINT32 length; /* length of the chunk including header */
};
-typedef struct _huffyuv_table huffyuv_table;
-struct _huffyuv_table
+struct huffyuv_table
{
UINT8 shift[256]; /* bit shift amounts */
UINT32 bits[256]; /* bit match values */
@@ -136,16 +133,14 @@ struct _huffyuv_table
};
-typedef struct _huffyuv_data huffyuv_data;
-struct _huffyuv_data
+struct huffyuv_data
{
UINT8 predictor; /* predictor */
huffyuv_table table[3]; /* array of tables */
};
-typedef struct _avi_stream avi_stream;
-struct _avi_stream
+struct avi_stream
{
UINT32 type; /* subtype of stream */
UINT32 format; /* format of stream data */
diff --git a/src/lib/util/aviio.h b/src/lib/util/aviio.h
index 94c91b4d2e8..cf524a44381 100644
--- a/src/lib/util/aviio.h
+++ b/src/lib/util/aviio.h
@@ -107,8 +107,7 @@ typedef enum _avi_datatype avi_datatype;
typedef struct _avi_file avi_file;
-typedef struct _avi_movie_info avi_movie_info;
-struct _avi_movie_info
+struct avi_movie_info
{
UINT32 video_format; /* format of video data */
UINT32 video_timescale; /* timescale for video data */
diff --git a/src/lib/util/cdrom.h b/src/lib/util/cdrom.h
index 82818e37b67..8e3d776f99c 100644
--- a/src/lib/util/cdrom.h
+++ b/src/lib/util/cdrom.h
@@ -92,7 +92,6 @@ enum
typedef struct _cdrom_file cdrom_file;
-
struct cdrom_track_info
{
/* fields used by CHDMAN and in MAME */
diff --git a/src/lib/util/corefile.c b/src/lib/util/corefile.c
index 0a907aeabc4..ad32a0e4d1a 100644
--- a/src/lib/util/corefile.c
+++ b/src/lib/util/corefile.c
@@ -82,8 +82,7 @@ enum _text_file_type
typedef enum _text_file_type text_file_type;
-typedef struct _zlib_data zlib_data;
-struct _zlib_data
+struct zlib_data
{
z_stream stream;
UINT8 buffer[1024];
diff --git a/src/lib/util/jedparse.c b/src/lib/util/jedparse.c
index c03cea05664..fef7d2894ba 100644
--- a/src/lib/util/jedparse.c
+++ b/src/lib/util/jedparse.c
@@ -65,8 +65,7 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _parse_info parse_info;
-struct _parse_info
+struct parse_info
{
UINT16 checksum; /* checksum value */
UINT32 explicit_numfuses; /* explicitly specified number of fuses */
diff --git a/src/lib/util/jedparse.h b/src/lib/util/jedparse.h
index c1462fd77aa..05c9b61d510 100644
--- a/src/lib/util/jedparse.h
+++ b/src/lib/util/jedparse.h
@@ -62,8 +62,7 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _jed_data jed_data;
-struct _jed_data
+struct jed_data
{
UINT32 numfuses; /* number of defined fuses */
UINT8 fusemap[JED_MAX_FUSES / 8];/* array of bit-packed data */
diff --git a/src/lib/util/opresolv.h b/src/lib/util/opresolv.h
index 7048e8b1538..c5aad88ba2c 100644
--- a/src/lib/util/opresolv.h
+++ b/src/lib/util/opresolv.h
@@ -57,8 +57,7 @@ enum option_type
OPTIONTYPE_ENUM_VALUE
};
-typedef struct _option_guide option_guide;
-struct _option_guide
+struct option_guide
{
enum option_type option_type;
int parameter;
diff --git a/src/lib/util/palette.c b/src/lib/util/palette.c
index 6ba369d8bc6..10b7dfc0fe8 100644
--- a/src/lib/util/palette.c
+++ b/src/lib/util/palette.c
@@ -48,8 +48,7 @@
***************************************************************************/
/* object to track dirty states */
-typedef struct _dirty_state dirty_state;
-struct _dirty_state
+struct dirty_state
{
UINT32 * dirty; /* bitmap of dirty entries */
UINT32 mindirty; /* minimum dirty entry */
diff --git a/src/lib/util/png.c b/src/lib/util/png.c
index 2268d6d88cb..5bb930713a1 100644
--- a/src/lib/util/png.c
+++ b/src/lib/util/png.c
@@ -50,8 +50,7 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _image_data_chunk image_data_chunk;
-struct _image_data_chunk
+struct image_data_chunk
{
image_data_chunk * next;
int length;
@@ -59,8 +58,7 @@ struct _image_data_chunk
};
-typedef struct _png_private png_private;
-struct _png_private
+struct png_private
{
png_info * pnginfo;
image_data_chunk * idata;
diff --git a/src/lib/util/png.h b/src/lib/util/png.h
index 6d79014ee2c..9e00f423b11 100644
--- a/src/lib/util/png.h
+++ b/src/lib/util/png.h
@@ -109,8 +109,7 @@ typedef enum _png_error png_error;
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _png_text png_text;
-struct _png_text
+struct png_text
{
png_text * next;
const char * keyword; /* this is allocated */
@@ -118,8 +117,7 @@ struct _png_text
};
-typedef struct _png_info png_info;
-struct _png_info
+struct png_info
{
UINT8 * image;
UINT32 width, height;
diff --git a/src/lib/util/pool.c b/src/lib/util/pool.c
index 0067ceb43b7..97d6236f66d 100644
--- a/src/lib/util/pool.c
+++ b/src/lib/util/pool.c
@@ -58,8 +58,7 @@
***************************************************************************/
/* an object type entry */
-typedef struct _objtype_entry objtype_entry;
-struct _objtype_entry
+struct objtype_entry
{
objtype_entry * next;
UINT32 type;
@@ -69,8 +68,7 @@ struct _objtype_entry
/* an entry in a pool */
-typedef struct _object_entry object_entry;
-struct _object_entry
+struct object_entry
{
object_entry * next;
object_entry * globalnext;
@@ -84,8 +82,7 @@ struct _object_entry
/* a block of entry items */
-typedef struct _object_entry_block object_entry_block;
-struct _object_entry_block
+struct object_entry_block
{
object_entry_block *next;
object_entry entry[OBJECT_ENTRY_BLOCK];
diff --git a/src/lib/util/un7z.h b/src/lib/util/un7z.h
index d40d4fac296..1051887f81c 100644
--- a/src/lib/util/un7z.h
+++ b/src/lib/util/un7z.h
@@ -120,8 +120,7 @@ typedef enum __7z_error _7z_error;
***************************************************************************/
/* describes an open _7Z file */
-typedef struct __7z_file _7z_file;
-struct __7z_file
+struct _7z_file
{
const char * filename; /* copy of _7Z filename (for caching) */
diff --git a/src/lib/util/unzip.h b/src/lib/util/unzip.h
index 225776abde4..078d38c8736 100644
--- a/src/lib/util/unzip.h
+++ b/src/lib/util/unzip.h
@@ -73,8 +73,7 @@ typedef enum _zip_error zip_error;
***************************************************************************/
/* contains extracted file header information */
-typedef struct _zip_file_header zip_file_header;
-struct _zip_file_header
+struct zip_file_header
{
UINT32 signature; /* central file header signature */
UINT16 version_created; /* version made by */
@@ -102,8 +101,7 @@ struct _zip_file_header
/* contains extracted end of central directory information */
-typedef struct _zip_ecd zip_ecd;
-struct _zip_ecd
+struct zip_ecd
{
UINT32 signature; /* end of central dir signature */
UINT16 disk_number; /* number of this disk */
@@ -121,8 +119,7 @@ struct _zip_ecd
/* describes an open ZIP file */
-typedef struct _zip_file zip_file;
-struct _zip_file
+struct zip_file
{
const char * filename; /* copy of ZIP filename (for caching) */
osd_file * file; /* OSD file handle */
diff --git a/src/lib/util/vbiparse.h b/src/lib/util/vbiparse.h
index c78ba4fe277..b2fb6739f04 100644
--- a/src/lib/util/vbiparse.h
+++ b/src/lib/util/vbiparse.h
@@ -87,8 +87,7 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _vbi_metadata vbi_metadata;
-struct _vbi_metadata
+struct vbi_metadata
{
UINT8 white; /* white flag: on or off */
UINT32 line16; /* line 16 code */
diff --git a/src/lib/util/xmlfile.c b/src/lib/util/xmlfile.c
index 20b41770136..94abcd6a199 100644
--- a/src/lib/util/xmlfile.c
+++ b/src/lib/util/xmlfile.c
@@ -54,8 +54,7 @@
TYPE DEFINITIONS
***************************************************************************/
-typedef struct _xml_parse_info xml_parse_info;
-struct _xml_parse_info
+struct xml_parse_info
{
XML_Parser parser;
xml_data_node * rootnode;
diff --git a/src/lib/util/xmlfile.h b/src/lib/util/xmlfile.h
index 8f0a9c4a5b3..b422cb0ff07 100644
--- a/src/lib/util/xmlfile.h
+++ b/src/lib/util/xmlfile.h
@@ -75,8 +75,7 @@ struct XML_ParserStruct;
/* a node representing an attribute */
-typedef struct _xml_attribute_node xml_attribute_node;
-struct _xml_attribute_node
+struct xml_attribute_node
{
xml_attribute_node * next; /* pointer to next attribute node */
const char * name; /* pointer to copy of tag name */
@@ -85,8 +84,7 @@ struct _xml_attribute_node
/* a node representing a data item and its relationships */
-typedef struct _xml_data_node xml_data_node;
-struct _xml_data_node
+struct xml_data_node
{
xml_data_node * next; /* pointer to next sibling node */
xml_data_node * parent; /* pointer to parent node */
@@ -99,8 +97,7 @@ struct _xml_data_node
/* extended error information from parsing */
-typedef struct _xml_parse_error xml_parse_error;
-struct _xml_parse_error
+struct xml_parse_error
{
const char * error_message;
int error_line;
@@ -109,8 +106,7 @@ struct _xml_parse_error
/* parsing options */
-typedef struct _xml_parse_options xml_parse_options;
-struct _xml_parse_options
+struct xml_parse_options
{
xml_parse_error * error;
void (*init_parser)(struct XML_ParserStruct *parser);