port latest changes from SAMBA_3_0 tree
[samba.git] / source3 / lib / util_unistr.c
index ae000fba02306a0cfaae5a8a2d0cf8d3c6b60054..fd51f3c57d998ac0060eaa0ed96f78782f66d231 100644 (file)
@@ -759,82 +759,6 @@ smb_ucs2_t *strstr_wa(const smb_ucs2_t *s, const char *ins)
        return NULL;
 }
 
-/*******************************************************************
-copy a string with max len
-********************************************************************/
-
-smb_ucs2_t *strncpy_wa(smb_ucs2_t *dest, const char *src, const size_t max)
-{
-       smb_ucs2_t *ucs2_src;
-
-       if (!dest || !src) return NULL;
-       if (!(ucs2_src = acnv_uxu2(src)))
-               return NULL;
-       
-       strncpy_w(dest, ucs2_src, max);
-       SAFE_FREE(ucs2_src);
-       return dest;
-}
-
-/*******************************************************************
-convert and duplicate an ascii string
-********************************************************************/
-smb_ucs2_t *strdup_wa(const char *src)
-{
-       return strndup_wa(src, 0);
-}
-
-/* if len == 0 then duplicate the whole string */
-smb_ucs2_t *strndup_wa(const char *src, size_t len)
-{
-       smb_ucs2_t *dest, *s;
-
-       s = acnv_dosu2(src);    
-       if (!len) len = strlen_w(s);
-       dest = (smb_ucs2_t *)malloc((len + 1) * sizeof(smb_ucs2_t));
-       if (!dest) {
-               DEBUG(0,("strdup_w: out of memory!\n"));
-               SAFE_FREE(s);
-               return NULL;
-       }
-
-       memcpy(dest, src, len * sizeof(smb_ucs2_t));
-       dest[len] = 0;
-
-       SAFE_FREE(s);
-       return dest;
-}
-
-/*******************************************************************
-append a string of len bytes and add a terminator
-********************************************************************/
-
-smb_ucs2_t *strncat_wa(smb_ucs2_t *dest, const char *src, const size_t max)
-{
-       smb_ucs2_t *ucs2_src;
-
-       if (!dest || !src) return NULL;
-       if (!(ucs2_src = acnv_uxu2(src)))
-               return NULL;
-       
-       strncat_w(dest, ucs2_src, max);
-       SAFE_FREE(ucs2_src);
-       return dest;
-}
-
-smb_ucs2_t *strcat_wa(smb_ucs2_t *dest, const char *src)
-{      
-       smb_ucs2_t *ucs2_src;
-       
-       if (!dest || !src) return NULL;
-       if (!(ucs2_src = acnv_uxu2(src)))
-               return NULL;
-       
-       strcat_w(dest, ucs2_src);
-       SAFE_FREE(ucs2_src);
-       return dest;
-}
-
 BOOL trim_string_wa(smb_ucs2_t *s, const char *front,
                                  const char *back)
 {