lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV A bunch of patches


From: Klaus Weide
Subject: Re: LYNX-DEV A bunch of patches
Date: Thu, 5 Dec 1996 03:07:56 -0600 (CST)

On Wed, 4 Dec 1996, Ryan Hung wrote:

> I've been doing so many patches for our local system at the Vancouver
> CommunityNet, I figure I'd better send some of them in, so that I don't
> have to do it again in the next release.  

Good idea!

> Below are a context diff of all
> of the patched files (from the lynx2-6/ directory containing the Lynx2-6
> distribution , and ../lynx2-6.vcn containing the patched source code).
> 
> Some descriptions are warranted, considering that many of the features
> I've added could probably be implemented a lot better, by somebody with
> more C familiarity than myself.  However, before I do that, I have two
> questions: first, has anybody experienced a bug with LYNXDIRED://ZIP such
> that a user cannot compress files outside of their home directory?  I.e.,
> if a user creates a file 'abc.txt' in their '$HOME/work' directory,
> highlights the file, and presses 'f' for the full menu, then chooses zip,
> zip complains that there's nothing to do.  In fact, it seems that zip
> looks for the files to be created in the user's home directory.  At first,
> I tried to hack this by doing a 'cd' before doing a zip, but this didn't
> work.  Instead, I hacked LYLocal.c to use full paths for the zip command.

I did some fixes of the DIRED code.  Most of them are now included in
Hiram Lester's composite updates, available from

        <URL: http://www.mtsu.edu/~ripa0003/lynx.html>.

The zip problem should be already fixed.

> Might it be better to have all of the LYNXDIRED commands definable in the
> configuration file, with the file's directory and filename given as
> substitutable strings, much like for LYNXDOWNLOAD?

It might be more conveniently for the (relatively few, it appears) people
who use DIRED commands that go beyond simple moving, renaming, or removing
of files.  But it probably wouldn't fit well into the way how restrictions
are checked?

> Second, I notice that untagging links seems to be buggy in 2.6.  I.e.,
> tagged links often can't be untagged.  Has this been fixed in the RP
> patches?  BTW, I should mention that I'm running Solaris 2.4.

Also fixed.

> Third, a suggestion, if anybody has the inclination: might it be a good
> idea to have built in re-initialization function in Lynx?  E.g., have
> users be able to restart Lynx with a single key, rather than exit and
> restart.  This would be helpful on systems where Lynx is the user shell,
> where exiting Lynx would entail logging out.

Somebody else should comment..
 
> Ok, some comments on the patches below:
> 
> Note: some patches are obviously local configuration options, and should
> not be patched exactly.  Pick and choose as necessary.
> 
> userdefs.h:
> 
> - Added #define SZ_PATH, which is used later in LYLocal.c for downloading
> all tagged files.
> 
> LYMainLoop.c:
> 
> - One small hack to disable LYNXDOWNLOAD from the Goto line.  On our
> system, with restricted file: URL's, we don't want users to be able to go
> to LYNXDOWNLOAD:/etc/passwd.
> 
> LYUtils.c:
> 
> - Hacked so that file: URL access is restricted to the specified
> directories.  Rather messy, should really read from a list of acceptable
> directories in lynx.cfg.  Also, it complains about non-local file: URL's
> as well.
> 
> LYGetFile.c:
> 
> - One small change so that documents are reloaded after finishing a
> lynxprog or lynxexec.  Because Lynx does not reload no-cache pages after
> exiting from a lynxprog or lynxexec, as it should.

Could you explain why you think it should?

I haven't looked in much detail at thoses changes.  They may be to 
specific for your system, or not in the best place for including them 
in the general Lynx code, but somebody else should comment.
 
> LYLocal.c:
> 
> - Couple of new features.  Added LYNXDIRED://ZIP_TAGGED to allow tagged
> files to be zipped into one zip file.  With associated function.  

Seems like a useful addition, so [question to the list:] should this
be added? (Or is it too specific?)

> Added
> LYNXDIRED://DOWNLOAD_TAGGED, which uses sz to allow users to download all
> tagged files.  

Again, should this be in the next Lynx version?

> Also, I changed the ZIP%f's to ZIP%p's, so as to specify
> the full path.  As per above, I can't seem to get zip to be called in the
> current working directory when specifying just a filename.  It seems to
> want to do everything from the home directory.  Funny thing is that gzip
> works fine, and the code is nearly identical!

You should have a look at Hiram's composite patches (see URL above).
Most likely the changes in there will be in the next Lynx version.
Maybe you could redo your additions to LYLocal.c against the composite
patches' version.  Note that that file has changed a lot, but you should
still be able to recognize it :).

I have also some more changes relevant to DIRED at

        URL: http://www.tezcat.com/~kweide/lynx-patches/

which haven't made it into Hiram's code set (yet?).  You may want to
look at that, too.

Your patch for LYLocal.c showed a lot of diff sections where the only
difference is caused by reformatting (or expansion of TABs).  That
makes it more difficult to find the real differences... Could you
resend the patch (only for that file) without those?  (Maybe just use
diff -bwc instead of diff -c.)  Or better yet, resend them after 
upgrading them to the current development code...

  Klaus

;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

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