Commit 9745aa21 authored by Bernhard Link's avatar Bernhard Link

add INT32_32 type

parent a393d31e
2010-12-22
* Add INT32_32 type for a 64 bit integer stored in two 32 bit integers
2010-12-21
* Add --monotonic-timestamps to print timestamps relative to system
start (or whatever CLOCK_MONOTONIC returns on your system).
......
......@@ -955,6 +955,7 @@ static size_t print_parameters(struct connection *c,const unsigned char *buffer,
const char *atom;
double d;
float f;
long long ll;
if( p->offse == OFS_LATER )
ofs = lastofs;
......@@ -1140,6 +1141,17 @@ static size_t print_parameters(struct connection *c,const unsigned char *buffer,
u32 = getCARD32(ofs + 4);
fprintf(out,"%d/%u", i32, u32);
continue;
case ft_INT32_32:
if( ofs + 8 > len )
continue;
if( print_offsets )
fprintf(out,"[%d]",(int)ofs);
fputs(p->name,out);putc('=',out);
i32 = getCARD32(ofs);
u32 = getCARD32(ofs + 4);
ll = (((long long)i32)<< 32LL) + (long long)u32;
fprintf(out, "%lld", ll);
continue;
case ft_EVENT:
if( len >= ofs + 32 )
print_event(c, buffer + ofs, len - ofs);
......@@ -1317,6 +1329,7 @@ static size_t print_parameters(struct connection *c,const unsigned char *buffer,
case ft_EVENT:
case ft_FRACTION16_16:
case ft_FRACTION32_32:
case ft_INT32_32:
case ft_FIXED:
case ft_LISTofFIXED:
case ft_FIXED3232:
......
......@@ -118,6 +118,9 @@ struct parameter {
ft_FRACTION16_16,
/* dito 32 bit */
ft_FRACTION32_32,
/* a 64 bit number consisting of first the high 32 bit, then
* the low 32 bti */
ft_INT32_32,
/* set stored value to specific value */
ft_DECREMENT_STORED,
ft_SET
......
......@@ -93,6 +93,7 @@ static const struct base_type {
{ "BE32", ft_BE32, ALLOWS_CONSTANTS, 4},
{ "FRACTION16_16", ft_FRACTION16_16, 0, 4},
{ "FRACTION32_32", ft_FRACTION32_32, 0, 8},
{ "INT32_32", ft_INT32_32, 0, 8},
{ "FIXED", ft_FIXED, 0, 4},
{ "FIXED1616", ft_FIXED, 0, 4},
{ "FIXED3232", ft_FIXED3232, 0, 8},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment