diff options
Diffstat (limited to 'source3/include/byteorder.h')
-rw-r--r-- | source3/include/byteorder.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source3/include/byteorder.h b/source3/include/byteorder.h index 0664a338175..e8989ee7e44 100644 --- a/source3/include/byteorder.h +++ b/source3/include/byteorder.h @@ -198,3 +198,32 @@ it also defines lots of intermediate macros, just ignore those :-) #define RSSVAL(buf,pos,val) SSVAL(buf,pos,SREV(val)) #define RSIVAL(buf,pos,val) SIVAL(buf,pos,IREV(val)) +#define DBG_RW_PCVAL(string,depth,base,read,inbuf,outbuf,len) \ + RW_PCVAL(read,inbuf,outbuf,len) \ + DEBUG(5,("%s %04x %s: ", \ + tab_depth(depth), PTR_DIFF(inbuf,base),string)); \ + { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%d ", (inbuf)[idx])); } } \ + DEBUG(5,("\n")); + +#define DBG_RW_PSVAL(string,depth,base,read,inbuf,outbuf,len) \ + RW_PSVAL(read,inbuf,outbuf,len) \ + DEBUG(5,("%s %04x %s: ", \ + tab_depth(depth), PTR_DIFF(inbuf,base),string)); \ + { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%d ", (inbuf)[idx])); } } \ + DEBUG(5,("\n")); + +#define DBG_RW_CVAL(string,depth,base,read,inbuf,outbuf) \ + RW_CVAL(read,inbuf,outbuf,0) \ + DEBUG(5,("%s %04x %s: %02x\n", \ + tab_depth(depth), PTR_DIFF(inbuf,base),string, (unsigned int)*(inbuf))); + +#define DBG_RW_SVAL(string,depth,base,read,inbuf,outbuf) \ + RW_SVAL(read,inbuf,outbuf,0) \ + DEBUG(5,("%s %04x %s: %04x\n", \ + tab_depth(depth), PTR_DIFF(inbuf,base),string, (unsigned int)*(inbuf))); + +#define DBG_RW_IVAL(string,depth,base,read,inbuf,outbuf) \ + RW_IVAL(read,inbuf,outbuf,0) \ + DEBUG(5,("%s %04x %s: %08x\n", \ + tab_depth(depth), PTR_DIFF(inbuf,base),string, (unsigned int)*(inbuf))); + |