aboutsummaryrefslogtreecommitdiffstats
path: root/support.h
blob: adba8a05dbd7a9a404696da199546969d266b7d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifdef HAVE_LIBGEN_H
#include <libgen.h>
#endif

char *concat_path(char *p1, char *p2);

#ifndef HAVE_BASENAME
char *basename(char *path);
#endif

#ifndef HAVE_STRCASESTR
char *strcasestr(const char *haystack, const char *needle);
#endif

#define IS_WHITESPACE(c) (c==' ' || c=='\t' || c=='\r' || c=='\n')

char *trim(char *str);
char *remove_trailing_slash(char *path);
char *lowerstr(char *str);


int charset_init(void);
int charset_close(void);
char *utf8_to_locale(char *str);
char *locale_to_utf8(char *str);