author | Mikael Berthe <mikael@lilotux.net> |
Sat, 01 Oct 2005 23:17:05 +0200 | |
changeset 469 | a926523d2392 |
parent 452 | dfd9c62b3a39 |
child 524 | 05c0e55c4bb1 |
permissions | -rw-r--r-- |
24 | 1 |
#ifndef __UTILS_H__ |
2 |
#define __UTILS_H__ 1 |
|
3 |
||
469
a926523d2392
Use UTF8 to handle resources and room nicknames
Mikael Berthe <mikael@lilotux.net>
parents:
452
diff
changeset
|
4 |
#define to_utf8(s) ((s) ? g_locale_to_utf8((s), -1, NULL,NULL,NULL) : NULL) |
a926523d2392
Use UTF8 to handle resources and room nicknames
Mikael Berthe <mikael@lilotux.net>
parents:
452
diff
changeset
|
5 |
#define from_utf8(s) ((s) ? g_locale_from_utf8((s), -1, NULL,NULL,NULL) : NULL) |
a926523d2392
Use UTF8 to handle resources and room nicknames
Mikael Berthe <mikael@lilotux.net>
parents:
452
diff
changeset
|
6 |
|
281
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
241
diff
changeset
|
7 |
void ut_InitDebug(unsigned int level, const char *file); |
374
bd5638c21834
Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
8 |
void ut_WriteLog(unsigned int flag, const char *data); |
24 | 9 |
|
362
d8f147d6e872
Check directory and config file permissions
Mikael Berthe <mikael@lilotux.net>
parents:
281
diff
changeset
|
10 |
int checkset_perm(const char *name, unsigned int setmode); |
d8f147d6e872
Check directory and config file permissions
Mikael Berthe <mikael@lilotux.net>
parents:
281
diff
changeset
|
11 |
|
241 | 12 |
int to_iso8601(char *dststr, time_t timestamp); |
13 |
time_t from_iso8601(const char *timestamp, int utc); |
|
14 |
||
419 | 15 |
inline void safe_usleep(unsigned int usec); /* Only for delays < 1s */ |
16 |
||
452 | 17 |
int check_jid_syntax(char *jid); |
18 |
||
19 |
void mc_strtolower(char *str); |
|
20 |
||
24 | 21 |
#endif |