Commit 4125821a authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

winelib: Replace inline static with static inline.

parent 79205875
......@@ -253,11 +253,11 @@ static inline const char *wine_dbgstr_longlong( ULONGLONG ll )
#ifdef __WINESRC__
/* Wine uses shorter names that are very likely to conflict with other software */
inline static const char *debugstr_an( const char * s, int n ) { return wine_dbgstr_an( s, n ); }
inline static const char *debugstr_wn( const WCHAR *s, int n ) { return wine_dbgstr_wn( s, n ); }
inline static const char *debugstr_guid( const struct _GUID *id ) { return wine_dbgstr_guid(id); }
inline static const char *debugstr_a( const char *s ) { return wine_dbgstr_an( s, -1 ); }
inline static const char *debugstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
static inline const char *debugstr_an( const char * s, int n ) { return wine_dbgstr_an( s, n ); }
static inline const char *debugstr_wn( const WCHAR *s, int n ) { return wine_dbgstr_wn( s, n ); }
static inline const char *debugstr_guid( const struct _GUID *id ) { return wine_dbgstr_guid(id); }
static inline const char *debugstr_a( const char *s ) { return wine_dbgstr_an( s, -1 ); }
static inline const char *debugstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
#define TRACE WINE_TRACE
#define TRACE_(ch) WINE_TRACE_(ch)
......
......@@ -125,31 +125,31 @@ WINE_LDT_EXTERN struct __wine_ldt_copy
#define WINE_LDT_FLAGS_ALLOCATED 0x80 /* Segment is allocated (no longer free) */
/* helper functions to manipulate the LDT_ENTRY structure */
inline static void wine_ldt_set_base( LDT_ENTRY *ent, const void *base )
static inline void wine_ldt_set_base( LDT_ENTRY *ent, const void *base )
{
ent->BaseLow = (WORD)(unsigned long)base;
ent->HighWord.Bits.BaseMid = (BYTE)((unsigned long)base >> 16);
ent->HighWord.Bits.BaseHi = (BYTE)((unsigned long)base >> 24);
}
inline static void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit )
static inline void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit )
{
if ((ent->HighWord.Bits.Granularity = (limit >= 0x100000))) limit >>= 12;
ent->LimitLow = (WORD)limit;
ent->HighWord.Bits.LimitHi = (limit >> 16);
}
inline static void *wine_ldt_get_base( const LDT_ENTRY *ent )
static inline void *wine_ldt_get_base( const LDT_ENTRY *ent )
{
return (void *)(ent->BaseLow |
(unsigned long)ent->HighWord.Bits.BaseMid << 16 |
(unsigned long)ent->HighWord.Bits.BaseHi << 24);
}
inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent )
static inline unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent )
{
unsigned int limit = ent->LimitLow | (ent->HighWord.Bits.LimitHi << 16);
if (ent->HighWord.Bits.Granularity) limit = (limit << 12) | 0xfff;
return limit;
}
inline static void wine_ldt_set_flags( LDT_ENTRY *ent, unsigned char flags )
static inline void wine_ldt_set_flags( LDT_ENTRY *ent, unsigned char flags )
{
ent->HighWord.Bits.Dpl = 3;
ent->HighWord.Bits.Pres = 1;
......@@ -158,13 +158,13 @@ inline static void wine_ldt_set_flags( LDT_ENTRY *ent, unsigned char flags )
ent->HighWord.Bits.Reserved_0 = 0;
ent->HighWord.Bits.Default_Big = (flags & WINE_LDT_FLAGS_32BIT) != 0;
}
inline static unsigned char wine_ldt_get_flags( const LDT_ENTRY *ent )
static inline unsigned char wine_ldt_get_flags( const LDT_ENTRY *ent )
{
unsigned char ret = ent->HighWord.Bits.Type;
if (ent->HighWord.Bits.Default_Big) ret |= WINE_LDT_FLAGS_32BIT;
return ret;
}
inline static int wine_ldt_is_empty( const LDT_ENTRY *ent )
static inline int wine_ldt_is_empty( const LDT_ENTRY *ent )
{
const DWORD *dw = (const DWORD *)ent;
return (dw[0] | dw[1]) == 0;
......@@ -194,8 +194,8 @@ inline static int wine_ldt_is_empty( const LDT_ENTRY *ent )
# define __DEFINE_SET_SEG(seg) extern void wine_set_##seg(unsigned int);
# endif /* __GNUC__ || _MSC_VER */
#else /* __i386__ */
# define __DEFINE_GET_SEG(seg) inline static unsigned short wine_get_##seg(void) { return 0; }
# define __DEFINE_SET_SEG(seg) inline static void wine_set_##seg(int val) { /* nothing */ }
# define __DEFINE_GET_SEG(seg) static inline unsigned short wine_get_##seg(void) { return 0; }
# define __DEFINE_SET_SEG(seg) static inline void wine_set_##seg(int val) { /* nothing */ }
#endif /* __i386__ */
__DEFINE_GET_SEG(cs)
......
......@@ -63,7 +63,7 @@ struct list
*/
/* add an element after the specified one */
inline static void list_add_after( struct list *elem, struct list *to_add )
static inline void list_add_after( struct list *elem, struct list *to_add )
{
to_add->next = elem->next;
to_add->prev = elem;
......@@ -72,7 +72,7 @@ inline static void list_add_after( struct list *elem, struct list *to_add )
}
/* add an element before the specified one */
inline static void list_add_before( struct list *elem, struct list *to_add )
static inline void list_add_before( struct list *elem, struct list *to_add )
{
to_add->next = elem;
to_add->prev = elem->prev;
......@@ -81,26 +81,26 @@ inline static void list_add_before( struct list *elem, struct list *to_add )
}
/* add element at the head of the list */
inline static void list_add_head( struct list *list, struct list *elem )
static inline void list_add_head( struct list *list, struct list *elem )
{
list_add_after( list, elem );
}
/* add element at the tail of the list */
inline static void list_add_tail( struct list *list, struct list *elem )
static inline void list_add_tail( struct list *list, struct list *elem )
{
list_add_before( list, elem );
}
/* remove an element from its list */
inline static void list_remove( struct list *elem )
static inline void list_remove( struct list *elem )
{
elem->next->prev = elem->prev;
elem->prev->next = elem->next;
}
/* get the next element */
inline static struct list *list_next( const struct list *list, const struct list *elem )
static inline struct list *list_next( const struct list *list, const struct list *elem )
{
struct list *ret = elem->next;
if (elem->next == list) ret = NULL;
......@@ -108,7 +108,7 @@ inline static struct list *list_next( const struct list *list, const struct list
}
/* get the previous element */
inline static struct list *list_prev( const struct list *list, const struct list *elem )
static inline struct list *list_prev( const struct list *list, const struct list *elem )
{
struct list *ret = elem->prev;
if (elem->prev == list) ret = NULL;
......@@ -116,31 +116,31 @@ inline static struct list *list_prev( const struct list *list, const struct list
}
/* get the first element */
inline static struct list *list_head( const struct list *list )
static inline struct list *list_head( const struct list *list )
{
return list_next( list, list );
}
/* get the last element */
inline static struct list *list_tail( const struct list *list )
static inline struct list *list_tail( const struct list *list )
{
return list_prev( list, list );
}
/* check if a list is empty */
inline static int list_empty( const struct list *list )
static inline int list_empty( const struct list *list )
{
return list->next == list;
}
/* initialize a list */
inline static void list_init( struct list *list )
static inline void list_init( struct list *list )
{
list->next = list->prev = list;
}
/* count the elements of a list */
inline static unsigned int list_count( const struct list *list )
static inline unsigned int list_count( const struct list *list )
{
unsigned count = 0;
const struct list *ptr;
......@@ -149,7 +149,7 @@ inline static unsigned int list_count( const struct list *list )
}
/* move all elements from src to the tail of dst */
inline static void list_move_tail( struct list *dst, struct list *src )
static inline void list_move_tail( struct list *dst, struct list *src )
{
if (list_empty(src)) return;
......@@ -161,7 +161,7 @@ inline static void list_move_tail( struct list *dst, struct list *src )
}
/* move all elements from src to the head of dst */
inline static void list_move_head( struct list *dst, struct list *src )
static inline void list_move_head( struct list *dst, struct list *src )
{
if (list_empty(src)) return;
......
......@@ -56,7 +56,7 @@ extern int wine_server_handle_to_fd( obj_handle_t handle, unsigned int access, i
extern void wine_server_release_fd( obj_handle_t handle, int unix_fd );
/* do a server call and set the last error code */
inline static unsigned int wine_server_call_err( void *req_ptr )
static inline unsigned int wine_server_call_err( void *req_ptr )
{
unsigned int res = wine_server_call( req_ptr );
if (res) SetLastError( RtlNtStatusToDosError(res) );
......@@ -64,13 +64,13 @@ inline static unsigned int wine_server_call_err( void *req_ptr )
}
/* get the size of the variable part of the returned reply */
inline static data_size_t wine_server_reply_size( const void *reply )
static inline data_size_t wine_server_reply_size( const void *reply )
{
return ((const struct reply_header *)reply)->reply_size;
}
/* add some data to be sent along with the request */
inline static void wine_server_add_data( void *req_ptr, const void *ptr, data_size_t size )
static inline void wine_server_add_data( void *req_ptr, const void *ptr, data_size_t size )
{
struct __server_request_info * const req = req_ptr;
if (size)
......@@ -82,7 +82,7 @@ inline static void wine_server_add_data( void *req_ptr, const void *ptr, data_si
}
/* set the pointer and max size for the reply var data */
inline static void wine_server_set_reply( void *req_ptr, void *ptr, data_size_t max_size )
static inline void wine_server_set_reply( void *req_ptr, void *ptr, data_size_t max_size )
{
struct __server_request_info * const req = req_ptr;
req->reply_data = ptr;
......
......@@ -98,7 +98,7 @@ static char *xstrdup( const char *str )
}
/* remove all trailing slashes from a path name */
inline static void remove_trailing_slashes( char *path )
static inline void remove_trailing_slashes( char *path )
{
int len = strlen( path );
while (len > 1 && path[len-1] == '/') path[--len] = 0;
......
......@@ -147,14 +147,14 @@ static void build_dll_path(void)
}
/* check if a given file can be opened */
inline static int file_exists( const char *name )
static inline int file_exists( const char *name )
{
int fd = open( name, O_RDONLY );
if (fd != -1) close( fd );
return (fd != -1);
}
inline static char *prepend( char *buffer, const char *str, size_t len )
static inline char *prepend( char *buffer, const char *str, size_t len )
{
return memcpy( buffer - len, str, len );
}
......@@ -217,7 +217,7 @@ static char *first_dll_path( const char *name, const char *ext, struct dll_path_
/* free the dll path context created by first_dll_path */
inline static void free_dll_path( struct dll_path_context *context )
static inline void free_dll_path( struct dll_path_context *context )
{
free( context->buffer );
}
......
......@@ -150,7 +150,7 @@ int wine_utf8_wcstombs( int flags, const WCHAR *src, int srclen, char *dst, int
}
/* query necessary dst length for src string */
inline static int get_length_mbs_utf8( int flags, const char *src, int srclen )
static inline int get_length_mbs_utf8( int flags, const char *src, int srclen )
{
int len, ret = 0;
unsigned int res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment