comparison mcabber/src/hbuf.c @ 462:d580e87c11ed

Add "/buffer %n"
author Mikael Berthe <mikael@lilotux.net>
date Thu, 29 Sep 2005 21:28:39 +0200
parents f8f3c7493457
children e4840b288be0
comparison
equal deleted inserted replaced
461:1d8f5b3a5f2b 462:d580e87c11ed
293 break; 293 break;
294 } 294 }
295 295
296 return hbuf; 296 return hbuf;
297 } 297 }
298
299 // hbuf_jump_percent(hbuf, pc)
300 // Return a pointer to the line at % pc of the history buffer
301 GList *hbuf_jump_percent(GList *hbuf, int pc)
302 {
303 guint hlen;
304
305 hbuf = g_list_first(hbuf);
306 hlen = g_list_length(hbuf);
307
308 return g_list_nth(hbuf, pc*hlen/100);
309 }