]> git.pld-linux.org Git - packages/links2.git/commitdiff
- updated to 2.23 (native support for saving cookies) auto/th/links2-2.23-1
authorWitold Filipczyk <witekfl@poczta.onet.pl>
Mon, 24 May 2021 07:50:20 +0000 (09:50 +0200)
committerWitold Filipczyk <witekfl@poczta.onet.pl>
Mon, 24 May 2021 07:50:20 +0000 (09:50 +0200)
- removed obsolete links2-cookies-save.patch

links2-cookies-save.patch [deleted file]
links2.spec

diff --git a/links2-cookies-save.patch b/links2-cookies-save.patch
deleted file mode 100644 (file)
index 40fe0d9..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
---- links-2.22/cookies.c.old   2019-04-07 20:17:57.000000000 +0200
-+++ links-2.22/cookies.c       2021-03-20 18:58:47.864668687 +0100
-@@ -202,8 +202,28 @@
- void free_cookies(void)
- {
-+      unsigned char *cookfile;
-+      FILE *fp;
-+      struct cookie *c; 
-+      struct list_head *lc;
-       free_list(struct c_domain, c_domains);
--      /* !!! FIXME: save cookies */
-+
-+      cookfile = stracpy(links_home);
-+      if (! cookfile) return;
-+      add_to_strn(&cookfile, "cookies");
-+
-+      fp = fopen(cookfile, "w");
-+      mem_free(cookfile);
-+      if (fp == NULL) return;
-+
-+      foreach (struct cookie, c, lc, all_cookies) {
-+              if (c->expires && ! cookie_expired(c))
-+                      fprintf(fp, "%s %s %s %s %s %d %d\n", c->name, c->value,
-+                      c->server?c->server:(unsigned char *)"", c->path?c->path:(unsigned char *)"",
-+                      c->domain?c->domain:(unsigned char *)"", (int)c->expires, c->secure);
-+      }
-+      fclose(fp);
-+
-       while (!list_empty(all_cookies)) {
-               struct cookie *c = list_struct(all_cookies.next, struct cookie);
-               del_from_list(c);
-@@ -213,6 +233,68 @@
- void init_cookies(void)
- {
--      /* !!! FIXME: read cookies */
--}
-+      unsigned char in_buffer[MAX_STR_LEN];
-+      unsigned char *cookfile, *p, *q;
-+      FILE *fp;
-+
-+      /* must be called after init_home */
-+      if (! links_home) return;
-+
-+      cookfile = stracpy(links_home);
-+      if (! cookfile) return;
-+      add_to_strn(&cookfile, "cookies");
-+
-+      fp = fopen(cookfile, "r");
-+      mem_free(cookfile);
-+      if (fp == NULL) return;
-+
-+      while (fgets(in_buffer, MAX_STR_LEN, fp)) {
-+              struct cookie *cookie;
-+
-+              if (!(cookie = mem_alloc(sizeof(struct cookie)))) return;
-+              memset(cookie, 0, sizeof(struct cookie));
-+              q = in_buffer; p = strchr(in_buffer, ' ');
-+              if (p == NULL) goto inv;
-+              *p++ = '\0';
-+              cookie->name = stracpy(q);
-+
-+              q = p; p = strchr(p, ' ');
-+              if (p == NULL) goto inv;
-+              *p++ = '\0';
-+              cookie->value = stracpy(q);
-+
-+              q = p; p = strchr(p, ' ');
-+              if (p == NULL) goto inv;
-+              *p++ = '\0';
-+              cookie->server = stracpy(q);
-+
-+              q = p; p = strchr(p, ' ');
-+              if (p == NULL) goto inv;
-+              *p++ = '\0';
-+              cookie->path = stracpy(q);
-+
-+              q = p; p = strchr(p, ' ');
-+              if (p == NULL) goto inv;
-+              *p++ = '\0';
-+              cookie->domain = stracpy(q);
-+
-+              q = p; p = strchr(p, ' ');
-+              if (p == NULL) goto inv;
-+              *p++ = '\0';
-+              cookie->expires = atoi(q);
-+
-+              cookie->secure = atoi(p);
-+
-+              /*cookie->id = cookie_id++;*/
-+
-+              accept_cookie(cookie);
-+
-+              continue;
-+
-+inv:
-+              free_cookie(cookie);
-+              free(cookie);
-+      }
-+      fclose(fp);
-+}
index 210f1f010c88b74c439764aa6ba69cbf7c54a48a..3c8b5eae4e168b8e861b7b32f258662f06dbe915 100644 (file)
@@ -13,13 +13,13 @@ Summary(pt_BR.UTF-8):       O links é um browser para modo texto, similar ao lynx
 Summary(ru.UTF-8):     Текстовый WWW броузер типа Lynx
 Summary(uk.UTF-8):     Текстовий WWW броузер типу Lynx
 Name:          links2
-Version:       2.22
+Version:       2.23
 Release:       1
 Epoch:         1
 License:       GPL v2
 Group:         Applications/Networking
 Source0:       http://links.twibright.com/download/links-%{version}.tar.bz2
-# Source0-md5: 55f745dea500aac52cede98bab8d96e2
+# Source0-md5: 64215ef5e6e35ae8b131d78fcb162f12
 Source1:       %{name}.desktop
 Source2:       %{name}.1.pl
 Source3:       %{name}.png
@@ -27,7 +27,6 @@ Source4:      glinks.desktop
 Patch0:                %{name}-links-g_if_glinks.patch
 Patch2:                %{name}-img.patch
 Patch3:                %{name}-convert-old-bookmarks.patch
-Patch4:                %{name}-cookies-save.patch
 Patch5:                %{name}-config-dirs.patch
 Patch6:                %{name}-gzip_fallback.patch
 Patch10:       %{name}-pl-update.patch
@@ -114,7 +113,6 @@ Links - це текстовий WWW броузер, на перший погля
 %{?with_graphics:%patch0 -p1}
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
 %patch5 -p1
 %patch6 -p1
 #%%patch10 -p1
This page took 0.129917 seconds and 4 git commands to generate.