Sophie

Sophie

distrib > Mageia > cauldron > i586 > by-pkgid > 3e975a2e0067bfe211a1c27398afcae4 > files > 8

afterstep-2.2.12-12.mga7.src.rpm

diff -up afterstep-devel-2.2.12/libAfterBase/asvector.c.gcc5 afterstep-devel-2.2.12/libAfterBase/asvector.c
--- afterstep-devel-2.2.12/libAfterBase/asvector.c.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterBase/asvector.c	2015-09-07 12:30:02.245398354 +0200
@@ -124,52 +124,6 @@ LOCAL_DEBUG_CALLER_OUT("0x%lX, 0x%lX, %l
     return v;
 }
 
-/* finds index of the first element in the vector that is exactly matching specifyed
- * data */
-inline size_t vector_find_data( ASVector *v, void *data )
-{
-    register int i ;
-    /* word copying is usually faster then raw memory copying */
-    if( v->unit == sizeof(long*) )
-    {   /* 4 or 8 byte pointer copying  */
-        register long** src = (long**)(v->memory);
-        register long* trg = *((long**)data);
-        for( i = 0 ; i < (int)(v->used) ; i++ )
-            if( trg == src[i] )
-                break;
-    }else if( v->unit == 2 )
-    {   /* 2 byte copying  */
-        register CARD16 *src = (CARD16*)(v->memory);
-        register CARD16 trg = *((CARD16*)data);
-        for( i = 0 ; i < (int)(v->used) ; i++ )
-            if( trg == src[i] )
-                break;
-    }else if( v->unit == 1 )
-    {
-        register CARD8 *src = (CARD8*)(v->memory);
-        register CARD8 trg = *((CARD8*)data);
-        for( i = 0 ; i < (int)(v->used) ; i++ )
-            if( trg == src[i] )
-                break;
-    }else
-    {   /* raw copy */
-        register CARD8 *src = v->memory ;
-        register CARD8 *trg = (CARD8*)data ;
-        register int k ;
-        for( i = 0 ; i < (int)(v->used) ; i++ )
-        {
-            for( k = 0 ; k < (int)(v->unit) ; k++ )
-                if( src[k] != trg[k] )
-                    break;
-            if( k >= (int)(v->unit) )
-                break;
-
-            src += v->unit ;
-        }
-    }
-    return i;
-}
-
 inline void vector_move_data_up( ASVector *v, int index, int offset, int length )
 {
     register int i ;
diff -up afterstep-devel-2.2.12/libAfterBase/asvector.h.gcc5 afterstep-devel-2.2.12/libAfterBase/asvector.h
--- afterstep-devel-2.2.12/libAfterBase/asvector.h.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterBase/asvector.h	2015-09-07 12:30:02.253398278 +0200
@@ -38,7 +38,51 @@ ASVector *append_vector( ASVector *v, vo
 /* returns index on success, -1 on failure */
 int vector_insert_elem( ASVector *v, void *data, size_t size, void *sibling, int before );
 int vector_relocate_elem (ASVector *v, unsigned int index, unsigned int new_index);
-inline size_t vector_find_data (ASVector *v, void *data );
+/* finds index of the first element in the vector that is exactly matching specifyed
+ * data */
+inline size_t vector_find_data( ASVector *v, void *data )
+{
+    register int i ;
+    /* word copying is usually faster then raw memory copying */
+    if( v->unit == sizeof(long*) )
+    {   /* 4 or 8 byte pointer copying  */
+        register long** src = (long**)(v->memory);
+        register long* trg = *((long**)data);
+        for( i = 0 ; i < (int)(v->used) ; i++ )
+            if( trg == src[i] )
+                break;
+    }else if( v->unit == 2 )
+    {   /* 2 byte copying  */
+        register CARD16 *src = (CARD16*)(v->memory);
+        register CARD16 trg = *((CARD16*)data);
+        for( i = 0 ; i < (int)(v->used) ; i++ )
+            if( trg == src[i] )
+                break;
+    }else if( v->unit == 1 )
+    {
+        register CARD8 *src = (CARD8*)(v->memory);
+        register CARD8 trg = *((CARD8*)data);
+        for( i = 0 ; i < (int)(v->used) ; i++ )
+            if( trg == src[i] )
+                break;
+    }else
+    {   /* raw copy */
+        register CARD8 *src = v->memory ;
+        register CARD8 *trg = (CARD8*)data ;
+        register int k ;
+        for( i = 0 ; i < (int)(v->used) ; i++ )
+        {
+            for( k = 0 ; k < (int)(v->unit) ; k++ )
+                if( src[k] != trg[k] )
+                    break;
+            if( k >= (int)(v->unit) )
+                break;
+
+            src += v->unit ;
+        }
+    }
+    return i;
+}
 int vector_find_elem( ASVector *v, void *data );
 /* returns 1 on success, 0 on failure */
 int vector_remove_elem( ASVector *v, void *data );
diff -up afterstep-devel-2.2.12/libAfterBase/output.c.gcc5 afterstep-devel-2.2.12/libAfterBase/output.c
--- afterstep-devel-2.2.12/libAfterBase/output.c.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterBase/output.c	2015-09-07 12:30:02.261398201 +0200
@@ -227,7 +227,7 @@ void debugout_print_linestamp(const char
 
 
 
-inline void
+static inline void
 nonGNUC_debugout_stub( const char *format, ...)
 {}
 
diff -up afterstep-devel-2.2.12/libAfterBase/output.h.gcc5 afterstep-devel-2.2.12/libAfterBase/output.h
--- afterstep-devel-2.2.12/libAfterBase/output.h.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterBase/output.h	2015-09-07 12:30:02.269398125 +0200
@@ -56,7 +56,6 @@ Bool show_debug( const char *file, const
 
 
 void nonGNUC_debugout( const char *format, ...);
-inline void nonGNUC_debugout_stub( const char *format, ...);
 /* may be used below in case compilation problems occur.
  * Please submit a bug report if usage of any of the following generates errors on
  * your compiler . Thanks!!! */
diff -up afterstep-devel-2.2.12/libAfterBase/parse.c.gcc5 afterstep-devel-2.2.12/libAfterBase/parse.c
--- afterstep-devel-2.2.12/libAfterBase/parse.c.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterBase/parse.c	2015-09-07 12:30:02.278398040 +0200
@@ -1025,20 +1025,6 @@ parse_geometry (register char *tline,
 	return tline;
 }
 
-static char _as_hex_to_char_table[] = "0123456789ABCDEF";
-
-inline int
-unsigned_int2buffer_end (char *buffer, int buffer_size, unsigned int val)
-{
-	int i = buffer_size-1 ; 
-	buffer [i--] = '\0';
-	if (val == 0)
-		buffer [i--] = '0';
-	else
-		while (val && i > 0) { buffer[i--] = _as_hex_to_char_table[val%10]; val /= 10;} 
-	return i+1;
-}
-
 char         *
 string_from_int (int param)
 {
diff -up afterstep-devel-2.2.12/libAfterBase/parse.h.gcc5 afterstep-devel-2.2.12/libAfterBase/parse.h
--- afterstep-devel-2.2.12/libAfterBase/parse.h.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterBase/parse.h	2015-09-07 12:30:02.286397963 +0200
@@ -73,7 +73,19 @@ format_geometry ( int x, int y, unsigned
 
 double parse_math(const char* str, char** endptr, double size);
 
-inline int unsigned_int2buffer_end (char *buffer, int buffer_size, unsigned int val);
+static char const _as_hex_to_char_table[] = "0123456789ABCDEF";
+
+static inline int
+unsigned_int2buffer_end (char *buffer, int buffer_size, unsigned int val)
+{
+	int i = buffer_size-1 ; 
+	buffer [i--] = '\0';
+	if (val == 0)
+		buffer [i--] = '0';
+	else
+		while (val && i > 0) { buffer[i--] = _as_hex_to_char_table[val%10]; val /= 10;} 
+	return i+1;
+}
 char *string_from_int (int param);
 char *hex_to_buffer_reverse(void *data, size_t bytes, char* buffer);
 char *hex_to_buffer(void *data, size_t bytes, char* buffer);
diff -up afterstep-devel-2.2.12/libAfterStep/functions.c.gcc5 afterstep-devel-2.2.12/libAfterStep/functions.c
--- afterstep-devel-2.2.12/libAfterStep/functions.c.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterStep/functions.c	2015-09-07 12:30:02.296397868 +0200
@@ -307,17 +307,6 @@ void dup_func_data (FunctionData * dst,
 	}
 }
 
-inline FunctionData *create_named_function (int func, char *name)
-{
-	FunctionData *fdata = safecalloc (1, sizeof (FunctionData));
-
-	init_func_data (fdata);
-	fdata->func = func;
-	if (name)
-		fdata->name = mystrdup (name);
-	return fdata;
-}
-
 
 
 void set_func_val (FunctionData * data, int arg, int value)
diff -up afterstep-devel-2.2.12/libAfterStep/functions.h.gcc5 afterstep-devel-2.2.12/libAfterStep/functions.h
--- afterstep-devel-2.2.12/libAfterStep/functions.h.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterStep/functions.h	2015-09-07 12:30:02.305397783 +0200
@@ -314,7 +314,16 @@ FunctionCode change_func_code (const cha
 void init_func_data (FunctionData * data);
 void copy_func_data (FunctionData * dst, FunctionData * src);
 void dup_func_data (FunctionData * dst, FunctionData * src);
-inline FunctionData *create_named_function( int func, char *name);
+inline FunctionData *create_named_function (int func, char *name)
+{
+	FunctionData *fdata = safecalloc (1, sizeof (FunctionData));
+
+	init_func_data (fdata);
+	fdata->func = func;
+	if (name)
+		fdata->name = mystrdup (name);
+	return fdata;
+}
 void set_func_val (FunctionData * data, int arg, int value);
 int free_func_data (FunctionData * data);
 void destroy_func_data( FunctionData **pdata );
diff -up afterstep-devel-2.2.12/libAfterStep/mylook.c.gcc5 afterstep-devel-2.2.12/libAfterStep/mylook.c
--- afterstep-devel-2.2.12/libAfterStep/mylook.c.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterStep/mylook.c	2015-09-07 12:30:02.313397706 +0200
@@ -812,16 +812,6 @@ inline void init_deskconfigs_list (MyLoo
 	look->desk_configs = create_ashash (5, NULL, NULL, myobj_destroy);
 }
 
-inline MyDesktopConfig *add_deskconfig_to_list (ASHashTable * list,
-																								MyDesktopConfig * dc)
-{
-	dc->magic = MAGIC_MYDESKTOPCONFIG;
-	if (add_hash_item (list, (ASHashableValue) (dc->desk), dc) !=
-			ASH_Success)
-		mydeskconfig_delete (&dc);
-	return dc;
-}
-
 MyDesktopConfig *add_deskconfig (MyLook * look, MyDesktopConfig * dc)
 {
 	if (look->desk_configs == NULL)
@@ -843,57 +833,3 @@ MyStyle *mylook_get_style (MyLook * look
 	return NULL;
 }
 
-inline MyDesktopConfig *mylook_get_desk_config (MyLook * look, long desk)
-{
-	if (look) {
-		ASHashData hdata = { 0 };
-		LOCAL_DEBUG_OUT ("looking for desk_config for dekstop %ld...", desk);
-		if (get_hash_item (look->desk_configs, AS_HASHABLE (desk), &hdata.vptr)
-				== ASH_Success)
-			return hdata.vptr;
-	}
-	return NULL;
-}
-
-
-inline MyBackground *mylook_get_desk_back (MyLook * look, long desk)
-{
-	MyBackground *myback = NULL;
-
-	if (look) {
-		ASHashData hdata = { 0 };
-		LOCAL_DEBUG_OUT ("looking for desk_config for dekstop %ld...", desk);
-		if (get_hash_item (look->desk_configs, AS_HASHABLE (desk), &hdata.vptr)
-				== ASH_Success) {
-			MyDesktopConfig *dc = hdata.vptr;
-
-			LOCAL_DEBUG_OUT ("found desk_config %p for dekstop %ld...", dc,
-											 desk);
-			if (dc->back_name) {
-#if defined(LOCAL_DEBUG) && !defined(NO_DEBUG_OUTPUT)
-				print_ashash (look->backs_list, string_print);
-#endif
-				if (get_hash_item
-						(look->backs_list, AS_HASHABLE (dc->back_name),
-						 &hdata.vptr) == ASH_Success)
-					myback = hdata.vptr;
-				LOCAL_DEBUG_OUT
-						("found back %p for dekstop %ld with name \"%s\". data = \"%s\" ",
-						 myback, desk, dc->back_name,
-						 myback ? (myback->data ? myback->data : "<null>") : "<null>");
-			}
-		}
-	}
-	return myback;
-}
-
-
-inline MyBackground *mylook_get_back (MyLook * look, char *name)
-{
-	ASHashData hdata = { 0 };
-	if (look && name)
-		if (get_hash_item (look->backs_list, AS_HASHABLE (name), &hdata.vptr)
-				!= ASH_Success)
-			hdata.vptr = NULL;
-	return (MyBackground *) hdata.vptr;
-}
diff -up afterstep-devel-2.2.12/libAfterStep/mylook.h.gcc5 afterstep-devel-2.2.12/libAfterStep/mylook.h
--- afterstep-devel-2.2.12/libAfterStep/mylook.h.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterStep/mylook.h	2015-09-07 12:30:02.322397621 +0200
@@ -397,7 +397,15 @@ void myback_delete( MyBackground **mybac
 MyDesktopConfig *create_mydeskconfig( int desk, char *data );
 void init_deskconfigs_list( MyLook *look );
 void mydeskconfig_delete( MyDesktopConfig **dc );
-inline MyDesktopConfig *add_deskconfig_to_list( ASHashTable *list, MyDesktopConfig *dc );
+inline MyDesktopConfig *add_deskconfig_to_list (ASHashTable * list,
+																								MyDesktopConfig * dc)
+{
+	dc->magic = MAGIC_MYDESKTOPCONFIG;
+	if (add_hash_item (list, (ASHashableValue) (dc->desk), dc) !=
+			ASH_Success)
+		mydeskconfig_delete (&dc);
+	return dc;
+}
 MyDesktopConfig *add_deskconfig( MyLook *look, MyDesktopConfig *dc );
 
 ARGB32 get_random_tint_color();
@@ -411,9 +419,56 @@ void mylook_set_font_size_var (MyLook *
 
 
 struct MyStyle *mylook_get_style(MyLook *look, const char *name);
-inline MyBackground  *mylook_get_desk_back(MyLook *look, long desk);
-inline MyBackground  *mylook_get_back(MyLook *look, char *name);
-inline MyDesktopConfig *mylook_get_desk_config(MyLook *look, long desk);
+inline MyBackground *mylook_get_desk_back (MyLook * look, long desk)
+{
+	MyBackground *myback = NULL;
+
+	if (look) {
+		ASHashData hdata = { 0 };
+		LOCAL_DEBUG_OUT ("looking for desk_config for dekstop %ld...", desk);
+		if (get_hash_item (look->desk_configs, AS_HASHABLE (desk), &hdata.vptr)
+				== ASH_Success) {
+			MyDesktopConfig *dc = hdata.vptr;
+
+			LOCAL_DEBUG_OUT ("found desk_config %p for dekstop %ld...", dc,
+											 desk);
+			if (dc->back_name) {
+#if defined(LOCAL_DEBUG) && !defined(NO_DEBUG_OUTPUT)
+				print_ashash (look->backs_list, string_print);
+#endif
+				if (get_hash_item
+						(look->backs_list, AS_HASHABLE (dc->back_name),
+						 &hdata.vptr) == ASH_Success)
+					myback = hdata.vptr;
+				LOCAL_DEBUG_OUT
+						("found back %p for dekstop %ld with name \"%s\". data = \"%s\" ",
+						 myback, desk, dc->back_name,
+						 myback ? (myback->data ? myback->data : "<null>") : "<null>");
+			}
+		}
+	}
+	return myback;
+}
+inline MyBackground *mylook_get_back (MyLook * look, char *name)
+{
+	ASHashData hdata = { 0 };
+	if (look && name)
+		if (get_hash_item (look->backs_list, AS_HASHABLE (name), &hdata.vptr)
+				!= ASH_Success)
+			hdata.vptr = NULL;
+	return (MyBackground *) hdata.vptr;
+}
+inline MyDesktopConfig *mylook_get_desk_config (MyLook * look, long desk)
+{
+	if (look) {
+		ASHashData hdata = { 0 };
+		LOCAL_DEBUG_OUT ("looking for desk_config for dekstop %ld...", desk);
+		if (get_hash_item (look->desk_configs, AS_HASHABLE (desk), &hdata.vptr)
+				== ASH_Success)
+			return hdata.vptr;
+	}
+	return NULL;
+}
 
 
 
diff -up afterstep-devel-2.2.12/libAfterStep/session.c.gcc5 afterstep-devel-2.2.12/libAfterStep/session.c
--- afterstep-devel-2.2.12/libAfterStep/session.c.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterStep/session.c	2015-09-07 12:30:02.349397363 +0200
@@ -1115,23 +1115,6 @@ set_session_override (ASSession * sessio
 	}
 }
 
-inline const char *get_session_override (ASSession * session, int function)
-{
-	if (session) {
-		if (session->overriding_file)
-			return session->overriding_file;
-		else if (function == F_CHANGE_LOOK)
-			return session->overriding_look;
-		else if (function == F_CHANGE_FEEL)
-			return session->overriding_feel;
-		else if (function == F_CHANGE_THEME || function == F_CHANGE_THEME_FILE)
-			return session->overriding_theme;
-		else if (function == F_CHANGE_COLORSCHEME)
-			return session->overriding_colorscheme;
-	}
-	return NULL;
-}
-
 char **get_session_file_list (ASSession * session, int desk1, int desk2,
 															int function)
 {
diff -up afterstep-devel-2.2.12/libAfterStep/session.h.gcc5 afterstep-devel-2.2.12/libAfterStep/session.h
--- afterstep-devel-2.2.12/libAfterStep/session.h.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/libAfterStep/session.h	2015-09-07 12:30:02.358397278 +0200
@@ -49,7 +49,22 @@ void 	   destroy_assession (ASSession *
 void       update_default_session ( ASSession *session, int func);
 
 void 	   set_session_override(ASSession * session, const char *overriding_file, int function );
-inline const char *get_session_override(ASSession * session, int function );
+inline const char *get_session_override (ASSession * session, int function)
+{
+	if (session) {
+		if (session->overriding_file)
+			return session->overriding_file;
+		else if (function == F_CHANGE_LOOK)
+			return session->overriding_look;
+		else if (function == F_CHANGE_FEEL)
+			return session->overriding_feel;
+		else if (function == F_CHANGE_THEME || function == F_CHANGE_THEME_FILE)
+			return session->overriding_theme;
+		else if (function == F_CHANGE_COLORSCHEME)
+			return session->overriding_colorscheme;
+	}
+	return NULL;
+}
 
 void 	   change_default_session (ASSession * session, const char *new_val, int function);
 void 	   change_desk_session (ASSession * session, int desk, const char *new_val, int function);
diff -up afterstep-devel-2.2.12/src/afterstep/asinternals.h.gcc5 afterstep-devel-2.2.12/src/afterstep/asinternals.h
--- afterstep-devel-2.2.12/src/afterstep/asinternals.h.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/src/afterstep/asinternals.h	2015-09-07 12:36:07.248919688 +0200
@@ -689,8 +689,20 @@ void ParsePopupEntry (char *tline, FILE
 
 
 /*************************** misc.c *********************************/
-inline void ungrab_window_buttons( Window w );
-inline void ungrab_window_keys (Window w );
+/****************************************************************************/
+/* window management specifics - button ungrabbing convinience functions:   */
+/****************************************************************************/
+inline void ungrab_window_buttons (Window w)
+{
+	LOCAL_DEBUG_OUT ("w = %lX", w);
+	XUngrabButton (dpy, AnyButton, AnyModifier, w);
+}
+
+inline void ungrab_window_keys (Window w)
+{
+	XUngrabKey (dpy, AnyKey, AnyModifier, w);
+}
+
 void MyXGrabButton ( unsigned button, unsigned modifiers,
 				Window grab_window, Bool owner_events, unsigned event_mask,
 				int pointer_mode, int keyboard_mode, Window confine_to, Cursor cursor);
diff -up afterstep-devel-2.2.12/src/afterstep/misc.c.gcc5 afterstep-devel-2.2.12/src/afterstep/misc.c
--- afterstep-devel-2.2.12/src/afterstep/misc.c.gcc5	2013-05-01 15:34:11.000000000 +0200
+++ afterstep-devel-2.2.12/src/afterstep/misc.c	2015-09-07 12:36:12.768867026 +0200
@@ -29,20 +29,6 @@
 
 #include "asinternals.h"
 
-/****************************************************************************/
-/* window management specifics - button ungrabbing convinience functions:   */
-/****************************************************************************/
-inline void ungrab_window_buttons (Window w)
-{
-	LOCAL_DEBUG_OUT ("w = %lX", w);
-	XUngrabButton (dpy, AnyButton, AnyModifier, w);
-}
-
-inline void ungrab_window_keys (Window w)
-{
-	XUngrabKey (dpy, AnyKey, AnyModifier, w);
-}
-
 /******************************************************************************
  * Versions of grab primitives that circumvent modifier problems
  *****************************************************************************/