Mercurial > hg
annotate mcabber/src/utils.h @ 632:cfab93886a88
MUC: use timestamp when available
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 23 Dec 2005 22:57:34 +0100 |
parents | 67a332121aea |
children | de6837908702 |
rev | line source |
---|---|
24 | 1 #ifndef __UTILS_H__ |
2 #define __UTILS_H__ 1 | |
3 | |
592
67a332121aea
Try UTF8 -> locale conversion with fallback
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
4 extern char *LocaleCharSet; |
67a332121aea
Try UTF8 -> locale conversion with fallback
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
5 |
469
a926523d2392
Use UTF8 to handle resources and room nicknames
Mikael Berthe <mikael@lilotux.net>
parents:
452
diff
changeset
|
6 #define to_utf8(s) ((s) ? g_locale_to_utf8((s), -1, NULL,NULL,NULL) : NULL) |
592
67a332121aea
Try UTF8 -> locale conversion with fallback
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
7 #define from_utf8(s) ((s) ? g_convert_with_fallback((s), -1, LocaleCharSet, \ |
67a332121aea
Try UTF8 -> locale conversion with fallback
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
8 "UTF-8", NULL,NULL,NULL,NULL) : NULL) |
469
a926523d2392
Use UTF8 to handle resources and room nicknames
Mikael Berthe <mikael@lilotux.net>
parents:
452
diff
changeset
|
9 |
281
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
241
diff
changeset
|
10 void ut_InitDebug(unsigned int level, const char *file); |
374
bd5638c21834
Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
11 void ut_WriteLog(unsigned int flag, const char *data); |
24 | 12 |
362
d8f147d6e872
Check directory and config file permissions
Mikael Berthe <mikael@lilotux.net>
parents:
281
diff
changeset
|
13 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
|
14 |
524
05c0e55c4bb1
Pass message body to external command
Mikael Berthe <mikael@lilotux.net>
parents:
469
diff
changeset
|
15 const char *ut_get_tmpdir(void); |
05c0e55c4bb1
Pass message body to external command
Mikael Berthe <mikael@lilotux.net>
parents:
469
diff
changeset
|
16 |
241 | 17 int to_iso8601(char *dststr, time_t timestamp); |
18 time_t from_iso8601(const char *timestamp, int utc); | |
19 | |
419 | 20 inline void safe_usleep(unsigned int usec); /* Only for delays < 1s */ |
21 | |
452 | 22 int check_jid_syntax(char *jid); |
23 | |
24 void mc_strtolower(char *str); | |
25 | |
554
2424bbf0a6db
Some more work on do_room()
Mikael Berthe <mikael@lilotux.net>
parents:
551
diff
changeset
|
26 void strip_arg_special_chars(char *s); |
2424bbf0a6db
Some more work on do_room()
Mikael Berthe <mikael@lilotux.net>
parents:
551
diff
changeset
|
27 char **split_arg(const char *arg, unsigned int n, int dontstriplast); |
551
c71699efa5cc
Add split_arg() / free_arg_lst()
Mikael Berthe <mikael@lilotux.net>
parents:
524
diff
changeset
|
28 void free_arg_lst(char **arglst); |
c71699efa5cc
Add split_arg() / free_arg_lst()
Mikael Berthe <mikael@lilotux.net>
parents:
524
diff
changeset
|
29 |
24 | 30 #endif |
576 | 31 |
580 | 32 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |