Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/hbuf.c @ 1424:bb1cc8902d0e
Allow "/buffer list" when debugging mode is disabled
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 17 Feb 2008 21:19:48 +0100 |
parents | 757ebe4df0b9 |
children | 0121b6f3047c |
comparison
equal
deleted
inserted
replaced
1423:757ebe4df0b9 | 1424:bb1cc8902d0e |
---|---|
410 hlen = g_list_length(hbuf); | 410 hlen = g_list_length(hbuf); |
411 | 411 |
412 return g_list_nth(hbuf, pc*hlen/100); | 412 return g_list_nth(hbuf, pc*hlen/100); |
413 } | 413 } |
414 | 414 |
415 #ifdef ENABLE_DEBUG | |
416 // hbuf_get_blocks_number() | 415 // hbuf_get_blocks_number() |
417 // Returns the number of allocated hbuf_block's. | 416 // Returns the number of allocated hbuf_block's. |
418 guint hbuf_get_blocks_number(GList *hbuf) | 417 guint hbuf_get_blocks_number(GList *hbuf) |
419 { | 418 { |
420 hbuf_block *hbuf_b_elt; | 419 hbuf_block *hbuf_b_elt; |
425 if (hbuf_b_elt->flags & HBB_FLAG_ALLOC) | 424 if (hbuf_b_elt->flags & HBB_FLAG_ALLOC) |
426 count++; | 425 count++; |
427 } | 426 } |
428 return count; | 427 return count; |
429 } | 428 } |
430 #endif | |
431 | 429 |
432 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ | 430 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |