diff options
author | Luke Leighton <lkcl@samba.org> | 1999-07-21 00:32:09 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-07-21 00:32:09 +0000 |
commit | 6a5a4e818684a616306d2954d1a2612113b314a6 (patch) | |
tree | e1900e634df995f0a1d36c063645cd4997a9529f /source3/lib/util.c | |
parent | 46ce0d4619839f40f910eb4a0d2c3da01436bc88 (diff) | |
download | samba-6a5a4e818684a616306d2954d1a2612113b314a6.tar.gz samba-6a5a4e818684a616306d2954d1a2612113b314a6.tar.xz samba-6a5a4e818684a616306d2954d1a2612113b314a6.zip |
BDC support.
(This used to be commit 2331aa32ab36c3ee5fd8cfbe972e57299939e33d)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 8a9452ee00a..9a4d0d9e252 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2931,6 +2931,33 @@ void out_ascii(FILE *f, unsigned char *buf,int len) } } +void out_struct(FILE *f,char *buf1,int len, int per_line) +{ + unsigned char *buf = (unsigned char *)buf1; + int i; + + if (len<=0) + { + return; + } + + fprintf(f, "{\n\t"); + for (i=0;i<len;) + { + fprintf(f, "0x%02X",(int)buf[i]); + i++; + if (i != len) + { + fprintf(f, ", "); + } + if (i%per_line == 0 && i != len) + { + fprintf(f, "\n\t"); + } + } + fprintf(f, "\n};\n"); +} + void out_data(FILE *f,char *buf1,int len, int per_line) { unsigned char *buf = (unsigned char *)buf1; |