summaryrefslogtreecommitdiffstats
path: root/source/include/byteorder.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/include/byteorder.h')
-rw-r--r--source/include/byteorder.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/include/byteorder.h b/source/include/byteorder.h
index b0dc1b1941d..7326ec2abe1 100644
--- a/source/include/byteorder.h
+++ b/source/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"));