had to move unistr2_dup(), unistr2_free() and unistr2_copy() into
authorLuke Leighton <lkcl@samba.org>
Wed, 3 Nov 1999 20:01:07 +0000 (20:01 +0000)
committerLuke Leighton <lkcl@samba.org>
Wed, 3 Nov 1999 20:01:07 +0000 (20:01 +0000)
util_unistr.c in order to get bin/testparm to compile.

source/lib/util_unistr.c
source/rpc_parse/parse_misc.c

index e1a2e26623be72bc63db7cf31e3a0d153c25a0b6..9078a4fbc64571fa9764824ca438ce66f786f9e7 100644 (file)
@@ -261,3 +261,37 @@ void buffer4_to_str(char *dest, const BUFFER4 *str, size_t maxlen)
 
        *dest = 0;
 }
+
+/*******************************************************************
+copies a UNISTR2 structure.
+********************************************************************/
+BOOL copy_unistr2(UNISTR2 *str, const UNISTR2 *from)
+{
+       /* set up string lengths. add one if string is not null-terminated */
+       str->uni_max_len = from->uni_max_len;
+       str->undoc       = from->undoc;
+       str->uni_str_len = from->uni_str_len;
+
+       /* copy the string */
+       memcpy(str->buffer, from->buffer, sizeof(from->buffer));
+
+       return True;
+}
+
+/*******************************************************************
+duplicates a UNISTR2 structure.
+********************************************************************/
+UNISTR2 *unistr2_dup(const UNISTR2 *name)
+{
+       UNISTR2 *copy = (UNISTR2*)malloc(sizeof(*copy));
+       copy_unistr2(copy, name);
+       return copy;
+}
+
+/*******************************************************************
+frees a UNISTR2 structure.
+********************************************************************/
+void unistr2_free(UNISTR2 *name)
+{
+       free(name);
+}
index 471cb59e1c5994319fc46455a3c43b3d00b2a0d6..925adeca128ae37de43115779a5d7b4b51ee3b61 100644 (file)
@@ -744,40 +744,6 @@ BOOL make_buf_unistr2(UNISTR2 *str, uint32 *ptr, char *buf)
        return True;
 }
 
-/*******************************************************************
-copies a UNISTR2 structure.
-********************************************************************/
-BOOL copy_unistr2(UNISTR2 *str, const UNISTR2 *from)
-{
-       /* set up string lengths. add one if string is not null-terminated */
-       str->uni_max_len = from->uni_max_len;
-       str->undoc       = from->undoc;
-       str->uni_str_len = from->uni_str_len;
-
-       /* copy the string */
-       memcpy(str->buffer, from->buffer, sizeof(from->buffer));
-
-       return True;
-}
-
-/*******************************************************************
-duplicates a UNISTR2 structure.
-********************************************************************/
-UNISTR2 *unistr2_dup(const UNISTR2 *name)
-{
-       UNISTR2 *copy = (UNISTR2*)malloc(sizeof(*copy));
-       copy_unistr2(copy, name);
-       return copy;
-}
-
-/*******************************************************************
-frees a UNISTR2 structure.
-********************************************************************/
-void unistr2_free(UNISTR2 *name)
-{
-       free(name);
-}
-
 /*******************************************************************
 creates a STRING2 structure.
 ********************************************************************/