mercurial/util.h
changeset 24015 e2bf959a5a0d
parent 21838 0022ee690446
child 24016 fb93721cc229
--- a/mercurial/util.h	Tue Jan 20 09:38:22 2015 -0500
+++ b/mercurial/util.h	Tue Jan 20 14:09:57 2015 -0500
@@ -172,6 +172,22 @@
 		(d[3]));
 }
 
+static inline int16_t getbeint16(const char *c)
+{
+	const unsigned char *d = (const unsigned char *)c;
+
+	return ((d[0] << 8) |
+		(d[1]));
+}
+
+static inline uint16_t getbeuint16(const char *c)
+{
+	const unsigned char *d = (const unsigned char *)c;
+
+	return ((d[0] << 8) |
+		(d[1]));
+}
+
 static inline void putbe32(uint32_t x, char *c)
 {
 	c[0] = (x >> 24) & 0xff;