[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 15:30:33 +0300 (MSK) |
I wrote:
>> * 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...
No problems here.
> 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'
(I do not understand why we can not use HTDOS_name() for both DOSPATH and EMX
in HTFile.c as we do in other places like HTSYS_name
[it does not convert to 8+3, just convert slashes],
though I have no EMX environment by hand.
Think we should *remove* "FIXME" __EMX__ staff from LYEdit.c
because it will corrupt EMX after HTSYS_name() in my patch to LYEdit.c)
HTFile.c show the following entry for __EMX__ "pesky leading slash"
(more accurate then in LYEdit.c and HTDOS.c):
/* Convert filenames between local and WWW formats.
** ------------------------------------------------
** Make up a suitable name for saving the node in
**
** E.g. $(HOME)/WWW/news/address@hidden
** $(HOME)/WWW/http/crnvmc/FIND/xx.xxx.xx
**
** On exit:
** Returns a malloc'ed string which must be freed by the caller.
*/
PUBLIC char * HTnameOfFile_WWW ARGS3(
CONST char *, name,
BOOL, WWW_prefix,
BOOL, expand_all)
{
char * acc_method = HTParse(name, "", PARSE_ACCESS);
char * host = HTParse(name, "", PARSE_HOST);
char * path = HTParse(name, "", PARSE_PATH+PARSE_PUNCTUATION);
char * home;
char * result = NULL;
if (expand_all)
HTUnEscape(path); /* Interpret all % signs */
else
HTUnEscapeSome(path, "/"); /* Interpret % signs for path delims */
if (0 == strcmp(acc_method, "file") /* local file */
|| !*acc_method) { /* implicitly local? */
if ((0 == strcasecomp(host, HTHostName())) ||
(0 == strcasecomp(host, "localhost")) || !*host) {
CTRACE(tfp, "Node `%s' means path `%s'\n", name, path);
#ifdef DOSPATH
StrAllocCopy(result, HTDOS_name(path));
#else
#ifdef __EMX__
if (path[0] == '/'
&& isalpha(path[1])
&& path[2] == ':') /* pesky leading slash */
StrAllocCopy(result, path+1);
else
StrAllocCopy(result, path);
CTRACE(tfp, "EMX hack changed `%s' to `%s'\n", path, result);
#else
StrAllocCopy(result, path);
#endif /* __EMX__ */
#endif /* DOSPATH */
} else if (WWW_prefix) {
HTSprintf0(&result, "%s%s%s", "/Net/", host, path);
CTRACE(tfp, "Node `%s' means file `%s'\n", name, result);
} else {
StrAllocCopy(result, path);
}
} else if (WWW_prefix) { /* other access */
#ifdef VMS
if ((home = getenv("HOME")) == 0)
home = HTCacheRoot;
else
home = HTVMS_wwwName(home);
#else
if ((home = getenv("HOME")) == 0)
home = "/tmp";
#endif /* VMS */
HTSprintf0(&result, "%s/WWW/%s/%s%s", home, acc_method, host, path);
} else {
StrAllocCopy(result, path);
}
FREE(host);
FREE(path);
FREE(acc_method);
return result;
}
Re: lynx-dev lynx2.8.2dev.12.gz, Leonid Pauzner, 1998/12/28
Re: lynx-dev lynx2.8.2dev.12.gz,
Leonid Pauzner <=
Re: lynx-dev lynx2.8.2dev.12.gz, dickey, 1998/12/28