summaryrefslogtreecommitdiff
path: root/src/core/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/misc.h')
-rw-r--r--src/core/misc.h23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/core/misc.h b/src/core/misc.h
index 8fb5078f..00637da0 100644
--- a/src/core/misc.h
+++ b/src/core/misc.h
@@ -21,6 +21,9 @@ GSList *gslist_find_string(GSList *list, const char *key);
GSList *gslist_find_icase_string(GSList *list, const char *key);
GList *glist_find_string(GList *list, const char *key);
GList *glist_find_icase_string(GList *list, const char *key);
+GSList *gslist_remove_string (GSList *list, const char *str);
+
+void gslist_free_full (GSList *list, GDestroyNotify free_func);
void *gslist_foreach_find(GSList *list, FOREACH_FIND_FUNC func, const void *data);
@@ -29,15 +32,8 @@ char *gslistptr_to_string(GSList *list, int offset, const char *delimiter);
/* `list' contains char* */
char *gslist_to_string(GSList *list, const char *delimiter);
-/* save all keys in hash table to linked list - you shouldn't remove any
- items while using this list, use g_slist_free() after you're done with it */
-GSList *hashtable_get_keys(GHashTable *hash);
-
-/* easy way to check if regexp matches */
-int regexp_match(const char *str, const char *regexp);
+GList *optlist_remove_known(const char *cmd, GHashTable *optlist);
-/* Create the directory and all it's parent directories */
-int mkpath(const char *path, int mode);
/* convert ~/ to $HOME */
char *convert_home(const char *path);
@@ -82,9 +78,6 @@ int parse_size(const char *size, int *bytes);
Stop when `end_char' is found from string. */
int is_numeric(const char *str, char end_char);
-/* Like strlcpy(), but return -1 if buffer was overflown, 0 if not. */
-int strocpy(char *dest, const char *src, size_t dstsize);
-
/* strstr() with case-ignoring */
char *stristr(const char *data, const char *key);
@@ -104,8 +97,6 @@ char *show_lowascii(const char *str);
/* replace all `from' chars in string to `to' chars. returns `str' */
char *replace_chars(char *str, char from, char to);
-/* return how many items `array' has */
-int strarray_length(char **array);
/* return index of `item' in `array' or -1 if not found */
int strarray_find(char **array, const char *item);
@@ -116,6 +107,10 @@ uoff_t str_to_uofft(const char *str);
int find_substr(const char *list, const char *item);
/* split `str' into `len' sized substrings */
-char **strsplit_len(const char *str, int len);
+char **strsplit_len(const char *str, int len, gboolean onspace);
+
+/* Convert a given buffer to a printable, colon-delimited, hex string and
+ * return a pointer to the newly allocated buffer */
+char *binary_to_hex(unsigned char *buffer, size_t size);
#endif