]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
unistr: remove unused functions
authorBaptiste Daroussin <bapt@FreeBSD.org>
Tue, 7 Jan 2025 16:51:42 +0000 (17:51 +0100)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Tue, 7 Jan 2025 16:56:15 +0000 (17:56 +0100)
include/unistr.h
src/unistr.c

index 05fc20e651fe9672468a4bc825078bf6505cdd74..9d78b084db576bc1fb017fa1f14a03986fc48526 100644 (file)
@@ -34,7 +34,6 @@ typedef struct _unistr {
 
 unistr *unistr_new(void);
 void unistr_free(unistr *str);
-unistr *unistr_dup(const unistr *str);
 void unistr_append_char(unistr *str, unistr_char uc);
 void unistr_append_usascii(unistr *str, const char *binary, size_t bin_len);
 void unistr_append_utf8(unistr *str, const char *binary, size_t bin_len);
index 1c1811f199ed62647f017fab280c8e25a3fd109d..2984cc2cc6684778a6813fb1fcdfde8f71824ffd 100644 (file)
@@ -63,20 +63,6 @@ void unistr_free(unistr *str)
 }
 
 
-unistr *unistr_dup(const unistr *str)
-{
-       unistr *ret;
-       unsigned int i;
-
-       ret = unistr_new();
-       for (i=0; i<str->len; i++) {
-               unistr_append_char(ret, str->chars[i]);
-       }
-
-       return ret;
-}
-
-
 void unistr_append_char(unistr *str, unistr_char uc)
 {
        if (str->len >= str->alloc_len) {
@@ -208,25 +194,6 @@ void unistr_append_iconv(unistr *str, char *binary, size_t bin_len,
 }
 
 
-void unistr_dump(const unistr *str)
-{
-       unsigned int i;
-
-       printf("unistr_dump(%p)\n", (void *)str);
-       printf(" ->len = %lu\n", (unsigned long)str->len);
-       printf(" ->alloc_len = %lu\n", (unsigned long)str->alloc_len);
-       printf(" ->chars [ ");
-       for (i=0; i<str->len; i++) {
-               if ((str->chars[i] <= 0x7F) && (str->chars[i] != '\n')) {
-                       printf("'%c' ", str->chars[i]);
-               } else {
-                       printf("0x%02X ", str->chars[i]);
-               }
-       }
-       printf("]\n");
-}
-
-
 char *unistr_to_utf8(const unistr *str)
 {
        unsigned int i;