summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/util')
-rw-r--r--src/lib/util/aviio.cpp52
-rw-r--r--src/lib/util/cdrom.cpp8
-rw-r--r--src/lib/util/cdrom.h6
-rw-r--r--src/lib/util/corefile.cpp2
-rw-r--r--src/lib/util/jedparse.h4
-rw-r--r--src/lib/util/png.cpp16
-rw-r--r--src/lib/util/pool.cpp4
-rw-r--r--src/lib/util/unzip.cpp8
8 files changed, 50 insertions, 50 deletions
diff --git a/src/lib/util/aviio.cpp b/src/lib/util/aviio.cpp
index 95d96ca6422..90918c06673 100644
--- a/src/lib/util/aviio.cpp
+++ b/src/lib/util/aviio.cpp
@@ -471,7 +471,7 @@ static void printf_chunk_recursive(avi_file *file, avi_chunk *chunk, int indent)
-------------------------------------------------*/
/**
- * @fn INLINE UINT16 fetch_16bits(const UINT8 *data)
+ * @fn static inline UINT16 fetch_16bits(const UINT8 *data)
*
* @brief Fetches the 16bits.
*
@@ -480,7 +480,7 @@ static void printf_chunk_recursive(avi_file *file, avi_chunk *chunk, int indent)
* @return The 16bits.
*/
-INLINE UINT16 fetch_16bits(const UINT8 *data)
+static inline UINT16 fetch_16bits(const UINT8 *data)
{
return data[0] | (data[1] << 8);
}
@@ -492,7 +492,7 @@ INLINE UINT16 fetch_16bits(const UINT8 *data)
-------------------------------------------------*/
/**
- * @fn INLINE UINT32 fetch_32bits(const UINT8 *data)
+ * @fn static inline UINT32 fetch_32bits(const UINT8 *data)
*
* @brief Fetches the 32bits.
*
@@ -501,7 +501,7 @@ INLINE UINT16 fetch_16bits(const UINT8 *data)
* @return The 32bits.
*/
-INLINE UINT32 fetch_32bits(const UINT8 *data)
+static inline UINT32 fetch_32bits(const UINT8 *data)
{
return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
}
@@ -513,7 +513,7 @@ INLINE UINT32 fetch_32bits(const UINT8 *data)
-------------------------------------------------*/
/**
- * @fn INLINE UINT64 fetch_64bits(const UINT8 *data)
+ * @fn static inline UINT64 fetch_64bits(const UINT8 *data)
*
* @brief Fetches the 64bits.
*
@@ -522,7 +522,7 @@ INLINE UINT32 fetch_32bits(const UINT8 *data)
* @return The 64bits.
*/
-INLINE UINT64 fetch_64bits(const UINT8 *data)
+static inline UINT64 fetch_64bits(const UINT8 *data)
{
return (UINT64)data[0] | ((UINT64)data[1] << 8) |
((UINT64)data[2] << 16) | ((UINT64)data[3] << 24) |
@@ -537,7 +537,7 @@ INLINE UINT64 fetch_64bits(const UINT8 *data)
-------------------------------------------------*/
/**
- * @fn INLINE void put_16bits(UINT8 *data, UINT16 value)
+ * @fn static inline void put_16bits(UINT8 *data, UINT16 value)
*
* @brief Puts the 16bits.
*
@@ -545,7 +545,7 @@ INLINE UINT64 fetch_64bits(const UINT8 *data)
* @param value The value.
*/
-INLINE void put_16bits(UINT8 *data, UINT16 value)
+static inline void put_16bits(UINT8 *data, UINT16 value)
{
data[0] = value >> 0;
data[1] = value >> 8;
@@ -558,7 +558,7 @@ INLINE void put_16bits(UINT8 *data, UINT16 value)
-------------------------------------------------*/
/**
- * @fn INLINE void put_32bits(UINT8 *data, UINT32 value)
+ * @fn static inline void put_32bits(UINT8 *data, UINT32 value)
*
* @brief Puts the 32bits.
*
@@ -566,7 +566,7 @@ INLINE void put_16bits(UINT8 *data, UINT16 value)
* @param value The value.
*/
-INLINE void put_32bits(UINT8 *data, UINT32 value)
+static inline void put_32bits(UINT8 *data, UINT32 value)
{
data[0] = value >> 0;
data[1] = value >> 8;
@@ -581,7 +581,7 @@ INLINE void put_32bits(UINT8 *data, UINT32 value)
-------------------------------------------------*/
/**
- * @fn INLINE void put_64bits(UINT8 *data, UINT64 value)
+ * @fn static inline void put_64bits(UINT8 *data, UINT64 value)
*
* @brief Puts the 64bits.
*
@@ -589,7 +589,7 @@ INLINE void put_32bits(UINT8 *data, UINT32 value)
* @param value The value.
*/
-INLINE void put_64bits(UINT8 *data, UINT64 value)
+static inline void put_64bits(UINT8 *data, UINT64 value)
{
data[0] = value >> 0;
data[1] = value >> 8;
@@ -608,7 +608,7 @@ INLINE void put_64bits(UINT8 *data, UINT64 value)
-------------------------------------------------*/
/**
- * @fn INLINE avi_stream *get_video_stream(avi_file *file)
+ * @fn static inline avi_stream *get_video_stream(avi_file *file)
*
* @brief Gets video stream.
*
@@ -617,7 +617,7 @@ INLINE void put_64bits(UINT8 *data, UINT64 value)
* @return null if it fails, else the video stream.
*/
-INLINE avi_stream *get_video_stream(avi_file *file)
+static inline avi_stream *get_video_stream(avi_file *file)
{
int streamnum;
@@ -636,7 +636,7 @@ INLINE avi_stream *get_video_stream(avi_file *file)
-------------------------------------------------*/
/**
- * @fn INLINE avi_stream *get_audio_stream(avi_file *file, int channel, int *offset)
+ * @fn static inline avi_stream *get_audio_stream(avi_file *file, int channel, int *offset)
*
* @brief Gets audio stream.
*
@@ -647,7 +647,7 @@ INLINE avi_stream *get_video_stream(avi_file *file)
* @return null if it fails, else the audio stream.
*/
-INLINE avi_stream *get_audio_stream(avi_file *file, int channel, int *offset)
+static inline avi_stream *get_audio_stream(avi_file *file, int channel, int *offset)
{
int streamnum;
@@ -674,7 +674,7 @@ INLINE avi_stream *get_audio_stream(avi_file *file, int channel, int *offset)
-------------------------------------------------*/
/**
- * @fn INLINE avi_error set_stream_chunk_info(avi_stream *stream, UINT32 index, UINT64 offset, UINT32 length)
+ * @fn static inline avi_error set_stream_chunk_info(avi_stream *stream, UINT32 index, UINT64 offset, UINT32 length)
*
* @brief Sets stream chunk information.
*
@@ -686,7 +686,7 @@ INLINE avi_stream *get_audio_stream(avi_file *file, int channel, int *offset)
* @return An avi_error.
*/
-INLINE avi_error set_stream_chunk_info(avi_stream *stream, UINT32 index, UINT64 offset, UINT32 length)
+static inline avi_error set_stream_chunk_info(avi_stream *stream, UINT32 index, UINT64 offset, UINT32 length)
{
/* if we need to allocate more, allocate more */
if (index >= stream->chunksalloc)
@@ -720,7 +720,7 @@ INLINE avi_error set_stream_chunk_info(avi_stream *stream, UINT32 index, UINT64
-------------------------------------------------*/
/**
- * @fn INLINE UINT32 compute_idx1_size(avi_file *file)
+ * @fn static inline UINT32 compute_idx1_size(avi_file *file)
*
* @brief Calculates the index 1 size.
*
@@ -729,7 +729,7 @@ INLINE avi_error set_stream_chunk_info(avi_stream *stream, UINT32 index, UINT64
* @return The calculated index 1 size.
*/
-INLINE UINT32 compute_idx1_size(avi_file *file)
+static inline UINT32 compute_idx1_size(avi_file *file)
{
int chunks = 0;
int strnum;
@@ -748,7 +748,7 @@ INLINE UINT32 compute_idx1_size(avi_file *file)
-------------------------------------------------*/
/**
- * @fn INLINE UINT32 get_chunkid_for_stream(avi_file *file, avi_stream *stream)
+ * @fn static inline UINT32 get_chunkid_for_stream(avi_file *file, avi_stream *stream)
*
* @brief Gets chunkid for stream.
*
@@ -758,7 +758,7 @@ INLINE UINT32 compute_idx1_size(avi_file *file)
* @return The chunkid for stream.
*/
-INLINE UINT32 get_chunkid_for_stream(avi_file *file, avi_stream *stream)
+static inline UINT32 get_chunkid_for_stream(avi_file *file, avi_stream *stream)
{
UINT32 chunkid;
@@ -778,7 +778,7 @@ INLINE UINT32 get_chunkid_for_stream(avi_file *file, avi_stream *stream)
-------------------------------------------------*/
/**
- * @fn INLINE UINT32 framenum_to_samplenum(avi_file *file, UINT32 framenum)
+ * @fn static inline UINT32 framenum_to_samplenum(avi_file *file, UINT32 framenum)
*
* @brief Framenum to samplenum.
*
@@ -788,7 +788,7 @@ INLINE UINT32 get_chunkid_for_stream(avi_file *file, avi_stream *stream)
* @return An UINT32.
*/
-INLINE UINT32 framenum_to_samplenum(avi_file *file, UINT32 framenum)
+static inline UINT32 framenum_to_samplenum(avi_file *file, UINT32 framenum)
{
return ((UINT64)file->info.audio_samplerate * (UINT64)framenum * (UINT64)file->info.video_sampletime + file->info.video_timescale - 1) / (UINT64)file->info.video_timescale;
}
@@ -801,7 +801,7 @@ INLINE UINT32 framenum_to_samplenum(avi_file *file, UINT32 framenum)
-------------------------------------------------*/
/**
- * @fn INLINE avi_error expand_tempbuffer(avi_file *file, UINT32 length)
+ * @fn static inline avi_error expand_tempbuffer(avi_file *file, UINT32 length)
*
* @brief Expand tempbuffer.
*
@@ -811,7 +811,7 @@ INLINE UINT32 framenum_to_samplenum(avi_file *file, UINT32 framenum)
* @return An avi_error.
*/
-INLINE avi_error expand_tempbuffer(avi_file *file, UINT32 length)
+static inline avi_error expand_tempbuffer(avi_file *file, UINT32 length)
{
/* expand the tempbuffer to hold the data if necessary */
if (length > file->tempbuffersize)
diff --git a/src/lib/util/cdrom.cpp b/src/lib/util/cdrom.cpp
index 917cb355839..a9a60ef97bd 100644
--- a/src/lib/util/cdrom.cpp
+++ b/src/lib/util/cdrom.cpp
@@ -130,7 +130,7 @@ struct cdrom_file
-------------------------------------------------*/
/**
- * @fn INLINE UINT32 physical_to_chd_lba(cdrom_file *file, UINT32 physlba, UINT32 &tracknum)
+ * @fn static inline UINT32 physical_to_chd_lba(cdrom_file *file, UINT32 physlba, UINT32 &tracknum)
*
* @brief Physical to chd lba.
*
@@ -141,7 +141,7 @@ struct cdrom_file
* @return An UINT32.
*/
-INLINE UINT32 physical_to_chd_lba(cdrom_file *file, UINT32 physlba, UINT32 &tracknum)
+static inline UINT32 physical_to_chd_lba(cdrom_file *file, UINT32 physlba, UINT32 &tracknum)
{
UINT32 chdlba;
int track;
@@ -164,7 +164,7 @@ INLINE UINT32 physical_to_chd_lba(cdrom_file *file, UINT32 physlba, UINT32 &trac
-------------------------------------------------*/
/**
- * @fn INLINE UINT32 logical_to_chd_lba(cdrom_file *file, UINT32 loglba, UINT32 &tracknum)
+ * @fn static inline UINT32 logical_to_chd_lba(cdrom_file *file, UINT32 loglba, UINT32 &tracknum)
*
* @brief Logical to chd lba.
*
@@ -175,7 +175,7 @@ INLINE UINT32 physical_to_chd_lba(cdrom_file *file, UINT32 physlba, UINT32 &trac
* @return An UINT32.
*/
-INLINE UINT32 logical_to_chd_lba(cdrom_file *file, UINT32 loglba, UINT32 &tracknum)
+static inline UINT32 logical_to_chd_lba(cdrom_file *file, UINT32 loglba, UINT32 &tracknum)
{
UINT32 chdlba, physlba;
int track;
diff --git a/src/lib/util/cdrom.h b/src/lib/util/cdrom.h
index c0115701e35..c495a405513 100644
--- a/src/lib/util/cdrom.h
+++ b/src/lib/util/cdrom.h
@@ -145,12 +145,12 @@ void ecc_clear(UINT8 *sector);
INLINE FUNCTIONS
***************************************************************************/
-INLINE UINT32 msf_to_lba(UINT32 msf)
+static inline UINT32 msf_to_lba(UINT32 msf)
{
return ( ((msf&0x00ff0000)>>16) * 60 * 75) + (((msf&0x0000ff00)>>8) * 75) + ((msf&0x000000ff)>>0);
}
-INLINE UINT32 lba_to_msf(UINT32 lba)
+static inline UINT32 lba_to_msf(UINT32 lba)
{
UINT8 m, s, f;
@@ -167,7 +167,7 @@ INLINE UINT32 lba_to_msf(UINT32 lba)
// segacd needs it like this.. investigate
// Angelo also says PCE tracks often start playing at the
// wrong address.. related?
-INLINE UINT32 lba_to_msf_alt(int lba)
+static inline UINT32 lba_to_msf_alt(int lba)
{
UINT32 ret = 0;
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index b7e389a35f7..a2242c133c6 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -104,7 +104,7 @@ static file_error osd_or_zlib_write(core_file *file, const void *buffer, UINT64
works for most platforms
-------------------------------------------------*/
-INLINE int is_directory_separator(char c)
+static inline int is_directory_separator(char c)
{
return (c == '\\' || c == '/' || c == ':');
}
diff --git a/src/lib/util/jedparse.h b/src/lib/util/jedparse.h
index 1615f25af34..0f23462b995 100644
--- a/src/lib/util/jedparse.h
+++ b/src/lib/util/jedparse.h
@@ -63,7 +63,7 @@ size_t jedbin_output(const jed_data *data, void *result, size_t length);
INLINE FUNCTIONS
***************************************************************************/
-INLINE int jed_get_fuse(const jed_data *data, UINT32 fusenum)
+static inline int jed_get_fuse(const jed_data *data, UINT32 fusenum)
{
if (fusenum < JED_MAX_FUSES)
return (data->fusemap[fusenum / 8] >> (fusenum % 8)) & 1;
@@ -72,7 +72,7 @@ INLINE int jed_get_fuse(const jed_data *data, UINT32 fusenum)
}
-INLINE void jed_set_fuse(jed_data *data, UINT32 fusenum, UINT8 value)
+static inline void jed_set_fuse(jed_data *data, UINT32 fusenum, UINT8 value)
{
if (fusenum < JED_MAX_FUSES)
{
diff --git a/src/lib/util/png.cpp b/src/lib/util/png.cpp
index 6e57d949f47..a6b269593ef 100644
--- a/src/lib/util/png.cpp
+++ b/src/lib/util/png.cpp
@@ -53,51 +53,51 @@ static const int samples[] = { 1, 0, 3, 1, 2, 0, 4 };
INLINE FUNCTIONS
***************************************************************************/
-INLINE UINT8 fetch_8bit(UINT8 *v)
+static inline UINT8 fetch_8bit(UINT8 *v)
{
return *v;
}
#ifdef UNUSED_FUNCTION
-INLINE UINT16 fetch_16bit(UINT8 *v)
+static inline UINT16 fetch_16bit(UINT8 *v)
{
return BIG_ENDIANIZE_INT16(*(UINT16 *)v);
}
#endif
-INLINE UINT32 fetch_32bit(UINT8 *v)
+static inline UINT32 fetch_32bit(UINT8 *v)
{
return BIG_ENDIANIZE_INT32(*(UINT32 *)v);
}
-INLINE void put_8bit(UINT8 *v, UINT8 data)
+static inline void put_8bit(UINT8 *v, UINT8 data)
{
*v = data;
}
#ifdef UNUSED_FUNCTION
-INLINE void put_16bit(UINT8 *v, UINT16 data)
+static inline void put_16bit(UINT8 *v, UINT16 data)
{
*(UINT16 *)v = BIG_ENDIANIZE_INT16(data);
}
#endif
-INLINE void put_32bit(UINT8 *v, UINT32 data)
+static inline void put_32bit(UINT8 *v, UINT32 data)
{
*(UINT32 *)v = BIG_ENDIANIZE_INT32(data);
}
-INLINE int compute_bpp(const png_info *pnginfo)
+static inline int compute_bpp(const png_info *pnginfo)
{
return samples[pnginfo->color_type] * pnginfo->bit_depth / 8;
}
-INLINE int compute_rowbytes(const png_info *pnginfo)
+static inline int compute_rowbytes(const png_info *pnginfo)
{
return (pnginfo->width * samples[pnginfo->color_type] * pnginfo->bit_depth + 7) / 8;
}
diff --git a/src/lib/util/pool.cpp b/src/lib/util/pool.cpp
index e004f236b76..9712d8b6e00 100644
--- a/src/lib/util/pool.cpp
+++ b/src/lib/util/pool.cpp
@@ -100,7 +100,7 @@ static void report_failure(object_pool *pool, const char *format, ...) ATTR_PRIN
object
-------------------------------------------------*/
-INLINE int hash_object(void *object)
+static inline int hash_object(void *object)
{
return ((size_t)object >> 4) % POOL_HASH_SIZE;
}
@@ -111,7 +111,7 @@ INLINE int hash_object(void *object)
a given object type
-------------------------------------------------*/
-INLINE objtype_entry *get_object_type(object_pool *pool, object_type type)
+static inline objtype_entry *get_object_type(object_pool *pool, object_type type)
{
objtype_entry *entry;
diff --git a/src/lib/util/unzip.cpp b/src/lib/util/unzip.cpp
index a8f3ca434e2..876d8ae90c5 100644
--- a/src/lib/util/unzip.cpp
+++ b/src/lib/util/unzip.cpp
@@ -99,7 +99,7 @@
***************************************************************************/
/**
- * @fn INLINE UINT16 read_word(UINT8 *buf)
+ * @fn static inline UINT16 read_word(UINT8 *buf)
*
* @brief Reads a word.
*
@@ -108,13 +108,13 @@
* @return The word.
*/
-INLINE UINT16 read_word(UINT8 *buf)
+static inline UINT16 read_word(UINT8 *buf)
{
return (buf[1] << 8) | buf[0];
}
/**
- * @fn INLINE UINT32 read_dword(UINT8 *buf)
+ * @fn static inline UINT32 read_dword(UINT8 *buf)
*
* @brief Reads a double word.
*
@@ -123,7 +123,7 @@ INLINE UINT16 read_word(UINT8 *buf)
* @return The double word.
*/
-INLINE UINT32 read_dword(UINT8 *buf)
+static inline UINT32 read_dword(UINT8 *buf)
{
return (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
}