winelib: Replace inline static with static inline

Andrew Talbot Andrew.Talbot at talbotville.com
Mon Mar 26 14:26:29 CDT 2007


Changelog:
    winelib: Replace inline static with static inline.

diff -urN a/include/wine/debug.h b/include/wine/debug.h
--- a/include/wine/debug.h	2007-01-18 18:11:16.000000000 +0000
+++ b/include/wine/debug.h	2007-03-26 20:15:36.000000000 +0100
@@ -253,11 +253,11 @@
 #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)
diff -urN a/include/wine/library.h b/include/wine/library.h
--- a/include/wine/library.h	2007-03-11 16:45:54.000000000 +0000
+++ b/include/wine/library.h	2007-03-26 20:15:36.000000000 +0100
@@ -125,31 +125,31 @@
 #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 @@
     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 @@
 #  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)
diff -urN a/include/wine/list.h b/include/wine/list.h
--- a/include/wine/list.h	2007-01-22 17:42:31.000000000 +0000
+++ b/include/wine/list.h	2007-03-26 20:15:36.000000000 +0100
@@ -63,7 +63,7 @@
  */
 
 /* 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 @@
 }
 
 /* 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 @@
 }
 
 /* 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 @@
 }
 
 /* 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 @@
 }
 
 /* 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 @@
 }
 
 /* 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 @@
 }
 
 /* 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;
 
diff -urN a/include/wine/server.h b/include/wine/server.h
--- a/include/wine/server.h	2006-07-26 10:23:31.000000000 +0100
+++ b/include/wine/server.h	2007-03-26 20:15:36.000000000 +0100
@@ -56,7 +56,7 @@
 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 @@
 }
 
 /* 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 @@
 }
 
 /* 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;
diff -urN a/libs/wine/config.c b/libs/wine/config.c
--- a/libs/wine/config.c	2007-03-19 17:27:12.000000000 +0000
+++ b/libs/wine/config.c	2007-03-26 20:18:17.000000000 +0100
@@ -98,7 +98,7 @@
 }
 
 /* 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;
diff -urN a/libs/wine/loader.c b/libs/wine/loader.c
--- a/libs/wine/loader.c	2007-01-26 17:29:03.000000000 +0000
+++ b/libs/wine/loader.c	2007-03-26 20:18:17.000000000 +0100
@@ -147,14 +147,14 @@
 }
 
 /* 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 @@
 
 
 /* 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 );
 }
diff -urN a/libs/wine/utf8.c b/libs/wine/utf8.c
--- a/libs/wine/utf8.c	2007-03-15 17:32:05.000000000 +0000
+++ b/libs/wine/utf8.c	2007-03-26 20:18:17.000000000 +0100
@@ -150,7 +150,7 @@
 }
 
 /* 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;



More information about the wine-patches mailing list