Merged Irssi SVN (upcoming irssi 0.8.11).
[silc.git] / apps / irssi / src / core / misc.h
index 959460778a62a1f011eedddb247967ae7cd28ede..35a9dfc8a5f316e53e669cee43e8daf3612e0838 100644 (file)
@@ -8,14 +8,6 @@
 typedef void* (*FOREACH_FIND_FUNC) (void *item, void *data);
 typedef int (*COLUMN_LEN_FUNC)(void *data);
 
-static inline int nearest_power(int num)
-{
-       int n = 1;
-
-       while (n < num) n <<= 1;
-       return n;
-}
-
 /* Returns 1 if tv1 > tv2, -1 if tv2 > tv1 or 0 if they're equal. */
 int g_timeval_cmp(const GTimeVal *tv1, const GTimeVal *tv2);
 /* Returns "tv1 - tv2", returns the result in milliseconds. Note that
@@ -29,8 +21,6 @@ int strarray_length(char **array);
 /* return index of `item' in `array' or -1 if not found */
 int strarray_find(char **array, const char *item);
 
-int execute(const char *cmd); /* returns pid or -1 = error */
-
 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);
@@ -111,4 +101,13 @@ int expand_escape(const char **data);
 /* Escape all '"', "'" and '\' chars with '\' */
 char *escape_string(const char *str);
 
+/* Like strlcpy(), but return -1 if buffer was overflown, 0 if not. */
+int strocpy(char *dest, const char *src, size_t dstsize);
+
+int nearest_power(int num);
+
+/* Returns TRUE / FALSE */
+int parse_time_interval(const char *time, int *msecs);
+int parse_size(const char *size, int *bytes);
+
 #endif