summaryrefslogtreecommitdiffstats
path: root/source/lib/util.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-07-21 00:32:09 +0000
committerLuke Leighton <lkcl@samba.org>1999-07-21 00:32:09 +0000
commit2331aa32ab36c3ee5fd8cfbe972e57299939e33d (patch)
tree06fc60d51e017c48f89fd48961f8d5b8fd120488 /source/lib/util.c
parent50f7bd8a9c47d073bbde66ae26e9f71f030afc4c (diff)
downloadsamba-2331aa32ab36c3ee5fd8cfbe972e57299939e33d.tar.gz
samba-2331aa32ab36c3ee5fd8cfbe972e57299939e33d.tar.xz
samba-2331aa32ab36c3ee5fd8cfbe972e57299939e33d.zip
BDC support.
Diffstat (limited to 'source/lib/util.c')
-rw-r--r--source/lib/util.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/lib/util.c b/source/lib/util.c
index 8a9452ee00a..9a4d0d9e252 100644
--- a/source/lib/util.c
+++ b/source/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;