diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-11-29 18:59:06 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-11-29 18:59:06 +0000 |
commit | 5ac6474c945133a8415fb3be917859e5d42b6256 (patch) | |
tree | ee20c73dfaf23171bd739a6a3d7558db0f451097 /plugins/wimax | |
parent | 288efa5128341fab8907f3a2969a0bed95ae65cf (diff) | |
download | wireshark-5ac6474c945133a8415fb3be917859e5d42b6256.tar.gz |
Rename some of pint.h macros to match common style (bits number on the end).
pntohs -> pntoh16
pntohl -> pntoh32
pletohs -> pletoh16
pletohl -> pletoh32
phtons -> phton16
phtonl -> phton32
svn path=/trunk/; revision=53652
Diffstat (limited to 'plugins/wimax')
-rw-r--r-- | plugins/wimax/wimax_bits.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/wimax/wimax_bits.h b/plugins/wimax/wimax_bits.h index 6077411bc3..53b05b7e0c 100644 --- a/plugins/wimax/wimax_bits.h +++ b/plugins/wimax/wimax_bits.h @@ -59,10 +59,10 @@ /* extract the byte at the given nibble address 'n' of buffer 'b' */ #define NIB_BYTE(n,b) \ (n) & 1 \ - ? (pntohs( (b)+(n)/2 ) >> 4) & BYTE_MASK \ + ? (pntoh16( (b)+(n)/2 ) >> 4) & BYTE_MASK \ : (b)[(n)/2] /* - ? (pletohs((b)+(n)/2) >> 4) & BYTE_MASK \ + ? (pletoh16((b)+(n)/2) >> 4) & BYTE_MASK \ */ /* extract 12 bits at the given nibble address */ @@ -72,21 +72,21 @@ /* extract the word at the given nibble address 'n' of buffer 'b' */ #define NIB_WORD(n,b) \ (n) & 1 \ - ? (gint)((pntohl(((b) + (n)/2)) >> 12) & 0x0000FFFF) \ - : pntohs((b) + (n)/2) + ? (gint)((pntoh32(((b) + (n)/2)) >> 12) & 0x0000FFFF) \ + : pntoh16((b) + (n)/2) /* - : pletohs((b) + (n)/2) - ? (pletohl((b)+(n)/2) >> 12) & 0x0000FFFF \ + : pletoh16((b) + (n)/2) + ? (pletoh32((b)+(n)/2) >> 12) & 0x0000FFFF \ */ /* extract the word at the given nibble address 'n' of buffer 'b' */ #define NIB_LONG(n,b) \ (n) & 1 \ - ? (pntohl(((b) + (n)/2)) << 4) | (((b)[(n)/2 + 4] >> 4) & NIBBLE_MASK) \ - : pntohl((b) + (n)/2) + ? (pntoh32(((b) + (n)/2)) << 4) | (((b)[(n)/2 + 4] >> 4) & NIBBLE_MASK) \ + : pntoh32((b) + (n)/2) /* - ? (pletohl((b) + (n)/2) << 4) | (((b)[(n)/2 + 4] >> 4) & NIBBLE_MASK) \ - : pletohl((b) + (n)/2) + ? (pletoh32((b) + (n)/2) << 4) | (((b)[(n)/2 + 4] >> 4) & NIBBLE_MASK) \ + : pletoh32((b) + (n)/2) */ /* Only currently used with nib == 1 or 2 */ @@ -156,7 +156,7 @@ * num ... length of bitfield */ #define BIT_BITS16(bit, buf, num) \ - (( pntohs(buf+ADDR16(bit)) >> SHIFT16(bit,num) ) & MASK16(num)) + (( pntoh16(buf+ADDR16(bit)) >> SHIFT16(bit,num) ) & MASK16(num)) /* extract bitfield up to 24 bits * bit ... bit address @@ -165,14 +165,14 @@ */ #define BIT_BITS32(bit, buf, num) \ - ((pntohl(buf+ADDR32(bit)) >> SHIFT32(bit,num) ) & MASK32(num)) + ((pntoh32(buf+ADDR32(bit)) >> SHIFT32(bit,num) ) & MASK32(num)) /* bitfield up to 32 bits */ #define BIT_BITS64a(bit, buf, num) \ - ((pntohl(buf+ADDR32(bit)) & MASK64a(bit)) << SHIFT64a(bit,num)) + ((pntoh32(buf+ADDR32(bit)) & MASK64a(bit)) << SHIFT64a(bit,num)) #define BIT_BITS64b(bit, buf, num) \ - ((pntohl(buf+ADDR32(bit)+4) >> SHIFT64b(bit,num) ) & MASK64b(bit,num)) + ((pntoh32(buf+ADDR32(bit)+4) >> SHIFT64b(bit,num) ) & MASK64b(bit,num)) #define BIT_BITS64(bit, buf, num) \ ( (OFFSET32(bit)+(num)) <= 32 \ |