lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH (was Re: BUG BUG BUG (was Re: [Lynx-dev] lynx2.8.7dev.5))


From: Thorsten Glaser
Subject: PATCH (was Re: BUG BUG BUG (was Re: [Lynx-dev] lynx2.8.7dev.5))
Date: Sun, 20 May 2007 11:04:43 +0000 (UTC)

Dixi:

>(maybe removing the "&& temp[2] != '\0'" in line 5371 would be enough),

It is:

--- src/LYUtils.c.orig  Sun May 20 10:37:10 2007
+++ src/LYUtils.c       Sun May 20 10:45:37 2007
@@ -5367,8 +5367,7 @@ char *LYTildeExpand(char **pathname,
     if (LYIsTilde(temp[0])) {
 
        CTRACE((tfp, "LYTildeExpand %s\n", *pathname));
-       if (LYIsPathSep(temp[1])
-           && temp[2] != '\0') {
+       if (LYIsPathSep(temp[1])) {
            char *first = NULL;
            char *second = NULL;
 

But we get same bad result:

/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5369: LYTildeExpand file://localhost/~/
/usr/src/gnu/usr.bin/lynx/src/LYUtils.c: 5389: expanded path 
file://localhost//data/tg/
/usr/src/gnu/usr.bin/lynx/src/LYGetFile.c: 794: 
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c: 385: Entered 
HTAnchor_findAddress
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAnchor.c: 461: New 
anchor 0x84e38100 has hash 890 and address `file://localhost/~/'
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c: 745: HTAccess: 
loading document file://localhost/~/
/usr/src/gnu/usr.bin/lynx/WWW/Library/Implementation/HTAccess.c: 391: 
get_physical file://localhost/~/

But I got it. From the diff:

-               WWWDoc.address = doc->address;

That got lost. Here's a diff which fixes it:

Index: src/LYGetFile.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/lynx/src/LYGetFile.c,v
retrieving revision 1.1.109.3
diff -u -p -r1.1.109.3 LYGetFile.c
--- src/LYGetFile.c     19 May 2007 22:30:17 -0000      1.1.109.3
+++ src/LYGetFile.c     20 May 2007 11:04:29 -0000
@@ -780,6 +780,7 @@ int getfile(DocInfo *doc, int *target)
             * relative elements.  - FM
             */
            LYTildeExpand(&(doc->address), TRUE);
+           WWWDoc.address = doc->address;
        }
        CTRACE_SLEEP(MessageSecs);
        user_message(WWW_WAIT_MESSAGE, doc->address);
Index: src/LYUtils.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/lynx/src/LYUtils.c,v
retrieving revision 1.5
diff -u -p -r1.5 LYUtils.c
--- src/LYUtils.c       20 May 2007 09:43:28 -0000      1.5
+++ src/LYUtils.c       20 May 2007 11:04:29 -0000
@@ -5367,8 +5367,7 @@ char *LYTildeExpand(char **pathname,
     if (LYIsTilde(temp[0])) {
 
        CTRACE((tfp, "LYTildeExpand %s\n", *pathname));
-       if (LYIsPathSep(temp[1])
-           && temp[2] != '\0') {
+       if (LYIsPathSep(temp[1])) {
            char *first = NULL;
            char *second = NULL;
 

bye,
//mirabile
-- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.              -- Coywolf Qi Hunt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]