[wiki] [sites] [surf][patch][history] fix error in 2.1 patch || h

From: <git_AT_suckless.org>
Date: Mon, 15 Nov 2021 00:04:01 +0100

commit f5c4455a5b14c5824fb7f9761b94898d973aa820
Author: h <h_AT_abbcd.net>
Date: Sun Nov 14 23:03:16 2021 +0000

    [surf][patch][history] fix error in 2.1 patch

diff --git a/surf.suckless.org/patches/history/surf-2.1-history.diff b/surf.suckless.org/patches/history/surf-2.1-history.diff
index 0fa58153..453750d6 100644
--- a/surf.suckless.org/patches/history/surf-2.1-history.diff
+++ b/surf.suckless.org/patches/history/surf-2.1-history.diff
_AT_@ -12,7 +12,7 @@ index b6ae4fc..74b1968 100644
  /* Webkit default features */
  /* Highest priority value will be used.
 diff --git a/surf.c b/surf.c
-index e709f35..9c9fc90 100644
+index e709f35..d7c2166 100644
 --- a/surf.c
 +++ b/surf.c
 _AT_@ -347,9 +347,10 @@ setup(void)
_AT_@ -33,11 +33,11 @@ index e709f35..9c9fc90 100644
          } else {
                  webkit_web_view_load_uri(c->view, url);
                  updatetitle(c);
-+ updatehistory(c);
++ updatehistory(url);
          }
  
          g_free(url);
-_AT_@ -659,6 +661,22 @@ updatetitle(Client *c)
+_AT_@ -659,6 +661,20 @@ updatetitle(Client *c)
          }
  }
  
_AT_@ -47,20 +47,18 @@ index e709f35..9c9fc90 100644
 + FILE *f;
 + f = fopen(historyfile, "a+");
 +
-+ char b[20];
++ char timestamp[20];
 + time_t now = time (0);
-+ strftime (b, 20, "%Y-%m-%dT%H:%M:%S", localtime (&now));
-+ fputs(b, f);
++ strftime (timestamp, 20, "%Y-%m-%dT%H:%M:%S", localtime (&now));
 +
-+ fprintf(f, " %s
", url);
++ fprintf(f, "%s %s
", timestamp, url);
 + fclose(f);
-+
 +}
 +
  void
  gettogglestats(Client *c)
  {
-_AT_@ -1085,6 +1103,7 @@ cleanup(void)
+_AT_@ -1085,6 +1101,7 @@ cleanup(void)
          close(spair[0]);
          close(spair[1]);
          g_free(cookiefile);
Received on Mon Nov 15 2021 - 00:04:01 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 15 2021 - 00:12:46 CET