Mercurial > ~mikael > mcabber > hg
annotate mcabber/src/histolog.h @ 1497:35020a2ed115
Do not use srand()/rand() if better alternatives exist (mirabilos)
arc4random(3) is a self-seeding PRNG available on a lot of OSes (all BSDs,
Darwin / Mac OSX, Interix / Microsoft® Services for Unix, Windows® 2003SR1,
Windows® Vista, Debian with the new libbsd package installed, ???) and much
better than srand(3)/rand(3).
Thanks to GNU autoconf, this can be made portable.
http://www.mirbsd.org/man/arc4random.3
//mirabilos
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 30 Jun 2008 23:13:50 +0200 |
parents | 071c8170b7de |
children | a087125d8fc8 |
rev | line source |
---|---|
110 | 1 #ifndef __HISTOLOG_H__ |
2 #define __HISTOLOG_H__ 1 | |
3 | |
4 #include <glib.h> | |
5 | |
113 | 6 #include "jabglue.h" |
7 | |
281
f562b9af2de7
Add "const" specifier in prototypes
Mikael Berthe <mikael@lilotux.net>
parents:
221
diff
changeset
|
8 void hlog_enable(guint enable, const char *root_dir, guint loadfile); |
1155
3b9bbf6c4c93
Added hlog_get_log_jid(): returns the value of a symlinked history file or NULL if it isn't symlinked
Frank Zschockelt
parents:
1058
diff
changeset
|
9 char *hlog_get_log_jid(const char *bjid); |
1058 | 10 void hlog_read_history(const char *bjid, GList **p_buddyhbuf, guint width); |
1413 | 11 void hlog_write_message(const char *bjid, time_t timestamp, int sent, |
12 const char *msg); | |
13 void hlog_write_status(const char *bjid, time_t timestamp, | |
14 enum imstatus status, const char *status_msg); | |
1437
071c8170b7de
Add option 'statefile' to keep track of unread messages across restarts
Mikael Berthe <mikael@lilotux.net>
parents:
1413
diff
changeset
|
15 void hlog_save_state(void); |
071c8170b7de
Add option 'statefile' to keep track of unread messages across restarts
Mikael Berthe <mikael@lilotux.net>
parents:
1413
diff
changeset
|
16 void hlog_load_state(void); |
110 | 17 |
18 #endif /* __HISTOLOG_H__ */ | |
19 | |
580 | 20 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |