user32: Replace inline static with static inline

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Mar 17 05:34:08 CDT 2007


Changelog:
    user32: Replace inline static with static inline.

diff -urN a/dlls/user32/button.c b/dlls/user32/button.c
--- a/dlls/user32/button.c	2007-02-06 22:19:01.000000000 +0000
+++ b/dlls/user32/button.c	2007-03-17 10:32:17.000000000 +0000
@@ -171,33 +171,33 @@
 };
 
 
-inline static LONG get_button_state( HWND hwnd )
+static inline LONG get_button_state( HWND hwnd )
 {
     return GetWindowLongW( hwnd, STATE_GWL_OFFSET );
 }
 
-inline static void set_button_state( HWND hwnd, LONG state )
+static inline void set_button_state( HWND hwnd, LONG state )
 {
     SetWindowLongW( hwnd, STATE_GWL_OFFSET, state );
 }
 
-inline static HFONT get_button_font( HWND hwnd )
+static inline HFONT get_button_font( HWND hwnd )
 {
     return (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET );
 }
 
-inline static void set_button_font( HWND hwnd, HFONT font )
+static inline void set_button_font( HWND hwnd, HFONT font )
 {
     SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, (LONG_PTR)font );
 }
 
-inline static UINT get_button_type( LONG window_style )
+static inline UINT get_button_type( LONG window_style )
 {
     return (window_style & 0x0f);
 }
 
 /* paint a button of any type */
-inline static void paint_button( HWND hwnd, LONG style, UINT action )
+static inline void paint_button( HWND hwnd, LONG style, UINT action )
 {
     if (btnPaintFunc[style] && IsWindowVisible(hwnd))
     {
@@ -208,7 +208,7 @@
 }
 
 /* retrieve the button text; returned buffer must be freed by caller */
-inline static WCHAR *get_button_text( HWND hwnd )
+static inline WCHAR *get_button_text( HWND hwnd )
 {
     INT len = 512;
     WCHAR *buffer = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) );
diff -urN a/dlls/user32/class.c b/dlls/user32/class.c
--- a/dlls/user32/class.c	2006-12-28 14:19:59.000000000 +0000
+++ b/dlls/user32/class.c	2007-03-17 10:32:17.000000000 +0000
@@ -92,7 +92,7 @@
 /***********************************************************************
  *           release_class_ptr
  */
-inline static void release_class_ptr( CLASS *ptr )
+static inline void release_class_ptr( CLASS *ptr )
 {
     USER_Unlock();
 }
@@ -154,7 +154,7 @@
  *
  * Get the menu name as a ASCII string.
  */
