Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/hbuf.c @ 464:e4840b288be0
Add "/buffer date"
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 29 Sep 2005 22:31:56 +0200 |
parents | d580e87c11ed |
children | 3134b4960cdb |
comparison
equal
deleted
inserted
replaced
463:339e85418b49 | 464:e4840b288be0 |
---|---|
294 } | 294 } |
295 | 295 |
296 return hbuf; | 296 return hbuf; |
297 } | 297 } |
298 | 298 |
299 // hbuf_jump_date(hbuf, t) | |
300 // Return a pointer to the first line after date t in the history buffer | |
301 GList *hbuf_jump_date(GList *hbuf, time_t t) | |
302 { | |
303 hbuf_block *blk; | |
304 | |
305 hbuf = g_list_first(hbuf); | |
306 | |
307 for ( ; hbuf && g_list_next(hbuf); hbuf = g_list_next(hbuf)) { | |
308 blk = (hbuf_block*)(hbuf->data); | |
309 if (blk->prefix.timestamp >= t) break; | |
310 } | |
311 | |
312 return hbuf; | |
313 } | |
314 | |
299 // hbuf_jump_percent(hbuf, pc) | 315 // hbuf_jump_percent(hbuf, pc) |
300 // Return a pointer to the line at % pc of the history buffer | 316 // Return a pointer to the line at % pc of the history buffer |
301 GList *hbuf_jump_percent(GList *hbuf, int pc) | 317 GList *hbuf_jump_percent(GList *hbuf, int pc) |
302 { | 318 { |
303 guint hlen; | 319 guint hlen; |