mcabber/src/hbuf.c
changeset 462 d580e87c11ed
parent 393 f8f3c7493457
child 464 e4840b288be0
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 }