run indent twice, it alternates between two 'canonical' forms, also run whitespace...
[oweals/gnunet.git] / src / transport / wlan / byteorder.h
index 798cabf74931ae805e1eecd07d4702edff06233c..1a13470e9550792212c009e1e06350f86f5ec08d 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef _AIRCRACK_NG_BYTEORDER_H_
 #define _AIRCRACK_NG_BYTEORDER_H_
 
+ /* *INDENT-OFF* */
 #define ___my_swab16(x) \
 ((u_int16_t)( \
   (((u_int16_t)(x) & (u_int16_t)0x00ffU) << 8) | \
@@ -42,7 +43,7 @@
   (u_int64_t)(((u_int64_t)(x) & (u_int64_t)0x0000ff0000000000ULL) >> 24) | \
   (u_int64_t)(((u_int64_t)(x) & (u_int64_t)0x00ff000000000000ULL) >> 40) | \
   (u_int64_t)(((u_int64_t)(x) & (u_int64_t)0xff00000000000000ULL) >> 56) ))
-
+ /* *INDENT-ON* */
     /*
      * Linux
      */
 
 #ifndef __int8_t_defined
 typedef uint64_t u_int64_t;
-\rtypedef uint32_t u_int32_t;
-\rtypedef uint16_t u_int16_t;
-\rtypedef uint8_t u_int8_t;
+typedef uint32_t u_int32_t;
+typedef uint16_t u_int16_t;
+typedef uint8_t u_int8_t;
 
 
-#endif /* \r */
+#endif /*  */
 
 #ifndef htole16
 #if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -76,7 +77,7 @@ typedef uint64_t u_int64_t;
 #define htole64(x) (x)
 #define be64toh(x) ___my_swab64 (x)
 #define le64toh(x) (x)
-#else /* \r */
+#else /*  */
 #define htobe16(x) (x)
 #define htole16(x) ___my_swab16 (x)
 #define be16toh(x) (x)
@@ -91,10 +92,10 @@ typedef uint64_t u_int64_t;
 #define htole64(x) ___my_swab64 (x)
 #define be64toh(x) (x)
 #define le64toh(x) ___my_swab64 (x)
-#endif /* \r */
-#endif /* \r */
+#endif /*  */
+#endif /*  */
 
-#endif /* \r */
+#endif /*  */
     /*
      * Cygwin
      */
@@ -114,7 +115,7 @@ typedef uint64_t u_int64_t;
 #define __cpu_to_le32(x) (x)
 #define __cpu_to_le16(x) (x)
 #define AIRCRACK_NG_BYTE_ORDER_DEFINED
-#endif /* \r */
+#endif /*  */
     /*
      * Windows (DDK)
      */
@@ -133,7 +134,7 @@ typedef uint64_t u_int64_t;
 #define __cpu_to_le32(x) (x)
 #define __cpu_to_le16(x) (x)
 #define AIRCRACK_NG_BYTE_ORDER_DEFINED
-#endif /* \r */
+#endif /*  */
     /*
      * MAC (Darwin)
      */
@@ -155,7 +156,7 @@ typedef uint64_t u_int64_t;
 #define __cpu_to_le64(x) (unsigned long long) OSSwapHostToLittleInt64((uint64_t)x)
 #define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x)
 #define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x)
-#else /* \r */
+#else /*  */
 #include <architecture/byte_order.h>
 #define __swab64(x)      NXSwapLongLong(x)
 #define __swab32(x)      NXSwapLong(x)
@@ -172,13 +173,13 @@ typedef uint64_t u_int64_t;
 #define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x)
 #define __cpu_to_le32(x) NXSwapHostLongToLittle(x)
 #define __cpu_to_le16(x) NXSwapHostShortToLittle(x)
-#endif /* \r */
+#endif /*  */
 #define __LITTLE_ENDIAN 1234
 #define __BIG_ENDIAN    4321
 #define __PDP_ENDIAN    3412
 #define __BYTE_ORDER    __BIG_ENDIAN
 #define AIRCRACK_NG_BYTE_ORDER_DEFINED
-#endif /* \r */
+#endif /*  */
     /*
      * Solaris
      * -------
@@ -199,14 +200,14 @@ typedef uint64_t u_int64_t;
 #define __cpu_to_le64(x) ___my_swab64(x)
 #define __cpu_to_le32(x) ___my_swab32(x)
 #define __cpu_to_le16(x) ___my_swab16(x)
-\rtypedef uint64_t u_int64_t;
-\rtypedef uint32_t u_int32_t;
-\rtypedef uint16_t u_int16_t;
-\rtypedef uint8_t u_int8_t;
+typedef uint64_t u_int64_t;
+typedef uint32_t u_int32_t;
+typedef uint16_t u_int16_t;
+typedef uint8_t u_int8_t;
 
 
 #define AIRCRACK_NG_BYTE_ORDER_DEFINED
-#endif /* \r */
+#endif /*  */
     /*
      * Custom stuff
      */
@@ -215,12 +216,12 @@ typedef uint64_t u_int64_t;
 #define __cpu_to_be64(x) = OSSwapHostToBigInt64(x)
 #define __cpu_to_be32(x) = OSSwapHostToBigInt32(x)
 #define AIRCRACK_NG_BYTE_ORDER_DEFINED
