Code

const pointers
[ncmpc.git] / src / support.h
1 #ifndef SUPPORT_H
2 #define SUPPORT_H
4 #ifdef HAVE_LIBGEN_H
5 #include <libgen.h>
6 #endif
8 #ifndef HAVE_BASENAME
9 char *basename(char *path);
10 #endif
12 #define IS_WHITESPACE(c) (c==' ' || c=='\t' || c=='\r' || c=='\n')
14 char *remove_trailing_slash(char *path);
15 char *lowerstr(char *str);
16 char *strcasestr(const char *haystack, const char *needle);
18 typedef struct {
19         int offset;
20         GTime t; /* GTime is equivalent to time_t */
21 } scroll_state_t;
23 char *strscroll(char *str, char *separator, int width, scroll_state_t *st);
25 void charset_init(gboolean disable);
26 char *utf8_to_locale(const char *str);
27 char *locale_to_utf8(const char *str);
29 /* number of characters in str */
30 size_t my_strlen(const char *str);
31 /* number of bytes in str */
32 size_t my_strsize(char *str);
35 #endif