commit 368beeeea619eade5fe33065a773fa67fd7f62e8
parent 85c11623bf9850429bab61ab9603786652b75a2c
Author: samuel <recursive.forest@gmail.com>
Date: Mon, 3 Jan 2011 20:14:32 -0500
Add 0.4.1 history patch.
Diffstat:
2 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/surf.suckless.org/patches/history.md b/surf.suckless.org/patches/history.md
@@ -48,6 +48,7 @@ Download
* [surf-0.2-history.diff](surf-0.2-history.diff) (891) (20091019)
* [surf-0.3-history.diff](surf-0.3-history.diff) (1475) (20091203)
* [surf-tip-history.diff](surf-tip-history.diff) (2952) (20091215)
+* [surf-0.4.1-history.diff](surf-0.4.1-history.diff) (1346) (20101225)
Authors
-------
diff --git a/surf.suckless.org/patches/surf-0.4.1-history.diff b/surf.suckless.org/patches/surf-0.4.1-history.diff
@@ -0,0 +1,41 @@
+diff -up surf-0.4.1/config.def.h surf-0.4.1-history/config.def.h
+--- surf-0.4.1/config.def.h 2010-06-08 03:06:41.000000000 -0400
++++ surf-0.4.1-history/config.def.h 2010-12-25 20:00:08.000000000 -0500
+@@ -5,6 +5,7 @@ static char *progress_trust = "#00FF00";
+ static char *stylefile = ".surf/style.css";
+ static char *scriptfile = ".surf/script.js";
+ static char *cookiefile = ".surf/cookies.txt";
++static char *historyfile = ".surf/history.txt";
+ static time_t sessiontime = 3600;
+ #define NOBACKGROUND 0
+
+diff -up surf-0.4.1/surf.c surf-0.4.1-history/surf.c
+--- surf-0.4.1/surf.c 2010-06-08 03:06:42.000000000 -0400
++++ surf-0.4.1-history/surf.c 2010-12-25 19:50:51.000000000 -0500
+@@ -140,6 +140,7 @@ cleanup(void) {
+ while(clients)
+ destroyclient(clients);
+ g_free(cookiefile);
++ g_free(historyfile);
+ g_free(scriptfile);
+ g_free(stylefile);
+ }
+@@ -396,6 +397,10 @@ loaduri(Client *c, const Arg *arg) {
+ }
+ else {
+ webkit_web_view_load_uri(c->view, u);
++ FILE *f;
++ f = fopen(historyfile, "a+");
++ fprintf(f, u);
++ fclose(f);
+ c->progress = 0;
+ c->title = copystr(&c->title, u);
+ g_free(u);
+@@ -689,6 +694,7 @@ setup(void) {
+
+ /* dirs and files */
+ cookiefile = buildpath(cookiefile);
++ historyfile = buildpath(historyfile);
+ scriptfile = buildpath(scriptfile);
+ stylefile = buildpath(stylefile);
+