-#endif /* \r */
+#endif /*  */
 
     // FreeBSD
 #ifdef __FreeBSD__
 #include <machine/endian.h>
-#endif /* \r */
+#endif /*  */
     // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...?
 
     // XXX: Mac: Check http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h
@@ -232,39 +233,39 @@ typedef uint64_t u_int64_t;
 #define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN
 #elif defined(_LITTLE_ENDIAN)
 #define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN
-#endif /* \r */
+#endif /*  */
 #if defined(BIG_ENDIAN)
 #define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN
 #elif defined(__BIG_ENDIAN)
 #define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN
 #elif defined(_BIG_ENDIAN)
 #define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN
-#endif /* \r */
+#endif /*  */
 #if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN)
 #error Impossible to determine endianness (Little or Big endian), please contact the author.
-#endif /* \r */
+#endif /*  */
 #if defined(BYTE_ORDER)
 #if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
 #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
 #elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
 #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
-#endif /* \r */
+#endif /*  */
 #elif defined(__BYTE_ORDER)
 #if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
 #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
 #elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
 #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
-#endif /* \r */
+#endif /*  */
 #elif defined(_BYTE_ORDER)
 #if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
 #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
 #elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
 #define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
-#endif /* \r */
-#endif /* \r */
+#endif /*  */
+#endif /*  */
 #ifndef AIRCRACK_NG_BYTE_ORDER
 #error Impossible to determine endianness (Little or Big endian), please contact the author.
-#endif /* \r */
+#endif /*  */
 #if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
 #ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
 #define __be64_to_cpu(x) ___my_swab64(x)
@@ -279,32 +280,32 @@ typedef uint64_t u_int64_t;
 #define __cpu_to_le64(x) (x)
 #define __cpu_to_le32(x) (x)
 #define __cpu_to_le16(x) (x)
-#endif /* \r */
+#endif /*  */
 #ifndef htobe16
 #define htobe16 ___my_swab16
-#endif /* \r */
+#endif /*  */
 #ifndef htobe32
 #define htobe32 ___my_swab32
-#endif /* \r */
+#endif /*  */
 #ifndef betoh16
 #define betoh16 ___my_swab16
-#endif /* \r */
+#endif /*  */
 #ifndef betoh32
 #define betoh32 ___my_swab32
-#endif /* \r */
+#endif /*  */
 #ifndef htole16
 #define htole16(x) (x)
-#endif /* \r */
+#endif /*  */
 #ifndef htole32
 #define htole32(x) (x)
-#endif /* \r */
+#endif /*  */
 #ifndef letoh16
 #define letoh16(x) (x)
-#endif /* \r */
+#endif /*  */
 #ifndef letoh32
 #define letoh32(x) (x)
-#endif /* \r */
-#endif /* \r */
+#endif /*  */
+#endif /*  */
 #if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
 #ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
 #define __be64_to_cpu(x) (x)
@@ -319,32 +320,32 @@ typedef uint64_t u_int64_t;
 #define __cpu_to_le64(x) ___my_swab64(x)
 #define __cpu_to_le32(x) ___my_swab32(x)
 #define __cpu_to_le16(x) ___my_swab16(x)
-#endif /* \r */
+#endif /*  */
 #ifndef htobe16
 #define htobe16(x) (x)
-#endif /* \r */
+#endif /*  */
 #ifndef htobe32
 #define htobe32(x) (x)
-#endif /* \r */
+#endif /*  */
 #ifndef betoh16
 #define betoh16(x) (x)
-#endif /* \r */
+#endif /*  */
 #ifndef betoh32
 #define betoh32(x) (x)
-#endif /* \r */
+#endif /*  */
 #ifndef htole16
 #define htole16 ___my_swab16
-#endif /* \r */
+#endif /*  */
 #ifndef htole32
 #define htole32 ___my_swab32
-#endif /* \r */
+#endif /*  */
 #ifndef letoh16
 #define letoh16 ___my_swab16
-#endif /* \r */
+#endif /*  */
 #ifndef letoh32
 #define letoh32 ___my_swab32
-#endif /* \r */
-#endif /* \r */
+#endif /*  */
+#endif /*  */
     // Common defines
 #define cpu_to_le64 __cpu_to_le64
 #define le64_to_cpu __le64_to_cpu
@@ -360,27 +361,27 @@ typedef uint64_t u_int64_t;
 #define be16_to_cpu __be16_to_cpu
 #ifndef le16toh
 #define le16toh le16_to_cpu
-#endif /* \r */
+#endif /*  */
 #ifndef be16toh
 #define be16toh be16_to_cpu
-#endif /* \r */
+#endif /*  */
 #ifndef le32toh
 #define le32toh le32_to_cpu
-#endif /* \r */
+#endif /*  */
 #ifndef be32toh
 #define be32toh be32_to_cpu
-#endif /* \r */
+#endif /*  */
 
 #ifndef htons
 #define htons be16_to_cpu
-#endif /* \r */
+#endif /*  */
 #ifndef htonl
 #define htonl cpu_to_be16
-#endif /* \r */
+#endif /*  */
 #ifndef ntohs
 #define ntohs cpu_to_be16
-#endif /* \r */
+#endif /*  */
 #ifndef ntohl
 #define ntohl cpu_to_be32
-#endif /* \r */
-#endif /* \r */
+#endif /*  */
+#endif /*  */