mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 07:02:12 +02:00
some comment changes, moved nearest_power() to misc.h
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1501 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
a88cd53ea5
commit
ccccd1fdc4
3 changed files with 14 additions and 10 deletions
|
|
@ -8,7 +8,18 @@
|
|||
typedef void* (*FOREACH_FIND_FUNC) (void *item, void *data);
|
||||
typedef int (*COLUMN_LEN_FUNC)(void *data);
|
||||
|
||||
static inline int nearest_power(int num)
|
||||
{
|
||||
int n = 1;
|
||||
|
||||
while (n < num) n <<= 1;
|
||||
return n;
|
||||
}
|
||||
|
||||
/* Returns 1 if tv1 > tv2, -1 if tv2 > tv1 or 0 if they're equal. */
|
||||
int g_timeval_cmp(const GTimeVal *tv1, const GTimeVal *tv2);
|
||||
/* Returns "tv1 - tv2", returns the result in milliseconds. Note that
|
||||
if the difference is too large, the result might be invalid. */
|
||||
long get_timeval_diff(const GTimeVal *tv1, const GTimeVal *tv2);
|
||||
|
||||
/* find `item' from a space separated `list' */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue