mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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
@ -1,7 +1,7 @@
|
||||
/*
|
||||
args.c : irssi
|
||||
args.c : small frontend to libPopt command line argument parser
|
||||
|
||||
Copyright (C) 1999-2000 Timo Sirainen
|
||||
Copyright (C) 1999-2001 Timo Sirainen
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "module.h"
|
||||
#include "misc.h"
|
||||
|
||||
/* Maximum line length - split to two lines if it's longer than this.
|
||||
|
||||
@ -38,14 +39,6 @@ struct _LINEBUF_REC {
|
||||
char *str;
|
||||
};
|
||||
|
||||
static inline int nearest_power(int num)
|
||||
{
|
||||
int n = 1;
|
||||
|
||||
while (n < num) n <<= 1;
|
||||
return n;
|
||||
}
|
||||
|
||||
static void linebuf_append(LINEBUF_REC *rec, const char *data, int len)
|
||||
{
|
||||
if (rec->len+len > rec->alloc) {
|
||||
|
@ -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…
Reference in New Issue
Block a user