mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-29 16:14:43 +00:00
commit
bb8893c188
@ -196,16 +196,11 @@ void purge_strplist(Strp *sp)
|
|||||||
{
|
{
|
||||||
Strp *nxt;
|
Strp *nxt;
|
||||||
|
|
||||||
debug("do...\n");
|
|
||||||
while(sp)
|
while(sp)
|
||||||
{
|
{
|
||||||
debug("nxt =...\n");
|
|
||||||
nxt = sp->next;
|
nxt = sp->next;
|
||||||
debug("free...\n");
|
|
||||||
Free((char**)&sp);
|
Free((char**)&sp);
|
||||||
debug("sp = nx\n");
|
|
||||||
sp = nxt;
|
sp = nxt;
|
||||||
debug("while..\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
24
src/urlcap.c
24
src/urlcap.c
@ -46,23 +46,19 @@ void urlcapture(const char *rest)
|
|||||||
|
|
||||||
send_spy(SPYSTR_URL,"%s",url);
|
send_spy(SPYSTR_URL,"%s",url);
|
||||||
|
|
||||||
if ((n = urlhistmax))
|
if ((n = urlhistmax) < 0)
|
||||||
{
|
return;
|
||||||
debug("prepend\n");
|
|
||||||
prepend_strp(&urlhistory,url);
|
|
||||||
|
|
||||||
debug("for...\n");
|
prepend_strp(&urlhistory,url);
|
||||||
for(sp=urlhistory;sp;sp=sp->next)
|
|
||||||
|
for(sp=urlhistory;sp;sp=sp->next)
|
||||||
|
{
|
||||||
|
if (n <= 0)
|
||||||
{
|
{
|
||||||
if (n <= 0)
|
purge_strplist(sp->next);
|
||||||
{
|
return;
|
||||||
debug("purge...\n");
|
|
||||||
purge_strplist(sp->next);
|
|
||||||
debug("return\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
n--;
|
|
||||||
}
|
}
|
||||||
|
n--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user