Mercurial > ~mikael > mcabber > hg
annotate mcabber/src/utils.h @ 830:80434fde7cfa
Display presence notification timestamps when they exist
These timestamps were used in the roster, but not in the buffer window
message nor in the history logfile. Reported by "ze".
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 03 May 2006 11:28:41 +0200 |
parents | 8f8d8f8157a2 |
children | 527d6f234924 |
rev | line source |
---|---|
24 | 1 #ifndef __UTILS_H__ |
2 #define __UTILS_H__ 1 | |
3 | |
803
8f8d8f8157a2
Take care of the strcasestr lacking (Cygwin)
Soren Andersen <somian@pobox.com>
parents:
727
diff
changeset
|
4 #include <config.h> |
8f8d8f8157a2
Take care of the strcasestr lacking (Cygwin)
Soren Andersen <somian@pobox.com>
parents:
727
diff
changeset
|
5 |
592
67a332121aea
Try UTF8 -> locale conversion with fallback
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
6 extern char *LocaleCharSet; |
67a332121aea
Try UTF8 -> locale conversion with fallback
Mikael Berthe <mikael@lilotux.net>
parents:
580
diff
changeset
|
7 |
469
a926523d2392
Use UTF8 to handle resources and room nicknames
Mikael Berthe <mikael@lilotux.net>
parents:
452
diff
changeset
|
8 #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
|
9 #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
|
10 "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
|
11 |
281
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
241
diff
changeset
|
12 void ut_InitDebug(unsigned int level, const char *file); |
374
bd5638c21834
Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
364
diff
changeset
|
13 void ut_WriteLog(unsigned int flag, const char *data); |
24 | 14 |
362
d8f147d6e872
Check directory and config file permissions
Mikael Berthe <mikael@lilotux.net>
parents:
281
diff
changeset
|
15 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
|
16 |
524
05c0e55c4bb1
Pass message body to external command
Mikael Berthe <mikael@lilotux.net>
parents:
469
diff
changeset
|
17 const char *ut_get_tmpdir(void); |
05c0e55c4bb1
Pass message body to external command
Mikael Berthe <mikael@lilotux.net>
parents:
469
diff
changeset
|
18 |
241 | 19 int to_iso8601(char *dststr, time_t timestamp); |
20 time_t from_iso8601(const char *timestamp, int utc); | |
21 | |
419 | 22 inline void safe_usleep(unsigned int usec); /* Only for delays < 1s */ |
23 | |
452 | 24 int check_jid_syntax(char *jid); |
25 | |
26 void mc_strtolower(char *str); | |
27 | |
554
2424bbf0a6db
Some more work on do_room()
Mikael Berthe <mikael@lilotux.net>
parents:
551
diff
changeset
|
28 void strip_arg_special_chars(char *s); |
2424bbf0a6db
Some more work on do_room()
Mikael Berthe <mikael@lilotux.net>
parents:
551
diff
changeset
|
29 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
|
30 void free_arg_lst(char **arglst); |
c71699efa5cc
Add split_arg() / free_arg_lst()
Mikael Berthe <mikael@lilotux.net>
parents:
524
diff
changeset
|
31 |
655
de6837908702
Use "(...)" when cutting a multi-line status message in the log window
Mikael Berthe <mikael@lilotux.net>
parents:
592
diff
changeset
|
32 void replace_nl_with_dots(char *bufstr); |
727
1c3620668857
Expand tabs when reading history files
Mikael Berthe <mikael@lilotux.net>
parents:
655
diff
changeset
|
33 char *ut_expand_tabs(const char *text); |
655
de6837908702
Use "(...)" when cutting a multi-line status message in the log window
Mikael Berthe <mikael@lilotux.net>
parents:
592
diff
changeset
|
34 |
803
8f8d8f8157a2
Take care of the strcasestr lacking (Cygwin)
Soren Andersen <somian@pobox.com>
parents:
727
diff
changeset
|
35 #if !defined (HAVE_STRCASESTR) |
8f8d8f8157a2
Take care of the strcasestr lacking (Cygwin)
Soren Andersen <somian@pobox.com>
parents:
727
diff
changeset
|
36 char *strcasestr(const char *haystack, const char *needle); |
24 | 37 #endif |
576 | 38 |
803
8f8d8f8157a2
Take care of the strcasestr lacking (Cygwin)
Soren Andersen <somian@pobox.com>
parents:
727
diff
changeset
|
39 #endif // __UTILS_H__ |
8f8d8f8157a2
Take care of the strcasestr lacking (Cygwin)
Soren Andersen <somian@pobox.com>
parents:
727
diff
changeset
|
40 |
580 | 41 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |