server: Replace inline static with static inline

Andrew Talbot Andrew.Talbot at talbotville.com
Sat Mar 17 05:52:14 CDT 2007


Changelog:
    server: Replace inline static with static inline.

diff -urN a/server/fd.c b/server/fd.c
--- a/server/fd.c	2007-01-12 20:32:37.000000000 +0000
+++ b/server/fd.c	2007-03-17 10:50:15.000000000 +0000
@@ -1026,7 +1026,7 @@
 }
 
 /* check if interval [start;end) overlaps the lock */
-inline static int lock_overlaps( struct file_lock *lock, file_pos_t start, file_pos_t end )
+static inline int lock_overlaps( struct file_lock *lock, file_pos_t start, file_pos_t end )
 {
     if (lock->end && start >= lock->end) return 0;
     if (end && lock->start >= end) return 0;
diff -urN a/server/file.h b/server/file.h
--- a/server/file.h	2007-01-12 20:32:37.000000000 +0000
+++ b/server/file.h	2007-03-17 10:50:15.000000000 +0000
@@ -79,7 +79,7 @@
 extern void main_loop(void);
 extern void remove_process_locks( struct process *process );
 
-inline static struct fd *get_obj_fd( struct object *obj ) { return obj->ops->get_fd( obj ); }
+static inline struct fd *get_obj_fd( struct object *obj ) { return obj->ops->get_fd( obj ); }
 
 /* timeout functions */
 
diff -urN a/server/handle.c b/server/handle.c
--- a/server/handle.c	2007-02-21 21:53:11.000000000 +0000
+++ b/server/handle.c	2007-03-17 10:50:15.000000000 +0000
@@ -69,11 +69,11 @@
 /* handle to table index conversion */
 
 /* handles are a multiple of 4 under NT; handle 0 is not used */
-inline static obj_handle_t index_to_handle( int index )
+static inline obj_handle_t index_to_handle( int index )
 {
     return (obj_handle_t)((unsigned long)(index + 1) << 2);
 }
-inline static int handle_to_index( obj_handle_t handle )
+static inline int handle_to_index( obj_handle_t handle )
 {
     return ((unsigned long)handle >> 2) - 1;
 }
@@ -82,16 +82,16 @@
 
 #define HANDLE_OBFUSCATOR 0x544a4def
 
-inline static int handle_is_global( obj_handle_t handle)
+static inline int handle_is_global( obj_handle_t handle)
 {
     return ((unsigned long)handle ^ HANDLE_OBFUSCATOR) < 0x10000;
 }
-inline static obj_handle_t handle_local_to_global( obj_handle_t handle )
+static inline obj_handle_t handle_local_to_global( obj_handle_t handle )
 {
     if (!handle) return 0;
     return (obj_handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR);
 }
-inline static obj_handle_t handle_global_to_local( obj_handle_t handle )
+static inline obj_handle_t handle_global_to_local( obj_handle_t handle )
 {
     return (obj_handle_t)((unsigned long)handle ^ HANDLE_OBFUSCATOR);
 }
diff -urN a/server/hook.c b/server/hook.c
--- a/server/hook.c	2006-10-10 12:52:03.000000000 +0100
+++ b/server/hook.c	2007-03-17 10:50:15.000000000 +0000
@@ -180,14 +180,14 @@
 }
 
 /* get the first hook in the chain */
-inline static struct hook *get_first_hook( struct hook_table *table, int index )
+static inline struct hook *get_first_hook( struct hook_table *table, int index )
 {
     struct list *elem = list_head( &table->hooks[index] );
     return elem ? HOOK_ENTRY( elem ) : NULL;
 }
 
 /* check if a given hook should run in the current thread */
-inline static int run_hook_in_current_thread( struct hook *hook )
+static inline int run_hook_in_current_thread( struct hook *hook )
 {
     if ((!hook->process || hook->process == current->process) &&
         (!(hook->flags & WINEVENT_SKIPOWNPROCESS) || hook->process != current->process))
@@ -200,7 +200,7 @@
 }
 
 /* check if a given hook should run in the owner thread instead of the current thread */
