surf-0.2-history.diff - sites - public wiki contents of suckless.org | |
git clone git://git.suckless.org/sites | |
Log | |
Files | |
Refs | |
--- | |
surf-0.2-history.diff (891B) | |
--- | |
1 --- surf.c 2009-10-17 03:00:22.000000000 -0400 | |
2 +++ surf.c 2009-10-19 15:03:16.000000000 -0400 | |
3 @@ -160,6 +160,7 @@ cleanup(void) { | |
4 while(clients) | |
5 destroyclient(clients); | |
6 g_free(cookiefile); | |
7 + g_free(historyfile); | |
8 g_free(dldir); | |
9 g_free(scriptfile); | |
10 g_free(stylefile); | |
11 @@ -420,6 +421,10 @@ loaduri(Client *c, const Arg *arg) { | |
12 u = g_strrstr(uri, "://") ? g_strdup(uri) | |
13 : g_strdup_printf("http://%s", uri); | |
14 webkit_web_view_load_uri(c->view, u); | |
15 + FILE *f; | |
16 + f = fopen(historyfile, "a+"); | |
17 + fprintf(f, "%s\n", u); | |
18 + fclose(f); | |
19 c->progress = 0; | |
20 c->title = copystr(&c->title, u); | |
21 g_free(u); | |
22 @@ -674,6 +679,7 @@ setup(void) { | |
23 | |
24 /* create dirs and files */ | |
25 cookiefile = buildpath(cookiefile); | |
26 + historyfile = buildpath(historyfile); | |
27 dldir = buildpath(dldir); | |
28 scriptfile = buildpath(scriptfile); | |
29 stylefile = buildpath(stylefile); |