version 1.8, 2015/11/05 22:08:44 |
version 1.9, 2015/11/06 15:09:07 |
|
|
} |
} |
|
|
static int loopcount; |
static int loopcount; |
static long startime; |
static time_t startime; |
|
|
static void |
static void |
longish(void) |
longish(void) |
{ |
{ |
if (loopcount >= 0 && ++loopcount > 100) { |
if (loopcount >= 0 && ++loopcount > 100) { |
loopcount = 0; |
loopcount = 0; |
if (get_time() >= startime + LONGTIME) { |
if (time(NULL) >= startime + LONGTIME) { |
longloopmessage(); |
longloopmessage(); |
loopcount = -1; |
loopcount = -1; |
} |
} |
|
|
* The decision is based on which way involves |
* The decision is based on which way involves |
* traversing fewer bytes in the file. |
* traversing fewer bytes in the file. |
*/ |
*/ |
startime = get_time(); |
startime = time(NULL); |
if (p == &anchor || pos - p->prev->pos < p->pos - pos) { |
if (p == &anchor || pos - p->prev->pos < p->pos - pos) { |
/* |
/* |
* Go forward. |
* Go forward. |