Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Dorota Czaplejewicz
gtk
Commits
180cd853
Commit
180cd853
authored
Feb 01, 2011
by
Benjamin Otte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11: Use macros for byte order to set byte order
No need to run sophisticated functions to guess it.
parent
609ddee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
gdk/x11/gdkdnd-x11.c
gdk/x11/gdkdnd-x11.c
+5
-9
No files found.
gdk/x11/gdkdnd-x11.c
View file @
180cd853
...
...
@@ -846,7 +846,11 @@ enum {
/* Byte swapping routines. The motif specification leaves it
* up to us to save a few bytes in the client messages
*/
static
gchar
local_byte_order
=
'\0'
;
#if G_BYTE_ORDER == G_BIG_ENDIAN
static
gchar
local_byte_order
=
'B'
;
#else
static
gchar
local_byte_order
=
'l'
;
#endif
#ifdef G_ENABLE_DEBUG
static
void
...
...
@@ -862,13 +866,6 @@ print_target_list (GList *targets)
}
#endif
/* G_ENABLE_DEBUG */
static
void
init_byte_order
(
void
)
{
guint32
myint
=
0x01020304
;
local_byte_order
=
(
*
(
gchar
*
)
&
myint
==
1
)
?
'B'
:
'l'
;
}
static
guint16
card16_to_host
(
guint16
x
,
gchar
byte_order
)
{
...
...
@@ -3132,7 +3129,6 @@ void
_gdk_x11_display_init_dnd
(
GdkDisplay
*
display
)
{
int
i
;
init_byte_order
();
for
(
i
=
0
;
i
<
G_N_ELEMENTS
(
xdnd_filters
);
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment