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
/* 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);
/* Create the directory and all it's parent directories */
int mkpath(const char *path, int mode);
-
-/* Get home directory */
-const char *get_home_dir(void);
-
/* convert ~/ to $HOME */
char *convert_home(const char *path);
int octal2dec(int octal);
int dec2octal(int decimal);
+/* string -> uoff_t */
+uoff_t str_to_uofft(const char *str);
+
/* convert all low-ascii (<32) to ^<A..> combinations */
char *show_lowascii(const char *channel);
one after '\'. Returns the expanded character or -1 if error. */
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