-inline static int run_hook_in_owner_thread( struct hook *hook )
+static inline int run_hook_in_owner_thread( struct hook *hook )
 {
     if ((hook->index == WH_MOUSE_LL - WH_MINHOOK ||
          hook->index == WH_KEYBOARD_LL - WH_MINHOOK))
@@ -209,7 +209,7 @@
 }
 
 /* find the first non-deleted hook in the chain */
-inline static struct hook *get_first_valid_hook( struct hook_table *table, int index,
+static inline struct hook *get_first_valid_hook( struct hook_table *table, int index,
                                                  int event, user_handle_t win,
                                                  int object_id, int child_id )
 {
diff -urN a/server/mapping.c b/server/mapping.c
--- a/server/mapping.c	2007-01-12 20:32:37.000000000 +0000
+++ b/server/mapping.c	2007-03-17 10:50:15.000000000 +0000
@@ -266,7 +266,7 @@
 }
 
 /* get the size of the unix file associated with the mapping */
-inline static int get_file_size( struct file *file, file_pos_t *size )
+static inline int get_file_size( struct file *file, file_pos_t *size )
 {
     struct stat st;
     int unix_fd = get_file_unix_fd( file );
diff -urN a/server/process.h b/server/process.h
--- a/server/process.h	2007-03-09 17:25:12.000000000 +0000
+++ b/server/process.h	2007-03-17 10:50:16.000000000 +0000
@@ -145,14 +145,14 @@
 extern int read_process_memory( struct process *process, const void *ptr, data_size_t size, char *dest );
 extern int write_process_memory( struct process *process, void *ptr, data_size_t size, const char *src );
 
-inline static process_id_t get_process_id( struct process *process ) { return process->id; }
+static inline process_id_t get_process_id( struct process *process ) { return process->id; }
 
-inline static int is_process_init_done( struct process *process )
+static inline int is_process_init_done( struct process *process )
 {
     return process->startup_state == STARTUP_DONE;
 }
 
-inline static struct process_dll *get_process_exe_module( struct process *process )
+static inline struct process_dll *get_process_exe_module( struct process *process )
 {
     struct list *ptr = list_head( &process->dlls );
     return ptr ? LIST_ENTRY( ptr, struct process_dll, entry ) : NULL;
diff -urN a/server/ptrace.c b/server/ptrace.c
--- a/server/ptrace.c	2007-01-18 18:11:16.000000000 +0000
+++ b/server/ptrace.c	2007-03-17 10:50:16.000000000 +0000
@@ -86,7 +86,7 @@
 #define PT_READ_D   3
 #define PT_WRITE_D  4
 #define PT_STEP     5
-inline static int ptrace(int req, ...) { errno = EPERM; return -1; /*FAIL*/ }
+static inline int ptrace(int req, ...) { errno = EPERM; return -1; /*FAIL*/ }
 #endif  /* HAVE_SYS_PTRACE_H */
 
 /* handle a status returned by wait4 */
diff -urN a/server/queue.c b/server/queue.c
--- a/server/queue.c	2007-02-21 21:53:11.000000000 +0000
+++ b/server/queue.c	2007-03-17 10:50:16.000000000 +0000
@@ -306,13 +306,13 @@
 }
 
 /* check the queue status */
-inline static int is_signaled( struct msg_queue *queue )
+static inline int is_signaled( struct msg_queue *queue )
 {
     return ((queue->wake_bits & queue->wake_mask) || (queue->changed_bits & queue->changed_mask));
 }
 
 /* set some queue bits */
-inline static void set_queue_bits( struct msg_queue *queue, unsigned int bits )
+static inline void set_queue_bits( struct msg_queue *queue, unsigned int bits )
 {
     queue->wake_bits |= bits;
     queue->changed_bits |= bits;
@@ -320,26 +320,26 @@
 }
 
 /* clear some queue bits */
-inline static void clear_queue_bits( struct msg_queue *queue, unsigned int bits )
+static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits )
 {
     queue->wake_bits &= ~bits;
     queue->changed_bits &= ~bits;
 }
 
 /* check whether msg is a keyboard message */
-inline static int is_keyboard_msg( struct message *msg )
+static inline int is_keyboard_msg( struct message *msg )
 {
     return (msg->msg >= WM_KEYFIRST && msg->msg <= WM_KEYLAST);
 }
 
 /* check if message is matched by the filter */
-inline static int check_msg_filter( unsigned int msg, unsigned int first, unsigned int last )
+static inline int check_msg_filter( unsigned int msg, unsigned int first, unsigned int last )
 {
     return (msg >= first && msg <= last);
 }
 
 /* check whether a message filter contains at least one potential hardware message */
-inline static int filter_contains_hw_range( unsigned int first, unsigned int last )
+static inline int filter_contains_hw_range( unsigned int first, unsigned int last )
 {
     /* hardware message ranges are (in numerical order):
      *   WM_NCMOUSEFIRST .. WM_NCMOUSELAST
@@ -354,7 +354,7 @@
 }
 
 /* get the QS_* bit corresponding to a given hardware message */
-inline static int get_hardware_msg_bit( struct message *msg )
+static inline int get_hardware_msg_bit( struct message *msg )
 {
     if (msg->msg == WM_MOUSEMOVE || msg->msg == WM_NCMOUSEMOVE) return QS_MOUSEMOVE;
     if (is_keyboard_msg( msg )) return QS_KEY;
@@ -362,7 +362,7 @@
 }
 
 /* get the current thread queue, creating it if needed */
-inline static struct msg_queue *get_current_queue(void)
+static inline struct msg_queue *get_current_queue(void)
 {
     struct msg_queue *queue = current->queue;
     if (!queue) queue = create_msg_queue( current, NULL );
@@ -370,7 +370,7 @@
 }
 
 /* get a (pseudo-)unique id to tag hardware messages */
-inline static unsigned int get_unique_id(void)
+static inline unsigned int get_unique_id(void)
 {
     static unsigned int id;
     if (!++id) id = 1;  /* avoid an id of 0 */
@@ -860,7 +860,7 @@
 }
 
 /* fix the thread input data when a window is destroyed */
-inline static void thread_input_cleanup_window( struct msg_queue *queue, user_handle_t window )
+static inline void thread_input_cleanup_window( struct msg_queue *queue, user_handle_t window )
 {
     struct thread_input *input = queue->input;
 
diff -urN a/server/registry.c b/server/registry.c
--- a/server/registry.c	2007-03-07 17:19:27.000000000 +0000
+++ b/server/registry.c	2007-03-17 10:50:16.000000000 +0000
@@ -350,7 +350,7 @@
 }
 
 /* get the request vararg as registry path */
-inline static void get_req_path( struct unicode_str *str, int skip_root )
+static inline void get_req_path( struct unicode_str *str, int skip_root )
 {
     static const WCHAR root_name[] = { '\\','R','e','g','i','s','t','r','y','\\' };
 
diff -urN a/server/request.h b/server/request.h
--- a/server/request.h	2007-03-07 17:19:27.000000000 +0000
+++ b/server/request.h	2007-03-17 10:50:16.000000000 +0000
@@ -66,32 +66,32 @@
 extern void trace_reply( enum request req, const union generic_reply *reply );
 
 /* get the request vararg data */
-inline static const void *get_req_data(void)
+static inline const void *get_req_data(void)
 {
     return current->req_data;
 }
 
 /* get the request vararg size */
-inline static data_size_t get_req_data_size(void)
+static inline data_size_t get_req_data_size(void)
 {
     return current->req.request_header.request_size;
 }
 
 /* get the request vararg as unicode string */
-inline static void get_req_unicode_str( struct unicode_str *str )
+static inline void get_req_unicode_str( struct unicode_str *str )
 {
     str->str = get_req_data();
     str->len = (get_req_data_size() / sizeof(WCHAR)) * sizeof(WCHAR);
 }
 
 /* get the reply maximum vararg size */
-inline static data_size_t get_reply_max_size(void)
+static inline data_size_t get_reply_max_size(void)
 {
     return current->req.request_header.reply_size;
 }
 
 /* allocate and fill the reply data */
-inline static void *set_reply_data( const void *data, data_size_t size )
+static inline void *set_reply_data( const void *data, data_size_t size )
 {
     void *ret = set_reply_data_size( size );
     if (ret) memcpy( ret, data, size );
@@ -99,7 +99,7 @@
 }
 
 /* set the reply data pointer directly (will be freed by request code) */
-inline static void set_reply_data_ptr( void *data, data_size_t size )
+static inline void set_reply_data_ptr( void *data, data_size_t size )
 {
     assert( size <= get_reply_max_size() );
     current->reply_size = size;
diff -urN a/server/sock.c b/server/sock.c
--- a/server/sock.c	2006-12-05 17:37:13.000000000 +0000
+++ b/server/sock.c	2007-03-17 10:50:16.000000000 +0000
@@ -284,7 +284,7 @@
     }
 }
 
-inline static int sock_error( struct fd *fd )
+static inline int sock_error( struct fd *fd )
 {
     unsigned int optval = 0, optlen;
 
diff -urN a/server/thread.c b/server/thread.c
--- a/server/thread.c	2007-02-05 21:53:29.000000000 +0000
+++ b/server/thread.c	2007-03-17 10:50:16.000000000 +0000
@@ -136,7 +136,7 @@
 static struct list thread_list = LIST_INIT(thread_list);
 
 /* initialize the structure for a newly allocated thread */
-inline static void init_thread_structure( struct thread *thread )
+static inline void init_thread_structure( struct thread *thread )
 {
     int i;
 
diff -urN a/server/trace.c b/server/trace.c
--- a/server/trace.c	2007-03-07 17:19:28.000000000 +0000
+++ b/server/trace.c	2007-03-17 10:50:16.000000000 +0000
@@ -47,7 +47,7 @@
 
 /* utility functions */
 
-inline static void remove_data( data_size_t size )
+static inline void remove_data( data_size_t size )
 {
     cur_data = (const char *)cur_data + size;
     cur_size -= size;
diff -urN a/server/user.c b/server/user.c
--- a/server/user.c	2006-06-15 13:14:29.000000000 +0100
+++ b/server/user.c	2007-03-17 10:50:16.000000000 +0000
@@ -45,13 +45,13 @@
     return NULL;
 }
 
-inline static user_handle_t entry_to_handle( struct user_handle *ptr )
+static inline user_handle_t entry_to_handle( struct user_handle *ptr )
 {
     int index = ptr - handles;
     return (user_handle_t)((((unsigned long)index << 1) + FIRST_USER_HANDLE) + (ptr->generation << 16));
 }
 
-inline static struct user_handle *alloc_user_entry(void)
+static inline struct user_handle *alloc_user_entry(void)
 {
     struct user_handle *handle;
 
@@ -78,7 +78,7 @@
     return handle;
 }
 
-inline static void *free_user_entry( struct user_handle *ptr )
+static inline void *free_user_entry( struct user_handle *ptr )
 {
     void *ret;
     ret = ptr->ptr;
diff -urN a/server/window.c b/server/window.c
--- a/server/window.c	2007-03-06 17:28:22.000000000 +0000
+++ b/server/window.c	2007-03-17 10:50:16.000000000 +0000
@@ -107,7 +107,7 @@
 static struct window *taskman_window;
 
 /* retrieve a pointer to a window from its handle */
-inline static struct window *get_window( user_handle_t handle )
+static inline struct window *get_window( user_handle_t handle )
 {
     struct window *ret = get_user_object( handle, USER_WINDOW );
     if (!ret) set_win32_error( ERROR_INVALID_WINDOW_HANDLE );
@@ -285,7 +285,7 @@
 }
 
 /* destroy all properties of a window */
-inline static void destroy_properties( struct window *win )
+static inline void destroy_properties( struct window *win )
 {
     int i;
 
diff -urN a/server/winstation.c b/server/winstation.c
--- a/server/winstation.c	2007-01-19 17:44:46.000000000 +0000
+++ b/server/winstation.c	2007-03-17 10:50:16.000000000 +0000
@@ -186,7 +186,7 @@
 }
 
 /* retrieve a pointer to a desktop object */
-inline static struct desktop *get_desktop_obj( struct process *process, obj_handle_t handle,
+static inline struct desktop *get_desktop_obj( struct process *process, obj_handle_t handle,
                                                unsigned int access )
 {
     return (struct desktop *)get_handle_obj( process, handle, access, &desktop_ops );



More information about the wine-patches mailing list