1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-21 05:39:14 +00:00

Use nbase's s8, u8, s16, etc. types for specific-size integers rather than the

nonstandard u_int8_t and so on.
This commit is contained in:
david
2008-08-29 20:57:36 +00:00
parent 986b7f8978
commit 0c4deb5b95

View File

@@ -169,20 +169,20 @@ static int l_unpack(lua_State *L) /** unpack(f,s, [init]) */
++n;
break;
}
UNPACKSTRING(OP_BSTRING, u_int8_t)
UNPACKSTRING(OP_WSTRING, u_int16_t)
UNPACKSTRING(OP_SSTRING, u_int32_t)
UNPACKSTRING(OP_BSTRING, u8)
UNPACKSTRING(OP_WSTRING, u16)
UNPACKSTRING(OP_SSTRING, u32)
UNPACKNUMBER(OP_NUMBER, lua_Number)
UNPACKNUMBER(OP_DOUBLE, double)
UNPACKNUMBER(OP_FLOAT, float)
UNPACKNUMBER(OP_CHAR, int8_t)
UNPACKNUMBER(OP_BYTE, u_int8_t)
UNPACKNUMBER(OP_SHORT, int16_t)
UNPACKNUMBER(OP_USHORT, u_int16_t)
UNPACKNUMBER(OP_INT, int32_t)
UNPACKNUMBER(OP_UINT, u_int32_t)
UNPACKNUMBER(OP_LONG, int64_t)
UNPACKNUMBER(OP_ULONG, u_int64_t)
UNPACKNUMBER(OP_CHAR, s8)
UNPACKNUMBER(OP_BYTE, u8)
UNPACKNUMBER(OP_SHORT, s16)
UNPACKNUMBER(OP_USHORT, u16)
UNPACKNUMBER(OP_INT, s32)
UNPACKNUMBER(OP_UINT, u32)
UNPACKNUMBER(OP_LONG, s64)
UNPACKNUMBER(OP_ULONG, u64)
case OP_BINMSB:
{
@@ -306,20 +306,20 @@ static int l_pack(lua_State *L) /** pack(f,...) */
luaL_addlstring(&b,a,l+(c==OP_ZSTRING));
break;
}
PACKSTRING(OP_BSTRING, u_int8_t)
PACKSTRING(OP_WSTRING, u_int16_t)
PACKSTRING(OP_SSTRING, u_int32_t)
PACKSTRING(OP_BSTRING, u8)
PACKSTRING(OP_WSTRING, u16)
PACKSTRING(OP_SSTRING, u32)
PACKNUMBER(OP_NUMBER, lua_Number)
PACKNUMBER(OP_DOUBLE, double)
PACKNUMBER(OP_FLOAT, float)
PACKNUMBER(OP_CHAR, int8_t)
PACKNUMBER(OP_BYTE, u_int8_t)
PACKNUMBER(OP_SHORT, int16_t)
PACKNUMBER(OP_USHORT, u_int16_t)
PACKNUMBER(OP_INT, int32_t)
PACKNUMBER(OP_UINT, u_int32_t)
PACKNUMBER(OP_LONG, int64_t)
PACKNUMBER(OP_ULONG, u_int64_t)
PACKNUMBER(OP_CHAR, s8)
PACKNUMBER(OP_BYTE, u8)
PACKNUMBER(OP_SHORT, s16)
PACKNUMBER(OP_USHORT, u16)
PACKNUMBER(OP_INT, s32)
PACKNUMBER(OP_UINT, u32)
PACKNUMBER(OP_LONG, s64)
PACKNUMBER(OP_ULONG, u64)
case OP_BINMSB:
{
unsigned char sbyte = 0;