-inline static LPSTR CLASS_GetMenuNameA( CLASS *classPtr )
+static inline LPSTR CLASS_GetMenuNameA( CLASS *classPtr )
 {
     if (!HIWORD(classPtr->menuName)) return (LPSTR)classPtr->menuName;
     return (LPSTR)(classPtr->menuName + strlenW(classPtr->menuName) + 1);
@@ -166,7 +166,7 @@
  *
  * Get the menu name as a Unicode string.
  */
-inline static LPWSTR CLASS_GetMenuNameW( CLASS *classPtr )
+static inline LPWSTR CLASS_GetMenuNameW( CLASS *classPtr )
 {
     return classPtr->menuName;
 }
diff -urN a/dlls/user32/driver16.c b/dlls/user32/driver16.c
--- a/dlls/user32/driver16.c	2006-11-16 14:02:17.000000000 +0000
+++ b/dlls/user32/driver16.c	2007-03-17 10:32:17.000000000 +0000
@@ -116,7 +116,7 @@
 /**************************************************************************
  *				DRIVER_SendMessage		[internal]
  */
-inline static LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg,
+static inline LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg,
 					 LPARAM lParam1, LPARAM lParam2)
 {
     WORD args[8];
diff -urN a/dlls/user32/hook16.c b/dlls/user32/hook16.c
--- a/dlls/user32/hook16.c	2006-11-16 14:02:17.000000000 +0000
+++ b/dlls/user32/hook16.c	2007-03-17 10:32:17.000000000 +0000
@@ -77,7 +77,7 @@
 /***********************************************************************
  *           map_msg_16_to_32
  */
-inline static void map_msg_16_to_32( const MSG16 *msg16, MSG *msg32 )
+static inline void map_msg_16_to_32( const MSG16 *msg16, MSG *msg32 )
 {
     msg32->hwnd    = WIN_Handle32(msg16->hwnd);
     msg32->message = msg16->message;
@@ -92,7 +92,7 @@
 /***********************************************************************
  *           map_msg_32_to_16
  */
-inline static void map_msg_32_to_16( const MSG *msg32, MSG16 *msg16 )
+static inline void map_msg_32_to_16( const MSG *msg32, MSG16 *msg16 )
 {
     msg16->hwnd    = HWND_16(msg32->hwnd);
     msg16->message = msg32->message;
diff -urN a/dlls/user32/hook.c b/dlls/user32/hook.c
--- a/dlls/user32/hook.c	2006-11-20 12:24:22.000000000 +0000
+++ b/dlls/user32/hook.c	2007-03-17 10:32:17.000000000 +0000
@@ -721,7 +721,7 @@
     return ret;
 }
 
-inline static BOOL find_first_hook(DWORD id, DWORD event, HWND hwnd, LONG object_id,
+static inline BOOL find_first_hook(DWORD id, DWORD event, HWND hwnd, LONG object_id,
                                    LONG child_id, struct hook_info *info)
 {
     struct user_thread_info *thread_info = get_user_thread_info();
@@ -755,7 +755,7 @@
     return ret && (info->tid || info->proc);
 }
 
-inline static BOOL find_next_hook(DWORD event, HWND hwnd, LONG object_id,
+static inline BOOL find_next_hook(DWORD event, HWND hwnd, LONG object_id,
                                   LONG child_id, struct hook_info *info)
 {
     BOOL ret;
@@ -782,7 +782,7 @@
     return ret;
 }
 
-inline static void find_hook_close(DWORD id)
+static inline void find_hook_close(DWORD id)
 {
     SERVER_START_REQ( finish_hook_chain )
     {
diff -urN a/dlls/user32/listbox.c b/dlls/user32/listbox.c
--- a/dlls/user32/listbox.c	2007-02-09 17:32:25.000000000 +0000
+++ b/dlls/user32/listbox.c	2007-03-17 10:32:17.000000000 +0000
@@ -165,7 +165,7 @@
 
 
 /* check whether app is a Win 3.1 app */
-inline static BOOL is_old_app( LB_DESCR *descr )
+static inline BOOL is_old_app( LB_DESCR *descr )
 {
     return (GetExpWinVer16( GetWindowLongPtrW(descr->self, GWLP_HINSTANCE) ) & 0xFF00 ) == 0x0300;
 }
diff -urN a/dlls/user32/menu.c b/dlls/user32/menu.c
--- a/dlls/user32/menu.c	2007-02-05 17:39:19.000000000 +0000
+++ b/dlls/user32/menu.c	2007-03-17 10:32:17.000000000 +0000
@@ -4524,7 +4524,7 @@
 
 
 /* set a menu item text from a ASCII or Unicode string */
-inline static void set_menu_item_text( MENUITEM *menu, LPCWSTR text, BOOL unicode )
+static inline void set_menu_item_text( MENUITEM *menu, LPCWSTR text, BOOL unicode )
 {
     if (!text)
         menu->text = NULL;
diff -urN a/dlls/user32/message.c b/dlls/user32/message.c
--- a/dlls/user32/message.c	2007-02-26 17:43:12.000000000 +0000
+++ b/dlls/user32/message.c	2007-03-17 10:32:17.000000000 +0000
@@ -212,14 +212,14 @@
 };
 
 /* check whether a given message type includes pointers */
-inline static int is_pointer_message( UINT message )
+static inline int is_pointer_message( UINT message )
 {
     if (message >= 8*sizeof(message_pointer_flags)) return FALSE;
     return (message_pointer_flags[message / 32] & SET(message)) != 0;
 }
 
 /* check whether a given message type contains Unicode (or ASCII) chars */
-inline static int is_unicode_message( UINT message )
+static inline int is_unicode_message( UINT message )
 {
     if (message >= 8*sizeof(message_unicode_flags)) return FALSE;
     return (message_unicode_flags[message / 32] & SET(message)) != 0;
@@ -228,7 +228,7 @@
 #undef SET
 
 /* add a data field to a packed message */
-inline static void push_data( struct packed_message *data, const void *ptr, size_t size )
+static inline void push_data( struct packed_message *data, const void *ptr, size_t size )
 {
     data->data[data->count] = ptr;
     data->size[data->count] = size;
@@ -236,13 +236,13 @@
 }
 
 /* add a string to a packed message */
-inline static void push_string( struct packed_message *data, LPCWSTR str )
+static inline void push_string( struct packed_message *data, LPCWSTR str )
 {
     push_data( data, str, (strlenW(str) + 1) * sizeof(WCHAR) );
 }
 
 /* retrieve a pointer to data from a packed message and increment the buffer pointer */
-inline static void *get_data( void **buffer, size_t size )
+static inline void *get_data( void **buffer, size_t size )
 {
     void *ret = *buffer;
     *buffer = (char *)*buffer + size;
@@ -250,7 +250,7 @@
 }
 
 /* make sure that the buffer contains a valid null-terminated Unicode string */
-inline static BOOL check_string( LPCWSTR str, size_t size )
+static inline BOOL check_string( LPCWSTR str, size_t size )
 {
     for (size /= sizeof(WCHAR); size; size--, str++)
         if (!*str) return TRUE;
@@ -258,7 +258,7 @@
 }
 
 /* make sure that there is space for 'size' bytes in buffer, growing it if needed */
-inline static void *get_buffer_space( void **buffer, size_t size )
+static inline void *get_buffer_space( void **buffer, size_t size )
 {
     void *ret;
 
@@ -274,34 +274,34 @@
 }
 
 /* check whether a combobox expects strings or ids in CB_ADDSTRING/CB_INSERTSTRING */
-inline static BOOL combobox_has_strings( HWND hwnd )
+static inline BOOL combobox_has_strings( HWND hwnd )
 {
     DWORD style = GetWindowLongA( hwnd, GWL_STYLE );
     return (!(style & (CBS_OWNERDRAWFIXED | CBS_OWNERDRAWVARIABLE)) || (style & CBS_HASSTRINGS));
 }
 
 /* check whether a listbox expects strings or ids in LB_ADDSTRING/LB_INSERTSTRING */
-inline static BOOL listbox_has_strings( HWND hwnd )
+static inline BOOL listbox_has_strings( HWND hwnd )
 {
     DWORD style = GetWindowLongA( hwnd, GWL_STYLE );
     return (!(style & (LBS_OWNERDRAWFIXED | LBS_OWNERDRAWVARIABLE)) || (style & LBS_HASSTRINGS));
 }
 
 /* check whether message is in the range of keyboard messages */
-inline static BOOL is_keyboard_message( UINT message )
+static inline BOOL is_keyboard_message( UINT message )
 {
     return (message >= WM_KEYFIRST && message <= WM_KEYLAST);
 }
 
 /* check whether message is in the range of mouse messages */
-inline static BOOL is_mouse_message( UINT message )
+static inline BOOL is_mouse_message( UINT message )
 {
     return ((message >= WM_NCMOUSEFIRST && message <= WM_NCMOUSELAST) ||
             (message >= WM_MOUSEFIRST && message <= WM_MOUSELAST));
 }
 
 /* check whether message matches the specified hwnd filter */
-inline static BOOL check_hwnd_filter( const MSG *msg, HWND hwnd_filter )
+static inline BOOL check_hwnd_filter( const MSG *msg, HWND hwnd_filter )
 {
     if (!hwnd_filter) return TRUE;
     return (msg->hwnd == hwnd_filter || IsChild( hwnd_filter, msg->hwnd ));
@@ -2114,7 +2114,7 @@
  *
  * Process all pending sent messages.
  */
-inline static void process_sent_messages(void)
+static inline void process_sent_messages(void)
 {
     MSG msg;
     peek_message( &msg, 0, 0, 0, PM_REMOVE | PM_QS_SENDMESSAGE );
diff -urN a/dlls/user32/scroll.c b/dlls/user32/scroll.c
--- a/dlls/user32/scroll.c	2006-11-16 14:02:17.000000000 +0000
+++ b/dlls/user32/scroll.c	2007-03-17 10:32:18.000000000 +0000
@@ -131,7 +131,7 @@
  *  Determine if the supplied SCROLLINFO struct is valid.
  *  info     [in] The SCROLLINFO struct to be tested
  */
-inline static BOOL SCROLL_ScrollInfoValid( LPCSCROLLINFO info )
+static inline BOOL SCROLL_ScrollInfoValid( LPCSCROLLINFO info )
 {
     return !(info->fMask & ~(SIF_ALL | SIF_DISABLENOSCROLL)
         || (info->cbSize != sizeof(*info)
diff -urN a/dlls/user32/spy.c b/dlls/user32/spy.c
--- a/dlls/user32/spy.c	2007-02-05 17:39:19.000000000 +0000
+++ b/dlls/user32/spy.c	2007-03-17 10:32:18.000000000 +0000
@@ -1962,7 +1962,7 @@
 /***********************************************************************
  *           get_indent_level
  */
-inline static INT_PTR get_indent_level(void)
+static inline INT_PTR get_indent_level(void)
 {
     return (INT_PTR)TlsGetValue( indent_tls_index );
 }
@@ -1971,7 +1971,7 @@
 /***********************************************************************
  *           set_indent_level
  */
-inline static void set_indent_level( INT_PTR level )
+static inline void set_indent_level( INT_PTR level )
 {
     TlsSetValue( indent_tls_index, (void *)level );
 }
diff -urN a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c
--- a/dlls/user32/sysparams.c	2007-03-13 17:26:11.000000000 +0000
+++ b/dlls/user32/sysparams.c	2007-03-17 10:32:18.000000000 +0000
@@ -703,7 +703,7 @@
  *       Technical Reference to the Windows 2000 Registry ->
  *       HKEY_CURRENT_USER -> Control Panel -> Desktop -> WindowMetrics
  */
-inline static int SYSPARAMS_Twips2Pixels(int x)
+static inline int SYSPARAMS_Twips2Pixels(int x)
 {
     if (x < 0)
         x = (-x * get_display_dpi() + 720) / 1440;
diff -urN a/dlls/user32/winproc.c b/dlls/user32/winproc.c
--- a/dlls/user32/winproc.c	2007-01-17 17:24:42.000000000 +0000
+++ b/dlls/user32/winproc.c	2007-03-17 10:32:18.000000000 +0000
@@ -701,7 +701,7 @@
  *
  * Return TRUE if the lparam is a string
  */
-inline static BOOL WINPROC_TestLBForStr( HWND hwnd, UINT msg )
+static inline BOOL WINPROC_TestLBForStr( HWND hwnd, UINT msg )
 {
     DWORD style = GetWindowLongA( hwnd, GWL_STYLE );
     if (msg <= CB_MSGMAX)
diff -urN a/dlls/user32/wnd16.c b/dlls/user32/wnd16.c
--- a/dlls/user32/wnd16.c	2006-11-16 14:02:17.000000000 +0000
+++ b/dlls/user32/wnd16.c	2007-03-17 10:32:18.000000000 +0000
@@ -51,7 +51,7 @@
 }
 
 /* convert insert after window handle to 32-bit */
-inline static HWND full_insert_after_hwnd( HWND16 hwnd )
+static inline HWND full_insert_after_hwnd( HWND16 hwnd )
 {
     HWND ret = WIN_Handle32( hwnd );
     if (ret == (HWND)0xffff) ret = HWND_TOPMOST;



More information about the wine-patches mailing list