aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/helpers.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-15 06:32:01 -0800
committerChris Robinson <[email protected]>2018-11-15 06:32:01 -0800
commit245b7ff0b41ebd43f3c1c53dd90ab0bf358e4c06 (patch)
treea48dda544928194b84ae71e8789274f6025c7c3e /Alc/helpers.cpp
parent7b3a2085aac8eac47f9968f331d3991167793e85 (diff)
Remove the unused al_string API
Diffstat (limited to 'Alc/helpers.cpp')
-rw-r--r--Alc/helpers.cpp99
1 files changed, 0 insertions, 99 deletions
diff --git a/Alc/helpers.cpp b/Alc/helpers.cpp
index 89f60380..d31101f7 100644
--- a/Alc/helpers.cpp
+++ b/Alc/helpers.cpp
@@ -120,7 +120,6 @@ DEFINE_PROPERTYKEY(PKEY_AudioEndpoint_GUID, 0x1da5d803, 0xd492, 0x4edd, 0x8c, 0x
#include "fpu_modes.h"
#include "uintmap.h"
#include "vector.h"
-#include "alstring.h"
#include "compat.h"
#include "threads.h"
@@ -736,101 +735,3 @@ char *alstrdup(const char *str)
memcpy(ret, str, len);
return ret;
}
-
-
-void alstr_clear(al_string *str)
-{
- if(!alstr_empty(*str))
- {
- /* Reserve one more character than the total size of the string. This
- * is to ensure we have space to add a null terminator in the string
- * data so it can be used as a C-style string.
- */
- VECTOR_RESIZE(*str, 0, 1);
- VECTOR_ELEM(*str, 0) = 0;
- }
-}
-
-static inline int alstr_compare(const al_string_char_type *str1, size_t str1len,
- const al_string_char_type *str2, size_t str2len)
-{
- size_t complen = (str1len < str2len) ? str1len : str2len;
- int ret = memcmp(str1, str2, complen);
- if(ret == 0)
- {
- if(str1len > str2len) return 1;
- if(str1len < str2len) return -1;
- }
- return ret;
-}
-int alstr_cmp(const_al_string str1, const_al_string str2)
-{
- return alstr_compare(&VECTOR_FRONT(str1), alstr_length(str1),
- &VECTOR_FRONT(str2), alstr_length(str2));
-}
-int alstr_cmp_cstr(const_al_string str1, const al_string_char_type *str2)
-{
- return alstr_compare(&VECTOR_FRONT(str1), alstr_length(str1),
- str2, strlen(str2));
-}
-
-void alstr_copy(al_string *str, const_al_string from)
-{
- size_t len = alstr_length(from);
- VECTOR_RESIZE(*str, len, len+1);
- for(size_t i{0};i < len;i++)
- VECTOR_ELEM(*str, i) = VECTOR_ELEM(from, i);
- VECTOR_ELEM(*str, len) = 0;
-}
-
-void alstr_copy_cstr(al_string *str, const al_string_char_type *from)
-{
- size_t len = strlen(from);
- VECTOR_RESIZE(*str, len, len+1);
- for(size_t i{0};i < len;i++)
- VECTOR_ELEM(*str, i) = from[i];
- VECTOR_ELEM(*str, len) = 0;
-}
-
-void alstr_copy_range(al_string *str, const al_string_char_type *from, const al_string_char_type *to)
-{
- size_t len = to - from;
- VECTOR_RESIZE(*str, len, len+1);
- for(size_t i{0};i < len;i++)
- VECTOR_ELEM(*str, i) = from[i];
- VECTOR_ELEM(*str, len) = 0;
-}
-
-void alstr_append_char(al_string *str, const al_string_char_type c)
-{
- size_t len = alstr_length(*str);
- VECTOR_RESIZE(*str, len+1, len+2);
- VECTOR_BACK(*str) = c;
- VECTOR_ELEM(*str, len+1) = 0;
-}
-
-void alstr_append_cstr(al_string *str, const al_string_char_type *from)
-{
- size_t len = strlen(from);
- if(len != 0)
- {
- size_t base = alstr_length(*str);
- VECTOR_RESIZE(*str, base+len, base+len+1);
- for(size_t i{0};i < len;i++)
- VECTOR_ELEM(*str, base+i) = from[i];
- VECTOR_ELEM(*str, base+len) = 0;
- }
-}
-
-void alstr_append_range(al_string *str, const al_string_char_type *from, const al_string_char_type *to)
-{
- size_t len = to - from;
- if(len != 0)
- {
- size_t base = alstr_length(*str);
- VECTOR_RESIZE(*str, base+len, base+len+1);
- for(size_t i{0};i < len;i++)
- VECTOR_ELEM(*str, base+i) = from[i];
- VECTOR_ELEM(*str, base+len) = 0;
- }
-}