[w3m-dev 02914]

* history.c (copyHist): added
* history.h (copyHist): ditto
* main.c (goURL0): copyHist(URLHist), push current and anchor URLs
	default set by DefaultURLString
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-01-26 17:24:01 +00:00
parent 86ad8ff868
commit 843221c523
4 changed files with 47 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: history.c,v 1.6 2001/12/10 17:02:44 ukai Exp $ */
/* $Id: history.c,v 1.7 2002/01/26 17:24:01 ukai Exp $ */
#include "fm.h"
#ifdef USE_HISTORY
@@ -82,6 +82,20 @@ newHist()
return hist;
}
Hist *
copyHist(Hist *hist)
{
Hist *new;
HistItem *item;
if (hist == NULL)
return NULL;
new = newHist();
for (item = hist->list->first; item; item = item->next)
pushHist(new, (char *)item->ptr);
return new;
}
HistItem *
unshiftHist(Hist *hist, char *ptr)
{