[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV Lynx W32 bug report
From: |
Benjamin C. W. Sittler |
Subject: |
Re: LYNX-DEV Lynx W32 bug report |
Date: |
Thu, 6 Mar 1997 18:20:41 -0700 (MST) |
On Thu, 6 Mar 1997, Wayne Buttles wrote:
> On Wed, 5 Mar 1997, Christopher R. Maden wrote:
>
> > Lynx substitutes the HOME (or TEMP/TMP) variable's value for any
> > occurence of ~ - even though ~ is common in the DOS version of long
> > file names.
>
> I am going to start with * as an alias for $home in LYNX_CFG on Win32 only
> and see how it goes. There are some other places that react to ~ as well
> but we can address them one at a time. Some of them may be desired
> (maybe).
Keep in mind that both * and ~ are valid characters in UNIX filenames.
In fact, the only place ~ has a special meaning is inside certain shells,
which do the following bit of clever processing to expand a word to a
filename (which Lynx might benefit by, and bash just happens to have
GPL'ed code for):
* If the word begins with a '/', don't change it.
* If the word begins with a '~', do tilde-expansion.
+ If the word is '~' or starts with '~/', replace the
tilde with the current user's home directory ($HOME)
+ If the word is '~' followed by one or more non-'/' characters,
replace it with the home directory of the corresponding user.
+ Otherwise, replace everything before the first '/' with the home
directory of the user named.
The replacement is made only if the tilde-expansion was successful.
* Otherwise, prepend the current working directory.
Some prettying-up can also be done, like replacing '/./' with '/'.
That's it! So a ~ no at the beginning of a filename should not get
expanded, at least if we want UNIX-like semantics.
It looks like this would need to change LYConvertToURL() in LYUtils, and
perhaps a few places elsewhere (like the config file expansion in main()
in LYMain and LYSanctify() in LYGetFile. I might hack on it, but I have
midterms this week.
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;