Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
bbfd99f2
Commit
bbfd99f2
authored
Aug 24, 2011
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proofread byte order inline functions
parent
7cd9a963
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
include/vlc_common.h
include/vlc_common.h
+8
-8
No files found.
include/vlc_common.h
View file @
bbfd99f2
...
...
@@ -694,7 +694,7 @@ VLC_API char const * vlc_error( int ) VLC_USED;
#ifdef WORDS_BIGENDIAN
# define hton16(i) ((uint16_t)(i))
# define hton32(i) ((uint32_t)(i))
# define hton64(i) ((uint
32
_t)(i))
# define hton64(i) ((uint
64
_t)(i))
#else
# define hton16(i) bswap16(i)
# define hton32(i) bswap32(i)
...
...
@@ -778,28 +778,28 @@ static inline uint64_t GetQWLE (const void *p)
}
/** Writes 16 bits in network byte order */
static
inline
void
SetW
L
E
(
void
*
p
,
uint16_t
w
)
static
inline
void
SetW
B
E
(
void
*
p
,
uint16_t
w
)
{
w
=
hton16
(
w
);
memcpy
(
p
,
&
w
,
sizeof
(
w
));
}
/** Writes 32 bits in network byte order */
static
inline
void
SetDW
L
E
(
void
*
p
,
uint32_t
dw
)
static
inline
void
SetDW
B
E
(
void
*
p
,
uint32_t
dw
)
{
dw
=
hton32
(
dw
);
memcpy
(
p
,
&
dw
,
sizeof
(
dw
));
}
/** Writes 64 bits in network byte order */
static
inline
void
SetQW
L
E
(
void
*
p
,
uint64_t
qw
)
static
inline
void
SetQW
B
E
(
void
*
p
,
uint64_t
qw
)
{
qw
=
hton64
(
qw
);
memcpy
(
p
,
&
qw
,
sizeof
(
qw
));
}
/** Writes 16 bits in little endian order */
static
inline
void
SetW
B
E
(
void
*
p
,
uint16_t
w
)
static
inline
void
SetW
L
E
(
void
*
p
,
uint16_t
w
)
{
#ifdef WORDS_BIGENDIAN
w
=
bswap16
(
w
);
...
...
@@ -808,7 +808,7 @@ static inline void SetWBE (void *p, uint16_t w)
}
/** Writes 32 bits in little endian order */
static
inline
void
SetDW
B
E
(
void
*
p
,
uint32_t
dw
)
static
inline
void
SetDW
L
E
(
void
*
p
,
uint32_t
dw
)
{
#ifdef WORDS_BIGENDIAN
dw
=
bswap32
(
dw
);
...
...
@@ -817,10 +817,10 @@ static inline void SetDWBE (void *p, uint32_t dw)
}
/** Writes 64 bits in little endian order */
static
inline
void
SetQW
B
E
(
void
*
p
,
uint64_t
qw
)
static
inline
void
SetQW
L
E
(
void
*
p
,
uint64_t
qw
)
{
#ifdef WORDS_BIGENDIAN
qw
=
bswap
32
(
qw
);
qw
=
bswap
64
(
qw
);
#endif
memcpy
(
p
,
&
qw
,
sizeof
(
qw
));
}
...
...
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