mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +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
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue