##// END OF EJS Templates
bitmanipulation: reformat with clang-format...
Augie Fackler -
r34698:ce77b056 default
parent child Browse files
Show More
@@ -9,26 +9,21 b' static inline uint32_t getbe32(const cha'
9 {
9 {
10 const unsigned char *d = (const unsigned char *)c;
10 const unsigned char *d = (const unsigned char *)c;
11
11
12 return ((d[0] << 24) |
12 return ((d[0] << 24) | (d[1] << 16) | (d[2] << 8) | (d[3]));
13 (d[1] << 16) |
14 (d[2] << 8) |
15 (d[3]));
16 }
13 }
17
14
18 static inline int16_t getbeint16(const char *c)
15 static inline int16_t getbeint16(const char *c)
19 {
16 {
20 const unsigned char *d = (const unsigned char *)c;
17 const unsigned char *d = (const unsigned char *)c;
21
18
22 return ((d[0] << 8) |
19 return ((d[0] << 8) | (d[1]));
23 (d[1]));
24 }
20 }
25
21
26 static inline uint16_t getbeuint16(const char *c)
22 static inline uint16_t getbeuint16(const char *c)
27 {
23 {
28 const unsigned char *d = (const unsigned char *)c;
24 const unsigned char *d = (const unsigned char *)c;
29
25
30 return ((d[0] << 8) |
26 return ((d[0] << 8) | (d[1]));
31 (d[1]));
32 }
27 }
33
28
34 static inline void putbe32(uint32_t x, char *c)
29 static inline void putbe32(uint32_t x, char *c)
General Comments 0
You need to be logged in to leave comments. Login now