diff options
Diffstat (limited to 'source3/include/byteorder.h')
-rw-r--r-- | source3/include/byteorder.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/include/byteorder.h b/source3/include/byteorder.h index b0dc1b1941..7326ec2abe 100644 --- a/source3/include/byteorder.h +++ b/source3/include/byteorder.h @@ -202,24 +202,27 @@ 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) \ +#define DBG_RW_PCVAL(charmode,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)); \ + if (charmode) print_asc(5, (char*)(outbuf), (len)); else \ { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%02x ", CVAL(&((outbuf)[idx]), 0))); } } \ DEBUG(5,("\n")); -#define DBG_RW_PSVAL(string,depth,base,read,inbuf,outbuf,len) \ +#define DBG_RW_PSVAL(charmode,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)); \ + if (charmode) print_asc(5, (char*)(outbuf), 2*(len)); else \ { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%04x ", SVAL(&((outbuf)[idx]), 0))); } } \ DEBUG(5,("\n")); -#define DBG_RW_PIVAL(string,depth,base,read,inbuf,outbuf,len) \ +#define DBG_RW_PIVAL(charmode,string,depth,base,read,inbuf,outbuf,len) \ RW_PIVAL(read,inbuf,outbuf,len) \ DEBUG(5,("%s%04x %s: ", \ tab_depth(depth), PTR_DIFF(inbuf,base),string)); \ + if (charmode) print_asc(5, (char*)(outbuf), 4*(len)); else \ { int idx; for (idx = 0; idx < len; idx++) { DEBUG(5,("%08x ", IVAL(&((outbuf)[idx]), 0))); } } \ DEBUG(5,("\n")); |