diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2015-01-24 14:36:40 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2015-01-24 14:37:05 +0000 |
commit | 8595cb4102d547388d0d9e699d10a14f8f7aa71c (patch) | |
tree | cd27e4b710769000b651b9af4db2704a1cd328dd /debian/patches/140_sort-dump-links.patch | |
parent | Update Vcs-Browser (diff) | |
download | w3m-8595cb4102d547388d0d9e699d10a14f8f7aa71c.tar.gz w3m-8595cb4102d547388d0d9e699d10a14f8f7aa71c.zip |
Integrate Debian changes into 020_debian.patch (closes: #776112)
(debian/patches/*.patch except 010_upstream.patch are merged)
Diffstat (limited to 'debian/patches/140_sort-dump-links.patch')
-rw-r--r-- | debian/patches/140_sort-dump-links.patch | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/debian/patches/140_sort-dump-links.patch b/debian/patches/140_sort-dump-links.patch deleted file mode 100644 index f290613..0000000 --- a/debian/patches/140_sort-dump-links.patch +++ /dev/null @@ -1,47 +0,0 @@ -Subject: Sort anchors by sequence number in -dump -Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657666 -From: "Conrad J.C. Hughes (for Debian package stuff)" <debbugs@xrad.org> - -Resolved merge conflicts by Tatsuya Kinoshita. - ---- a/main.c -+++ b/main.c -@@ -1269,6 +1269,12 @@ dump_extra(Buffer *buf) - #endif - } - -+static int -+cmp_anchor_hseq(const void *a, const void *b) -+{ -+ return (*((const Anchor **) a))->hseq - (*((const Anchor **) b))->hseq; -+} -+ - static void - do_dump(Buffer *buf) - { -@@ -1289,15 +1295,20 @@ do_dump(Buffer *buf) - int i; - saveBuffer(buf, stdout, FALSE); - if (displayLinkNumber && buf->href) { -+ int nanchor = buf->href->nanchor; - printf("\nReferences:\n\n"); -- for (i = 0; i < buf->href->nanchor; i++) { -- ParsedURL pu; -+ Anchor **in_order = New_N(Anchor *, buf->href->nanchor); -+ for (i = 0; i < nanchor; i++) -+ in_order[i] = buf->href->anchors + i; -+ qsort(in_order, nanchor, sizeof(Anchor *), cmp_anchor_hseq); -+ for (i = 0; i < nanchor; i++) { -+ ParsedURL pu; - char *url; -- if (buf->href->anchors[i].slave) -+ if (in_order[i]->slave) - continue; -- parseURL2(buf->href->anchors[i].url, &pu, baseURL(buf)); -+ parseURL2(in_order[i]->url, &pu, baseURL(buf)); - url = url_decode2(parsedURL2Str(&pu)->ptr, Currentbuf); -- printf("[%d] %s\n", buf->href->anchors[i].hseq + 1, url); -+ printf("[%d] %s\n", in_order[i]->hseq + 1, url); - } - } - } |