From: Baptiste Daroussin Date: Tue, 7 Jan 2025 16:51:42 +0000 (+0100) Subject: unistr: remove unused functions X-Git-Tag: RELEASE_1_5_0~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=932d3253bc2dd10ae97f23d834cbe500b80146b8;p=thirdparty%2Fmlmmj.git unistr: remove unused functions --- diff --git a/include/unistr.h b/include/unistr.h index 05fc20e6..9d78b084 100644 --- a/include/unistr.h +++ b/include/unistr.h @@ -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); diff --git a/src/unistr.c b/src/unistr.c index 1c1811f1..2984cc2c 100644 --- a/src/unistr.c +++ b/src/unistr.c @@ -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; ilen; 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; ilen; 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;