From b7f37ce357592590f96141721eabcc94e73b77de Mon Sep 17 00:00:00 2001 From: leitner Date: Sat, 31 Aug 2002 00:00:11 +0000 Subject: [PATCH] oops, forgot to add one file --- mstorage_add_bin.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 mstorage_add_bin.c diff --git a/mstorage_add_bin.c b/mstorage_add_bin.c new file mode 100644 index 0000000..3f5b2ea --- /dev/null +++ b/mstorage_add_bin.c @@ -0,0 +1,25 @@ +#include "uint32.h" +#include "mstorage.h" + +/* this is tinyldap specific. If the data contains at least one 0-byte, + * it is stored in a tinyldap specific encoding: + * char 0; + * uint32 len; + * char data[len] */ +long mstorage_add_bin(mstorage_t* p,const char* s,unsigned long n) { + unsigned int i; + static char zero; + long x; + char intbuf[4]; + for (i=0; i