lynx-dev
[Top][All Lists]
Advanced

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

Re: lynx-dev lynx2.8.2dev.12.gz


From: Leonid Pauzner
Subject: Re: lynx-dev lynx2.8.2dev.12.gz
Date: Mon, 28 Dec 1998 14:44:25 +0300 (MSK)

> 1998-12-26 (2.8.2dev.12)
> * add version number to trace log (patch by IC)

there is no version number if you invoke "lynx -trace" though
(only CTRL-T show version for now).
In general, where should be more info like proposed for -version recently.

> * modify HTDOS_name to be consistent with HTVMS_name, which does not modify
>   its parameter (reported by LP).  Also, modify HTDOS_name and HTDOS_wwwName
>   so they allocate space for the result rather than using a static buffer - TD

I expect new problems elsewhere (like HTFile.c) - will check...

> * correct DOS/EMX logic in LYEdit.c which incremented 'filename' pointer when
>   its length was greater than 1 rather than recopying the string, causing a
>   core dump when 'filename' was freed (reported by LP, this applies to
>   2.8.1rel.2) - TD

Another way will be the optimization with
StrAllocCopy(filename, HTSYS_name(filename))
in a single place near the top to reduce repeated translation calls.
(Will check other files...)

and "FIXME" mean removing a leading slash before drive letter from HTParse,
from trace log:

HTParse: result:/c:/lynx/dist28/d12/htdos
Node `file://localhost/c:/lynx/dist28/d12/htdos' means path 
`/c:/lynx/dist28/d12/htdos'
HTDOS_name changed `/c:/lynx/dist28/d12/htdos' to `c:\lynx\dist28\d12\htdos'



diff -u old/lyedit.c ./lyedit.c
--- old/lyedit.c        Mon Dec 28 12:05:32 1998
+++ ./lyedit.c  Mon Dec 28 14:09:00 1998
@@ -77,14 +77,15 @@
 #endif /* !VMS */
        filename = HTParse(newfile, "", PARSE_PATH+PARSE_PUNCTUATION);
        HTUnEscape(filename);
-#if defined (DOSPATH) || defined (__EMX__)
+       StrAllocCopy(filename, HTSYS_name(filename));
+#if defined (__EMX__)
        if (strlen(filename) > 1) {     /* FIXME: why do we need to do this? */
            int n;
            for (n = 0; (filename[n] = filename[n+1]) != 0; n++)
                ;
        }
 #endif
-       if ((fp = fopen(HTSYS_name(filename), "r")) == NULL)
+       if ((fp = fopen(filename, "r")) == NULL)
        {
            HTAlert(COULD_NOT_ACCESS_FILE);
            goto done;
@@ -98,7 +99,7 @@
     /*
      *  Don't allow editing if user lacks append access.
      */
-    if ((fp = fopen(HTSYS_name(filename), "a")) == NULL)
+    if ((fp = fopen(filename, "a")) == NULL)
     {
        HTUserMsg(NOAUTH_TO_EDIT_FILE);
        goto done;
@@ -128,19 +129,19 @@
 #ifdef VMS
        format = "%s %s -%s";
        HTAddParam(&command, format, params++, editor);
-       HTAddParam(&command, format, params++, HTVMS_name("", filename));
+       HTAddParam(&command, format, params++, filename);
        HTAddParam(&command, format, params++, position);
        HTEndParam(&command, format, params);
 #else
        format = "%s +%s %s";
        HTAddParam(&command, format, params++, editor);
        HTAddParam(&command, format, params++, position);
-       HTAddParam(&command, format, params++, HTSYS_name(filename));
+       HTAddParam(&command, format, params++, filename);
        HTEndParam(&command, format, params);
 #endif
     } else {
        HTAddParam(&command, format, params++, editor);
-       HTAddParam(&command, format, params++, HTSYS_name(filename));
+       HTAddParam(&command, format, params++, filename);
        HTEndParam(&command, format, params);
     }






reply via email to

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