Show More
@@ -172,6 +172,22 b' static inline uint32_t getbe32(const cha' | |||||
172 | (d[3])); |
|
172 | (d[3])); | |
173 | } |
|
173 | } | |
174 |
|
174 | |||
|
175 | static inline int16_t getbeint16(const char *c) | |||
|
176 | { | |||
|
177 | const unsigned char *d = (const unsigned char *)c; | |||
|
178 | ||||
|
179 | return ((d[0] << 8) | | |||
|
180 | (d[1])); | |||
|
181 | } | |||
|
182 | ||||
|
183 | static inline uint16_t getbeuint16(const char *c) | |||
|
184 | { | |||
|
185 | const unsigned char *d = (const unsigned char *)c; | |||
|
186 | ||||
|
187 | return ((d[0] << 8) | | |||
|
188 | (d[1])); | |||
|
189 | } | |||
|
190 | ||||
175 | static inline void putbe32(uint32_t x, char *c) |
|
191 | static inline void putbe32(uint32_t x, char *c) | |
176 | { |
|
192 | { | |
177 | c[0] = (x >> 24) & 0xff; |
|
193 | c[0] = (x >> 24) & 0xff; |
General Comments 0
You need to be logged in to leave comments.
Login now