lynx-dev
[Top][All Lists]
Advanced

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

LYNX-DEV A bunch of patches (fwd)


From: Ryan Hung
Subject: LYNX-DEV A bunch of patches (fwd)
Date: Sun, 8 Dec 1996 21:57:15 -0800 (PST)

I sent this message Dec. 4, but I never saw it appear in the mailing list,
and I haven't seen any responses to it, so I figure I'll try sending it
again.

                                                        Ryan.

_/  \__/  \__/  \__/  \__/  \__/  \__/  \__/address@hidden/  \__/  \__/
 \_Apoptosis=programmed cell death/  \__/  address@hidden/  \__/  \__
_/ --you can't live without it!/  \__/  \__/  \__/  \__/  \__/  \__/  \__/
 \__/  \__/  \__/  \__/  \__/  \__/  \__/  \My words Copyright (C) 1996  \__
---------- Forwarded message ----------
Date: Wed, 4 Dec 1996 22:40:30 -0800 (PST)
From: Ryan Hung <address@hidden>
To: address@hidden
Subject: A bunch of patches

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.  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.
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?

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.

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.

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.

LYLocal.c:

- Couple of new features.  Added LYNXDIRED://ZIP_TAGGED to allow tagged
files to be zipped into one zip file.  With associated function.  Added
LYNXDIRED://DOWNLOAD_TAGGED, which uses sz to allow users to download all
tagged files.  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!

Feel free to contact me if any of these patches aren't clear.

                                                        Ryan.

_/  \__/  \__/  \__/  \__/  \__/  \__/  \__/address@hidden/  \__/  \__/
 \_Apoptosis=programmed cell death/  \__/  address@hidden/  \__/  \__
_/ --you can't live without it!/  \__/  \__/  \__/  \__/  \__/  \__/  \__/
 \__/  \__/  \__/  \__/  \__/  \__/  \__/  \My words Copyright (C) 1996  \__

*** userdefs.h  Thu Aug 29 15:54:02 1996
--- ../lynx2-6.vcn/userdefs.h   Wed Oct 30 22:28:10 1996
***************
*** 216,223 ****
   * These global and personal files override anything in
   * lynx.cfg or src/HTInit.c
   */
! #define GLOBAL_EXTENSION_MAP "/usr/local/lib/mosaic/mime.types"
! #define PERSONAL_EXTENSION_MAP ".mime.types"
  
  /**************************
   * The MAILCAP file allows you to map file MIME types to 
--- 216,223 ----
   * These global and personal files override anything in
   * lynx.cfg or src/HTInit.c
   */
! #define GLOBAL_EXTENSION_MAP "/usr/local/etc/httpd/conf/mime.types"
! #define PERSONAL_EXTENSION_MAP "/dev/null"
  
  /**************************
   * The MAILCAP file allows you to map file MIME types to 
***************
*** 231,247 ****
  /**************************
   * the full path and name of the telnet command
   */
! #define TELNET_COMMAND "telnet"
  
  /**************************
   * the full path and name of the tn3270 command
   */
! #define TN3270_COMMAND "tn3270"
  
  /**************************
   * the full path and name of the rlogin command
   */
! #define RLOGIN_COMMAND "rlogin"
  
  /*************************
   * This define will be used for a default in src/HTInit.c.
--- 231,247 ----
  /**************************
   * the full path and name of the telnet command
   */
! #define TELNET_COMMAND "/usr/local/freenet/bin/bbtelnet.pl"
  
  /**************************
   * the full path and name of the tn3270 command
   */
! #define TN3270_COMMAND "/usr/local/freenet/bin/bbtn3270.pl"
  
  /**************************
   * the full path and name of the rlogin command
   */
! #define RLOGIN_COMMAND "/usr/local/freenet/bin/bbrlogin.pl"
  
  /*************************
   * This define will be used for a default in src/HTInit.c.
***************
*** 261,267 ****
   *
   * set empty or to "none" if you don't have or want it.
   */
! #define INEWS "inews"
  
  /**************************
   * For UNIX systems this should be sendmail
--- 261,267 ----
   *
   * set empty or to "none" if you don't have or want it.
   */
! #define INEWS "/usr/local/bin/inews -h"
  
  /**************************
   * For UNIX systems this should be sendmail
***************
*** 443,449 ****
   * name of the system on which Lynx is running) will all be passed as
   * local.  A different definition in lynx.cfg will override this one.
   */
! /* #define LYNX_HOST_NAME "www.cc.ukans.edu" */
  
  /*********************
   * LOCAL_DOMAIN is used for a tail match with the ut_host element of
--- 443,449 ----
   * name of the system on which Lynx is running) will all be passed as
   * local.  A different definition in lynx.cfg will override this one.
   */
! #define LYNX_HOST_NAME "www.vcn.bc.ca"
  
  /*********************
   * LOCAL_DOMAIN is used for a tail match with the ut_host element of
***************
*** 454,460 ****
   * if your system does not have utmp capabilities.  CHANGE THIS here
   * or in lynx.cfg.
   */
! #define LOCAL_DOMAIN "ukans.edu"
  
  /********************************
  * The DEFAULT_CACHE_SIZE specifies the number of WWW documents to be
--- 454,460 ----
   * if your system does not have utmp capabilities.  CHANGE THIS here
   * or in lynx.cfg.
   */
! #define LOCAL_DOMAIN "vcn.bc.ca"
  
  /********************************
  * The DEFAULT_CACHE_SIZE specifies the number of WWW documents to be
***************
*** 500,506 ****
   * The default defined here can be changed in lynx.cfg, and can be toggled
   * via the -resubmit_posts command line switch.
   */
! #define ALWAYS_RESUBMIT_POSTS FALSE
  
  /********************************
   * CHARACTER_SET defines the default character set, i.e., that assumed
--- 500,506 ----
   * The default defined here can be changed in lynx.cfg, and can be toggled
   * via the -resubmit_posts command line switch.
   */
! #define ALWAYS_RESUBMIT_POSTS TRUE
  
  /********************************
   * CHARACTER_SET defines the default character set, i.e., that assumed
***************
*** 641,647 ****
   * Later on in this file you can specify privileges for the
   * anonymous account.
   */
! #define ANONYMOUS_USER ""
  
  /******************************
   * SHOW_CURSOR controls whether or not the cursor is hidden
--- 641,647 ----
   * Later on in this file you can specify privileges for the
   * anonymous account.
   */
! #define ANONYMOUS_USER "guest"
  
  /******************************
   * SHOW_CURSOR controls whether or not the cursor is hidden
***************
*** 657,665 ****
   * curses supports line-drawing characters, set to '*' or any other character
   * to not use line-drawing (e.g., '|' for vertical and '-' for horizontal).
   */
! #define BOXVERT '*'
  /* #define BOXVERT 0 */
! #define BOXHORI '*'
  /* #define BOXHORI 0 */
  
  /******************************
--- 657,665 ----
   * curses supports line-drawing characters, set to '*' or any other character
   * to not use line-drawing (e.g., '|' for vertical and '-' for horizontal).
   */
! #define BOXVERT 0
  /* #define BOXVERT 0 */
! #define BOXHORI 0
  /* #define BOXHORI 0 */
  
  /******************************
***************
*** 674,680 ****
   * who are calling from inside your local domain
   * to be able to telnet back out
   */
! #define CAN_ANONYMOUS_INSIDE_DOMAIN_TELNET    TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
--- 674,680 ----
   * who are calling from inside your local domain
   * to be able to telnet back out
   */
! #define CAN_ANONYMOUS_INSIDE_DOMAIN_TELNET    FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
***************
*** 681,687 ****
   * account who are calling from outside your
   * local domain to be able to telnet back out
   */
! #define CAN_ANONYMOUS_OUTSIDE_DOMAIN_TELNET   TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous account
--- 681,687 ----
   * account who are calling from outside your
   * local domain to be able to telnet back out
   */
! #define CAN_ANONYMOUS_OUTSIDE_DOMAIN_TELNET   FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous account
***************
*** 688,694 ****
   * who are calling from inside your local domain
   * to be able to read news
   */
! #define CAN_ANONYMOUS_INSIDE_DOMAIN_READ_NEWS TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
--- 688,694 ----
   * who are calling from inside your local domain
   * to be able to read news
   */
! #define CAN_ANONYMOUS_INSIDE_DOMAIN_READ_NEWS FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
***************
*** 702,708 ****
   * account who are calling from inside your local domain
   * to be able to use ftp
   */
! #define CAN_ANONYMOUS_INSIDE_DOMAIN_FTP               TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
--- 702,708 ----
   * account who are calling from inside your local domain
   * to be able to use ftp
   */
! #define CAN_ANONYMOUS_INSIDE_DOMAIN_FTP               FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
***************
*** 709,715 ****
   * account who are calling from outside your local domain
   * to be able to use ftp
   */
! #define CAN_ANONYMOUS_OUTSIDE_DOMAIN_FTP      TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
--- 709,715 ----
   * account who are calling from outside your local domain
   * to be able to use ftp
   */
! #define CAN_ANONYMOUS_OUTSIDE_DOMAIN_FTP      FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
***************
*** 716,722 ****
   * account who are calling from inside your local domain 
   * to be able to use rlogin
   */
! #define CAN_ANONYMOUS_INSIDE_DOMAIN_RLOGIN    TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
--- 716,722 ----
   * account who are calling from inside your local domain 
   * to be able to use rlogin
   */
! #define CAN_ANONYMOUS_INSIDE_DOMAIN_RLOGIN    FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
***************
*** 723,758 ****
   * account who are calling from outside your local domain
   * to be able to use rlogin
   */
! #define CAN_ANONYMOUS_OUTSIDE_DOMAIN_RLOGIN   TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
   * account to be able to goto random URLs. (The 'g' command)
   */
! #define CAN_ANONYMOUS_GOTO            TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
   * account to be able to goto particular URLs.
   */
! #define CAN_ANONYMOUS_GOTO_CSO                TRUE
! #define CAN_ANONYMOUS_GOTO_FILE               TRUE
! #define CAN_ANONYMOUS_GOTO_FINGER     TRUE
! #define CAN_ANONYMOUS_GOTO_FTP                TRUE
! #define CAN_ANONYMOUS_GOTO_GOPHER     TRUE
! #define CAN_ANONYMOUS_GOTO_HTTP               TRUE
! #define CAN_ANONYMOUS_GOTO_HTTPS      TRUE
! #define CAN_ANONYMOUS_GOTO_LYNXCGI    TRUE
! #define CAN_ANONYMOUS_GOTO_LYNXEXEC   TRUE
! #define CAN_ANONYMOUS_GOTO_LYNXPROG   TRUE
! #define CAN_ANONYMOUS_GOTO_MAILTO     TRUE
! #define CAN_ANONYMOUS_GOTO_NEWS               TRUE
! #define CAN_ANONYMOUS_GOTO_NNTP               TRUE
! #define CAN_ANONYMOUS_GOTO_RLOGIN     TRUE
! #define CAN_ANONYMOUS_GOTO_SNEWS      TRUE
! #define CAN_ANONYMOUS_GOTO_TELNET     TRUE
! #define CAN_ANONYMOUS_GOTO_TN3270     TRUE
! #define CAN_ANONYMOUS_GOTO_WAIS               TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
--- 723,758 ----
   * account who are calling from outside your local domain
   * to be able to use rlogin
   */
! #define CAN_ANONYMOUS_OUTSIDE_DOMAIN_RLOGIN   FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
   * account to be able to goto random URLs. (The 'g' command)
   */
! #define CAN_ANONYMOUS_GOTO            FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
   * account to be able to goto particular URLs.
   */
! #define CAN_ANONYMOUS_GOTO_CSO                FALSE
! #define CAN_ANONYMOUS_GOTO_FILE               FALSE
! #define CAN_ANONYMOUS_GOTO_FINGER     FALSE
! #define CAN_ANONYMOUS_GOTO_FTP                FALSE
! #define CAN_ANONYMOUS_GOTO_GOPHER     FALSE
! #define CAN_ANONYMOUS_GOTO_HTTP               FALSE
! #define CAN_ANONYMOUS_GOTO_HTTPS      FALSE
! #define CAN_ANONYMOUS_GOTO_LYNXCGI    FALSE
! #define CAN_ANONYMOUS_GOTO_LYNXEXEC   FALSE
! #define CAN_ANONYMOUS_GOTO_LYNXPROG   FALSE
! #define CAN_ANONYMOUS_GOTO_MAILTO     FALSE
! #define CAN_ANONYMOUS_GOTO_NEWS               FALSE
! #define CAN_ANONYMOUS_GOTO_NNTP               FALSE
! #define CAN_ANONYMOUS_GOTO_RLOGIN     FALSE
! #define CAN_ANONYMOUS_GOTO_SNEWS      FALSE
! #define CAN_ANONYMOUS_GOTO_TELNET     FALSE
! #define CAN_ANONYMOUS_GOTO_TN3270     FALSE
! #define CAN_ANONYMOUS_GOTO_WAIS               FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
***************
*** 772,778 ****
   * set to FALSE if you don't want users of your anonymous
   * account to be able to mail
   */
! #define CAN_ANONYMOUS_MAIL    TRUE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
--- 772,778 ----
   * set to FALSE if you don't want users of your anonymous
   * account to be able to mail
   */
! #define CAN_ANONYMOUS_MAIL    FALSE
  
  /*******************************
   * set to FALSE if you don't want users of your anonymous
***************
*** 836,842 ****
   * also see src/HTInit.c to verify/change the execution
   * script extensions and/or commands.
   */
! /* #define EXEC_LINKS  */ 
  /* #define EXEC_SCRIPTS  */ 
  
  /**********
--- 836,842 ----
   * also see src/HTInit.c to verify/change the execution
   * script extensions and/or commands.
   */
! #define EXEC_LINKS
  /* #define EXEC_SCRIPTS  */ 
  
  /**********
***************
*** 867,873 ****
   * Uncomment the following line to define LYNXCGI_LINK, and when
   * running Lynx, enter  lynxcgi:advice  as a G)oto URL.
   */
! /* #define LYNXCGI_LINKS */
  
  #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
  
--- 867,873 ----
   * Uncomment the following line to define LYNXCGI_LINK, and when
   * running Lynx, enter  lynxcgi:advice  as a G)oto URL.
   */
! #define LYNXCGI_LINKS
  
  #if defined(EXEC_LINKS) || defined(EXEC_SCRIPTS)
  
***************
*** 920,926 ****
   *
   */
  #define LOCAL_EXECUTION_LINKS_ALWAYS_ON          FALSE
! #define LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE  FALSE
  #define LOCAL_EXECUTION_LINKS_ALWAYS_OFF_FOR_ANONYMOUS FALSE
  
  #endif /*  defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) */
--- 920,926 ----
   *
   */
  #define LOCAL_EXECUTION_LINKS_ALWAYS_ON          FALSE
! #define LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE  TRUE
  #define LOCAL_EXECUTION_LINKS_ALWAYS_OFF_FOR_ANONYMOUS FALSE
  
  #endif /*  defined(EXEC_LINKS) || defined(EXEC_SCRIPTS) */
***************
*** 950,956 ****
   * instead (e.g., in a public account which will be used by people who
   * are ignorant about VMS).
   */
! #define CHECKMAIL     FALSE   /* report unread and new mail messages */
  
  /*********************************
   * VI_KEYS can be turned on by the user in the options
--- 950,956 ----
   * instead (e.g., in a public account which will be used by people who
   * are ignorant about VMS).
   */
! #define CHECKMAIL     TRUE    /* report unread and new mail messages */
  
  /*********************************
   * VI_KEYS can be turned on by the user in the options
***************
*** 971,977 ****
   *    LINKS_ARE_NUMBERED  or
   *    NUMBERS_AS_ARROWS
   */
! #define DEFAULT_KEYPAD_MODE          NUMBERS_AS_ARROWS
  
  /********************************
   * The default search.
--- 971,977 ----
   *    LINKS_ARE_NUMBERED  or
   *    NUMBERS_AS_ARROWS
   */
! #define DEFAULT_KEYPAD_MODE          LINKS_ARE_NUMBERED
  
  /********************************
   * The default search.
***************
*** 1038,1044 ****
   * you prefer the more conservative action of requiring an explicit
   * Y or y to confirm.
   */
! #define QUIT_DEFAULT_YES
  
  /********************************
   * These definitions specify files created or used in conjunction
--- 1038,1044 ----
   * you prefer the more conservative action of requiring an explicit
   * Y or y to confirm.
   */
! /* #define QUIT_DEFAULT_YES */
  
  /********************************
   * These definitions specify files created or used in conjunction
***************
*** 1082,1095 ****
  
  #ifdef VMS
  /* Use the VMS port of gzip for uncompressing both .Z and .gz files. */
! #define UNCOMPRESS_PATH  "gzip -d"
! #define GZIP_PATH "gzip"
  #else
  /* Check these paths on Unix. */
! #define       COMPRESS_PATH   "/usr/ucb/compress"
! #define       UNCOMPRESS_PATH "/usr/ucb/uncompress"
  #define UUDECODE_PATH   "/bin/uudecode"
! #define       ZCAT_PATH       "/usr/local/bin/zcat"
  #define       GZIP_PATH       "/usr/local/bin/gzip"
  #define       ZIP_PATH        "/usr/local/bin/zip"
  #define       UNZIP_PATH      "/usr/local/bin/unzip"
--- 1082,1095 ----
  
  #ifdef VMS
  /* Use the VMS port of gzip for uncompressing both .Z and .gz files. */
! #define UNCOMPRESS_PATH  "/usr/local/bin/gzip -d"
! #define GZIP_PATH "/usr/local/bin/gzip"
  #else
  /* Check these paths on Unix. */
! #define       COMPRESS_PATH   "/usr/bin/compress"
! #define       UNCOMPRESS_PATH "/usr/local/bin/gunzip"
  #define UUDECODE_PATH   "/bin/uudecode"
! #define       ZCAT_PATH       "/usr/local/bin/gzcat"
  #define       GZIP_PATH       "/usr/local/bin/gzip"
  #define       ZIP_PATH        "/usr/local/bin/zip"
  #define       UNZIP_PATH      "/usr/local/bin/unzip"
***************
*** 1097,1102 ****
--- 1097,1103 ----
  #define       MKDIR_PATH      "/bin/mkdir"
  #define       MV_PATH         "/bin/mv"
  #define       RM_PATH         "/bin/rm"
+ #define SZ_PATH               "/usr/local/bin/sz"
  #define       TAR_PATH        "/bin/tar"
  #define       TOUCH_PATH      "/bin/touch"
  #define COPY_PATH     "/bin/cp"
*** LYMessages_en.h     Wed Aug 28 16:58:00 1996
--- ../lynx2-6.vcn/LYMessages_en.h      Thu Oct 31 12:34:56 1996
***************
*** 22,33 ****
   * one of those with a different name.
   */
  #ifdef QUIT_DEFAULT_YES
! #define REALLY_QUIT "Are you sure you want to quit? [Y] "
  #ifdef VMS
  #define REALLY_EXIT "Really exit from Lynx? [Y] "
  #endif /* VMS */
  #else
! #define REALLY_QUIT "Are you sure you want to quit? [N] "
  #ifdef VMS
  #define REALLY_EXIT "Really exit from Lynx? [N] "
  #endif /* VMS */
--- 22,33 ----
   * one of those with a different name.
   */
  #ifdef QUIT_DEFAULT_YES
! #define REALLY_QUIT "Do you wish to leave the Vancouver CommunityNet? [Y] "
  #ifdef VMS
  #define REALLY_EXIT "Really exit from Lynx? [Y] "
  #endif /* VMS */
  #else
! #define REALLY_QUIT "Do you wish to leave the Vancouver CommunityNet? [N] "
  #ifdef VMS
  #define REALLY_EXIT "Really exit from Lynx? [N] "
  #endif /* VMS */
*** src/LYMainLoop.c    Sun Sep  1 20:25:32 1996
--- ../lynx2-6.vcn/src/LYMainLoop.c     Thu Nov  7 01:20:49 1996
***************
*** 1911,1916 ****
--- 1911,1922 ----
                  _statusline(GOTO_FILE_DISALLOWED);
                  sleep(MessageSecs);
  
+ /* rhung - disable LYNXDOWNLOAD from Goto line as well. */
+ 
+           } else if (!strncmp(user_input_buffer, "LYNXDOWNLOAD:",13)) {
+               _statusline("You are not allowed to goto \"LYNXDOWNLOAD:\" 
URL's");
+               sleep(MessageSecs);
+ 
  #ifdef EXEC_LINKS
              } else if ((no_shell || no_goto_lynxexec ||
                        local_exec_on_local_files) &&
*** src/LYUtils.c       Sat Aug 31 18:08:10 1996
--- ../lynx2-6.vcn/src/LYUtils.c        Sat Nov  9 18:07:32 1996
***************
*** 942,952 ****
        }
        return(HTTP_URL_TYPE);
  
      } else if (!strncasecomp(cp, "file:", 5)) {
!         if (strncmp(cp, "file", 4)) {
!           for (i = 0; i < 4; i++)
!               cp[i] = TOLOWER(cp[i]);
!       }
          /*
         *  We won't expend the overhead here of
         *  determining whether it's really an
--- 942,978 ----
        }
        return(HTTP_URL_TYPE);
  
+ /* rhung - If it ain't a /~ link, then it shouldn't be a file url */
+ 
      } else if (!strncasecomp(cp, "file:", 5)) {
!         char *gdfilea=NULL;
!         char *gdfileb=NULL;
!         char *yohome=NULL;
!         int la;
!         int lb;
! 
!         StrAllocCopy(gdfilea, "file:");
!         StrAllocCopy(gdfileb, "file://localhost");
!         StrAllocCopy(yohome, Home_Dir());
! 
!         StrAllocCat(gdfilea, yohome);
!         StrAllocCat(gdfileb, yohome);
! 
!         la = strlen(gdfilea);
!         lb = strlen(gdfileb);
! 
!         if (!strncasecomp(cp, "file://localhost/~", 18)
!             || !strncasecomp(cp, "file://localhost/tmp/", 21)
!           || !strncasecomp(cp, "file://localhost/usr/local/www/", 31)
!             || !strncasecomp(cp, "file:/~", 7)
!             || !strncasecomp(cp, "file:/tmp/", 10)
!           || !strncasecomp(cp, "file:/usr/local/www/", 20)
!             || !strncasecomp(cp, gdfilea, la)
!             || !strncasecomp(cp, gdfileb, lb)) {
!           if (strncmp(cp, "file", 4)) {
!             for (i = 0; i < 4; i++)
!                 cp[i] = TOLOWER(cp[i]);
!         }
          /*
         *  We won't expend the overhead here of
         *  determining whether it's really an
***************
*** 956,965 ****
         *  appropriate statusline message and
         *  and return NULLFILE.
         */
!         if ((ftp_ok) || LYisLocalFile(cp))
!           return(FILE_URL_TYPE);
!       else
!           return(FTP_URL_TYPE);
  
      } else if (!strncasecomp(cp, "gopher:", 7)) {
          if (strncmp(cp, "gopher", 6)) {
--- 982,998 ----
         *  appropriate statusline message and
         *  and return NULLFILE.
         */
!           if ((ftp_ok) || LYisLocalFile(cp))
!             return(FILE_URL_TYPE);
!         else
!             return(FTP_URL_TYPE);
! 
!         }
!         else {
!         _statusline("You are not allowed to goto \"file:\" URL's outside of 
your home directory!");
!         sleep(MessageSecs);
!         return(0);
!         }
  
      } else if (!strncasecomp(cp, "gopher:", 7)) {
          if (strncmp(cp, "gopher", 6)) {
*** src/LYGetFile.c     Sun Sep  1 20:24:28 1996
--- ../lynx2-6.vcn/src/LYGetFile.c      Fri Nov 22 15:56:16 1996
***************
*** 339,344 ****
--- 339,345 ----
  #endif /* VMS */
                        }
                        start_curses();
+                       ++LYforce_no_cache;
                        
                     } else {
                        char buf[512];
*** src/LYLocal.c       Sun Sep  1 20:24:44 1996
--- ../lynx2-6.vcn/src/LYLocal.c        Wed Nov 27 13:04:03 1996
***************
*** 44,52 ****
  PRIVATE struct dired_menu *menu_head = NULL;
  struct dired_menu {
        int cond;
! #             define  DE_TAG  1
! #             define  DE_DIR  2
! #             define  DE_FILE 3
        char *sfx;
        char *link;
        char *rest;
--- 44,52 ----
  PRIVATE struct dired_menu *menu_head = NULL;
  struct dired_menu {
        int cond;
! #               define  DE_TAG  1
! #               define  DE_DIR  2
! #               define  DE_FILE 3
        char *sfx;
        char *link;
        char *rest;
***************
*** 59,160 ****
   * configuration file via DIRED_MENU lines, then these default entries
   * are discarded entirely.
   */
! { 0,                "", "New File",
! "(in current directory)", "LYNXDIRED://NEW_FILE%d",           NULL },
  
! { 0,                "", "New Directory",
! "(in current directory)", "LYNXDIRED://NEW_FOLDER%d",         NULL },
  
! { 0,                "", "Install",
! "(of current selection)", "LYNXDIRED://INSTALL_SRC%p",                NULL },
  
! { 0,                "", "Modify Name",
! "(of current selection)", "LYNXDIRED://MODIFY_NAME%p",                NULL },
  
  #ifdef OK_PERMIT
! { 0,                "", "Permit Name",
! "(of current selection)", "LYNXDIRED://PERMIT_SRC%p",         NULL },
  #endif /* OK_PERMIT */
  
! { 0,                "", "Change Location",
! "(of current selection)", "LYNXDIRED://MODIFY_LOCATION%p",    NULL },
  
! { 0,                "", "Remove",
!    "(current selection)", "LYNXDIRED://REMOVE_SINGLE%p",      NULL },
  
  #if defined(OK_UUDECODE) && !defined(ARCHIVE_ONLY)
! { DE_FILE,          "", "UUDecode",
!    "(current selection)", "LYNXDIRED://UUDECODE%p",           NULL },
  #endif /* OK_UUDECODE && !ARCHIVE_ONLY */
  
  #if defined(OK_TAR) && !defined(ARCHIVE_ONLY)
  { DE_FILE,      ".tar.Z", "Expand",
!    "(current selection)", "LYNXDIRED://UNTAR_Z%p",            NULL },
  #endif /* OK_TAR && !ARCHIVE_ONLY */
  
  #if defined(OK_TAR) && defined(OK_GZIP) && !defined(ARCHIVE_ONLY)
  { DE_FILE,     ".tar.gz", "Expand",
!    "(current selection)", "LYNXDIRED://UNTAR_GZ%p",           NULL },
  #endif /* OK_TAR && OK_GZIP && !ARCHIVE_ONLY */
  
  #ifndef ARCHIVE_ONLY
  { DE_FILE,          ".Z", "Uncompress",
!    "(current selection)", "LYNXDIRED://DECOMPRESS%p",         NULL },
  #endif /* ARCHIVE_ONLY */
  
  #if defined(OK_GZIP) && !defined(ARCHIVE_ONLY)
  { DE_FILE,         ".gz", "Uncompress",
!    "(current selection)", "LYNXDIRED://UNGZIP%p",             NULL },
  #endif /* OK_GZIP && !ARCHIVE_ONLY */
  
  #if defined(OK_ZIP) && !defined(ARCHIVE_ONLY)
  { DE_FILE,        ".zip", "Uncompress",
!    "(current selection)", "LYNXDIRED://UNZIP%p",              NULL },
  #endif /* OK_ZIP && !ARCHIVE_ONLY */
  
  #if defined(OK_TAR) && !defined(ARCHIVE_ONLY)
  { DE_FILE,        ".tar", "UnTar",
!    "(current selection)", "LYNXDIRED://UNTAR%p",              NULL },
  #endif /* OK_TAR && !ARCHIVE_ONLY */
  
  #ifdef OK_TAR
! { DE_DIR,           "", "Tar",
!    "(current selection)", "LYNXDIRED://TAR%p",                        NULL },
  #endif /* OK_TAR */
  
  #if defined(OK_TAR) && defined(OK_GZIP)
! { DE_DIR,           "", "Tar and compress",
!       "(using GNU gzip)", "LYNXDIRED://TAR_GZ%p",             NULL },
  #endif /* OK_TAR && OK_GZIP */
  
  #ifdef OK_ZIP
! { DE_DIR,           "", "Package and compress",
!            "(using zip)", "LYNXDIRED://ZIP%f",                        NULL },
  #endif /* OK_ZIP */
  
! { DE_FILE,          "", "Compress",
!  "(using Unix compress)", "LYNXDIRED://COMPRESS%p",           NULL },
  
  #ifdef OK_GZIP
! { DE_FILE,          "", "Compress",
!           "(using gzip)", "LYNXDIRED://GZIP%p",                       NULL },
  #endif /* OK_GZIP */
  
  #ifdef OK_ZIP
! { DE_FILE,          "", "Compress",
!            "(using zip)", "LYNXDIRED://ZIP%f",                        NULL },
  #endif /* OK_ZIP */
  
! { DE_TAG,           "", "Move all tagged items to another location.",
!                     "", "LYNXDIRED://MOVE_TAGGED",            NULL },
  
! { DE_TAG,           "", "Remove all tagged files and directories.",
!                     "", "LYNXDIRED://REMOVE_TAGGED",          NULL },
  
! { 0,              NULL, NULL,
!                   NULL, NULL,                                 NULL }
  };
  
  /* Remove all tagged files and directories. */
  
  PRIVATE BOOLEAN remove_tagged NOARGS
--- 59,311 ----
   * configuration file via DIRED_MENU lines, then these default entries
   * are discarded entirely.
   */
! { 0,                  "", "New File",
! "(in current directory)", "LYNXDIRED://NEW_FILE%d",             NULL },
  
! { 0,                  "", "New Directory",
! "(in current directory)", "LYNXDIRED://NEW_FOLDER%d",           NULL },
  
! { 0,                  "", "Install",
! "(of current selection)", "LYNXDIRED://INSTALL_SRC%p",          NULL },
  
! { 0,                  "", "Modify Name",
! "(of current selection)", "LYNXDIRED://MODIFY_NAME%p",          NULL },
  
  #ifdef OK_PERMIT
! { 0,                  "", "Permit Name",
! "(of current selection)", "LYNXDIRED://PERMIT_SRC%p",           NULL },
  #endif /* OK_PERMIT */
  
! { 0,                  "", "Change Location",
! "(of current selection)", "LYNXDIRED://MODIFY_LOCATION%p",      NULL },
  
! { 0,                  "", "Remove",
!    "(current selection)", "LYNXDIRED://REMOVE_SINGLE%p",        NULL },
  
  #if defined(OK_UUDECODE) && !defined(ARCHIVE_ONLY)
! { DE_FILE,            "", "UUDecode",
!    "(current selection)", "LYNXDIRED://UUDECODE%p",             NULL },
  #endif /* OK_UUDECODE && !ARCHIVE_ONLY */
  
  #if defined(OK_TAR) && !defined(ARCHIVE_ONLY)
  { DE_FILE,      ".tar.Z", "Expand",
!    "(current selection)", "LYNXDIRED://UNTAR_Z%p",              NULL },
  #endif /* OK_TAR && !ARCHIVE_ONLY */
  
  #if defined(OK_TAR) && defined(OK_GZIP) && !defined(ARCHIVE_ONLY)
  { DE_FILE,     ".tar.gz", "Expand",
!    "(current selection)", "LYNXDIRED://UNTAR_GZ%p",             NULL },
  #endif /* OK_TAR && OK_GZIP && !ARCHIVE_ONLY */
  
  #ifndef ARCHIVE_ONLY
  { DE_FILE,          ".Z", "Uncompress",
!    "(current selection)", "LYNXDIRED://DECOMPRESS%p",           NULL },
  #endif /* ARCHIVE_ONLY */
  
  #if defined(OK_GZIP) && !defined(ARCHIVE_ONLY)
  { DE_FILE,         ".gz", "Uncompress",
!    "(current selection)", "LYNXDIRED://UNGZIP%p",               NULL },
  #endif /* OK_GZIP && !ARCHIVE_ONLY */
  
  #if defined(OK_ZIP) && !defined(ARCHIVE_ONLY)
  { DE_FILE,        ".zip", "Uncompress",
!    "(current selection)", "LYNXDIRED://UNZIP%p",                NULL },
  #endif /* OK_ZIP && !ARCHIVE_ONLY */
  
  #if defined(OK_TAR) && !defined(ARCHIVE_ONLY)
  { DE_FILE,        ".tar", "UnTar",
!    "(current selection)", "LYNXDIRED://UNTAR%p",                NULL },
  #endif /* OK_TAR && !ARCHIVE_ONLY */
  
  #ifdef OK_TAR
! { DE_DIR,             "", "Tar",
!    "(current selection)", "LYNXDIRED://TAR%p",                  NULL },
  #endif /* OK_TAR */
  
  #if defined(OK_TAR) && defined(OK_GZIP)
! { DE_DIR,             "", "Tar and compress",
!       "(using GNU gzip)", "LYNXDIRED://TAR_GZ%p",               NULL },
  #endif /* OK_TAR && OK_GZIP */
  
  #ifdef OK_ZIP
! { DE_DIR,             "", "Package and compress",
!          "(using zip)", "LYNXDIRED://ZIP%p",                  NULL },
  #endif /* OK_ZIP */
  
! { DE_FILE,            "", "Compress",
!  "(using Unix compress)", "LYNXDIRED://COMPRESS%p",             NULL },
  
  #ifdef OK_GZIP
! { DE_FILE,            "", "Compress",
!         "(using gzip)", "LYNXDIRED://GZIP%p",                 NULL },
  #endif /* OK_GZIP */
  
  #ifdef OK_ZIP
! { DE_FILE,            "", "Compress",
!          "(using zip)", "LYNXDIRED://ZIP%p",                  NULL },
  #endif /* OK_ZIP */
  
! { DE_TAG,             "", "Move all tagged items to another location.",
!                     "", "LYNXDIRED://MOVE_TAGGED",            NULL },
  
! { DE_TAG,             "", "Remove all tagged files and directories.",
!                     "", "LYNXDIRED://REMOVE_TAGGED",          NULL },
  
! /* Download tagged files - rhung */
! 
! { DE_TAG,             "", "Download all tagged files.",
!                     "", "LYNXDIRED://DOWNLOAD_TAGGED",        NULL },
! 
! /* Zip tagged files - rhung */
! 
! { DE_TAG,             "", "Zip together all tagged files.",
!                     "", "LYNXDIRED://ZIP_TAGGED%d",             NULL },
! 
! { 0,                NULL, NULL,
!                   NULL, NULL,                                 NULL }
  };
  
+ PRIVATE BOOLEAN zip_tagged ARGS1(
+       char *,         current_location)
+ {
+    char *cp,*tp;
+    int count,i;
+    char command[2048];
+    char tmpbuf[512];
+    char testpath[512];
+    char testpatht[1024];
+    struct stat dir_info;
+    char *args[5];
+    char *bad_chars = ".~/";
+    taglink *tag;
+ 
+    if (tagged == NULL) return 0; /* should never happen */
+ 
+    sprintf(command, "%s -9jrq ", ZIP_PATH);
+ 
+    if (filename("Enter name of zipfile to create: ",
+               tmpbuf, sizeof(tmpbuf)) == NULL)
+       return 0;
+ 
+    if (!no_dotfiles && show_dotfiles) {
+        bad_chars = "~/";
+    }
+ 
+    if(strstr(tmpbuf,"//") != NULL) {
+       _statusline("Illegal redirection \"//\" found! Request ignored.");
+       sleep(AlertSecs);
+    } else if(strlen(tmpbuf) && strchr(bad_chars,tmpbuf[0]) == NULL) {
+       strcpy(testpath,current_location);
+       if(testpath[strlen(testpath)-1] != '/')
+       strcat(testpath,"/");
+ 
+ /* append the target filename to the current location */
+ 
+       strcat(testpath,tmpbuf);
+ 
+ /* make sure the target does not already exist */
+ 
+       if (stat(testpath,&dir_info) == -1) {
+        if (errno != ENOENT) {
+           sprintf(tmpbuf,"Unable to determine status of %s ",testpath);
+           _statusline(tmpbuf);
+           sleep(AlertSecs);
+           return 0;
+        } 
+        strcat(command,testpath);
+        strcat(command," ");
+        count = 0;
+        tag = tagged;
+        while(tag != NULL) {
+           cp = tag->name;
+           if(is_url(cp) == FILE_URL_TYPE) { /* unecessary check */
+           tp = cp;
+           if(!strncmp(tp,"file://localhost",16))
+             tp += 16;
+           else if(!strncmp(tp,"file:",5))
+             tp += 5;
+           strcpy(testpatht,tp);
+           HTUnEscape(testpatht);
+           if((i = strlen(testpatht)) && testpatht[i-1] == '/')
+             testpatht[i-1] = '\0';
+         }
+         strcat(command,testpatht);
+         strcat(command," ");
+         ++count;
+         tag = tag->next;
+      }
+        stop_curses();
+        system(command);
+        start_curses();
+        clear_tags();
+        return count;
+        } else if ((dir_info.st_mode & S_IFMT) == S_IFDIR) {
+        _statusline(
+          "There is already a directory with that name! Request ignored. ");
+        sleep(AlertSecs);
+       } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) {
+        _statusline(
+               "There is already a file with that name! Request ignored. ");
+        sleep(AlertSecs);
+       } else {
+        _statusline(
+               "The specified name is already in use! Request ignored. ");
+        sleep(AlertSecs);
+       }
+    }
+    return 0;
+ }
+ 
+ 
+ 
+ PRIVATE BOOLEAN download_tagged ()
+ {
+   char *cp,*tp;
+   int count,i;
+   char command[2048];
+   char testpath[512];
+   char tmpbuf[1024];
+   taglink *tag;
+ 
+   if (tagged == NULL) return 0; /* should never happen */
+ 
+   sprintf(command, "%s -b -w1024 ", SZ_PATH);
+ 
+   count = 0;
+   tag = tagged;
+   while(tag != NULL) {
+      cp = tag->name;
+      if(is_url(cp) == FILE_URL_TYPE) { /* unecessary check */
+        tp = cp;
+        if(!strncmp(tp,"file://localhost",16))
+          tp += 16;
+        else if(!strncmp(tp,"file:",5))
+          tp += 5;
+        strcpy(testpath,tp);
+        HTUnEscape(testpath);
+        if((i = strlen(testpath)) && testpath[i-1] == '/')
+          testpath[i-1] = '\0';
+      }
+      strcat(command,testpath);
+      strcat(command," ");
+      ++count;
+      tag = tag->next;
+   }
+ 
+   sprintf(tmpbuf, "something");
+   stop_curses();
+   system(command);
+   while(tmpbuf[0] != '\0') {
+      printf("\n%s", RETURN_TO_LYNX);
+      fflush(stdout);
+      tmpbuf[0] = '\0';
+      LYgetstr(tmpbuf, VISIBLE, sizeof(tmpbuf), NORECALL);
+   }
+   start_curses();
+   clear_tags();
+   return count;
+ }
+ 
  /* Remove all tagged files and directories. */
  
  PRIVATE BOOLEAN remove_tagged NOARGS
***************
*** 217,223 ****
  /* Input is current directory. */
  
  PRIVATE BOOLEAN modify_tagged ARGS1(
!       char *,         testpath)
  {
     char *cp;
     dev_t dev;
--- 368,374 ----
  /* Input is current directory. */
  
  PRIVATE BOOLEAN modify_tagged ARGS1(
!       char *,         testpath)
  {
     char *cp;
     dev_t dev;
***************
*** 346,352 ****
  /* Modify the name of the specified item. */
  
  PRIVATE BOOLEAN modify_name ARGS1(
!       char *,         testpath)
  {
     char *cp;
     char tmpbuf[512];
--- 497,503 ----
  /* Modify the name of the specified item. */
  
  PRIVATE BOOLEAN modify_name ARGS1(
!       char *,         testpath)
  {
     char *cp;
     char tmpbuf[512];
***************
*** 414,424 ****
            sleep(AlertSecs);
         } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) {
            _statusline(
!               "There is already a file with that name! Request ignored. ");
            sleep(AlertSecs);
         } else {
            _statusline(
!               "The specified name is already in use! Request ignored. ");
            sleep(AlertSecs);
         }
        }
--- 565,575 ----
            sleep(AlertSecs);
         } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) {
            _statusline(
!               "There is already a file with that name! Request ignored. ");
            sleep(AlertSecs);
         } else {
            _statusline(
!               "The specified name is already in use! Request ignored. ");
            sleep(AlertSecs);
         }
        }
***************
*** 429,435 ****
  /* Change the location of a file or directory. */
  
  PRIVATE BOOLEAN modify_location ARGS1(
!       char *,         testpath)
  {
     int mode;
     char *cp;
--- 580,586 ----
  /* Change the location of a file or directory. */
  
  PRIVATE BOOLEAN modify_location ARGS1(
!       char *,         testpath)
  {
     int mode;
     char *cp;
***************
*** 461,467 ****
        cp = "Enter new location for file: ";
     } else {
        _statusline(
!         "The specified item is not a file or a directory - request ignored.");
        sleep(AlertSecs);
        return 0;
     }
--- 612,618 ----
        cp = "Enter new location for file: ";
     } else {
        _statusline(
!       "The specified item is not a file or a directory - request ignored.");
        sleep(AlertSecs);
        return 0;
     }
***************
*** 506,512 ****
        }
        if ((dir_info.st_mode & S_IFMT) != S_IFDIR) {
         _statusline(
!               "Destination is not a valid directory! Request denied. ");
         sleep(AlertSecs);
         return 0;
        }
--- 657,663 ----
        }
        if ((dir_info.st_mode & S_IFMT) != S_IFDIR) {
         _statusline(
!               "Destination is not a valid directory! Request denied. ");
         sleep(AlertSecs);
         return 0;
        }
***************
*** 540,547 ****
  /* Modify name or location of a file or directory on localhost. */
  
  PUBLIC BOOLEAN local_modify ARGS2(
!       document *,     doc,
!       char **,        newpath)
  {
     int c, ans;
     char *cp;
--- 691,698 ----
  /* Modify name or location of a file or directory on localhost. */
  
  PUBLIC BOOLEAN local_modify ARGS2(
!       document *,     doc,
!       char **,        newpath)
  {
     int c, ans;
     char *cp;
***************
*** 616,622 ****
  /* Create a new empty file in the current directory. */
  
  PRIVATE BOOLEAN create_file ARGS1(
!       char *,         current_location)
  {
     char tmpbuf[512];
     char testpath[512];
--- 767,773 ----
  /* Create a new empty file in the current directory. */
  
  PRIVATE BOOLEAN create_file ARGS1(
!       char *,         current_location)
  {
     char tmpbuf[512];
     char testpath[512];
***************
*** 625,631 ****
     char *bad_chars = ".~/";
  
     if (filename("Enter name of file to create: ",
!               tmpbuf, sizeof(tmpbuf)) == NULL)
        return 0;
  
     if (!no_dotfiles && show_dotfiles) {
--- 776,782 ----
     char *bad_chars = ".~/";
  
     if (filename("Enter name of file to create: ",
!               tmpbuf, sizeof(tmpbuf)) == NULL)
        return 0;
  
     if (!no_dotfiles && show_dotfiles) {
***************
*** 666,676 ****
         sleep(AlertSecs);
        } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) {
         _statusline(
!               "There is already a file with that name! Request ignored. ");
         sleep(AlertSecs);
        } else {
         _statusline(
!               "The specified name is already in use! Request ignored. ");
         sleep(AlertSecs);
        }
     }
--- 817,827 ----
         sleep(AlertSecs);
        } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) {
         _statusline(
!               "There is already a file with that name! Request ignored. ");
         sleep(AlertSecs);
        } else {
         _statusline(
!               "The specified name is already in use! Request ignored. ");
         sleep(AlertSecs);
        }
     }
***************
*** 680,686 ****
  /* Create a new directory in the current directory. */
  
  PRIVATE BOOLEAN create_directory ARGS1(
!       char *,         current_location)
  {
     char tmpbuf[512];
     char testpath[512];
--- 831,837 ----
  /* Create a new directory in the current directory. */
  
  PRIVATE BOOLEAN create_directory ARGS1(
!       char *,         current_location)
  {
     char tmpbuf[512];
     char testpath[512];
***************
*** 689,695 ****
     char *bad_chars = ".~/";
  
     if (filename("Enter name for new directory: ",
!               tmpbuf, sizeof(tmpbuf)) == NULL)
        return 0;
  
     if (!no_dotfiles && show_dotfiles) {
--- 840,846 ----
     char *bad_chars = ".~/";
  
     if (filename("Enter name for new directory: ",
!               tmpbuf, sizeof(tmpbuf)) == NULL)
        return 0;
  
     if (!no_dotfiles && show_dotfiles) {
***************
*** 729,739 ****
         sleep(AlertSecs);
        } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) {
         _statusline(
!               "There is already a file with that name! Request ignored. ");
         sleep(AlertSecs);
        } else {
         _statusline(
!               "The specified name is already in use! Request ignored. ");
         sleep(AlertSecs);
        }
     }
--- 880,890 ----
         sleep(AlertSecs);
        } else if ((dir_info.st_mode & S_IFMT) == S_IFREG) {
         _statusline(
!               "There is already a file with that name! Request ignored. ");
         sleep(AlertSecs);
        } else {
         _statusline(
!               "The specified name is already in use! Request ignored. ");
         sleep(AlertSecs);
        }
     }
***************
*** 743,749 ****
  /* Create a file or a directory at the current location. */
  
  PUBLIC BOOLEAN local_create ARGS1(
!       document *,     doc)
  {
     int c, ans;
     char *cp;
--- 894,900 ----
  /* Create a file or a directory at the current location. */
  
  PUBLIC BOOLEAN local_create ARGS1(
!       document *,     doc)
  {
     int c, ans;
     char *cp;
***************
*** 772,778 ****
  /* Remove a single file or directory. */
  
  PRIVATE BOOLEAN remove_single ARGS1(
!       char *,         testpath) 
  {
     int c;
     char *cp;
--- 923,929 ----
  /* Remove a single file or directory. */
  
  PRIVATE BOOLEAN remove_single ARGS1(
!       char *,         testpath) 
  {
     int c;
     char *cp;
***************
*** 836,842 ****
  /* Remove a file or a directory. */
  
  PUBLIC BOOLEAN local_remove ARGS1(
!       document *,     doc)
  {  
     char *cp,*tp;
     char testpath[512];
--- 987,993 ----
  /* Remove a file or a directory. */
  
  PUBLIC BOOLEAN local_remove ARGS1(
!       document *,     doc)
  {  
     char *cp,*tp;
     char testpath[512];
***************
*** 877,884 ****
  #ifdef OK_PERMIT
  /* Table of permission strings and chmod values. Makes the code a bit cleaner 
*/
  static struct {
!     char *string_mode;        /* Key for  value below */
!     long permit_bits; /* Value for chmod/whatever */
  } permissions[] = {
      {"IRUSR", S_IRUSR},
      {"IWUSR", S_IWUSR},
--- 1028,1035 ----
  #ifdef OK_PERMIT
  /* Table of permission strings and chmod values. Makes the code a bit cleaner 
*/
  static struct {
!     char *string_mode;  /* Key for  value below */
!     long permit_bits;   /* Value for chmod/whatever */
  } permissions[] = {
      {"IRUSR", S_IRUSR},
      {"IWUSR", S_IWUSR},
***************
*** 889,895 ****
      {"IROTH", S_IROTH},
      {"IWOTH", S_IWOTH},
      {"IXOTH", S_IXOTH},
!     {NULL, 0}                 /* Don't include setuid and friends,
                                   use shell access for that */
  };
  
--- 1040,1046 ----
      {"IROTH", S_IROTH},
      {"IWOTH", S_IWOTH},
      {"IXOTH", S_IXOTH},
!     {NULL, 0}                   /* Don't include setuid and friends,
                                   use shell access for that */
  };
  
***************
*** 898,906 ****
  #endif /* !S_ISDIR */
      
  PRIVATE BOOLEAN permit_location ARGS3(
!       char *,         destpath,
!       char *,         srcpath,
!       char **,        newpath)
  {
  
  #ifndef UNIX
--- 1049,1057 ----
  #endif /* !S_ISDIR */
      
  PRIVATE BOOLEAN permit_location ARGS3(
!       char *,         destpath,
!       char *,         srcpath,
!       char **,        newpath)
  {
  
  #ifndef UNIX
***************
*** 1044,1052 ****
            cp++;
        }
        if (*cp == '\0') {
!           return(0);  /* Nothing to permit */
        }
!       *cp++ = '\0';   /* Null terminate file name
                           and start working on the masks */
        
        /* A couple of sanity tests */
--- 1195,1203 ----
            cp++;
        }
        if (*cp == '\0') {
!           return(0);  /* Nothing to permit */
        }
!       *cp++ = '\0';   /* Null terminate file name
                           and start working on the masks */
        
        /* A couple of sanity tests */
***************
*** 1074,1085 ****
            if (*cr != '\0') {
                *cr++ = '\0';
            }
!           if (strncmp(cp, "mode=", 5) == 0) { /* Magic string */
                int i;
  
                for(i = 0; permissions[i].string_mode != NULL; i++) {
                    if (strcmp(permissions[i].string_mode, cp+5) == 0) {
!                       /*
                         * If restricted, only change eXecute
                         * permissions on directories
                         */
--- 1225,1236 ----
            if (*cr != '\0') {
                *cr++ = '\0';
            }
!           if (strncmp(cp, "mode=", 5) == 0) { /* Magic string */
                int i;
  
                for(i = 0; permissions[i].string_mode != NULL; i++) {
                    if (strcmp(permissions[i].string_mode, cp+5) == 0) {
!                       /*
                         * If restricted, only change eXecute
                         * permissions on directories
                         */
***************
*** 1122,1128 ****
  #endif /* OK_PERMIT */
  
  PUBLIC BOOLEAN is_a_file ARGS1(
!       char *,         testname)
  { 
     char *cp;
     char testpath[512];
--- 1273,1279 ----
  #endif /* OK_PERMIT */
  
  PUBLIC BOOLEAN is_a_file ARGS1(
!       char *,         testname)
  { 
     char *cp;
     char testpath[512];
***************
*** 1147,1154 ****
  /* display or remove a tag from a given link */
  
  PUBLIC void tagflag ARGS2(
!       int,    flag,
!       int,    cur)
  {
      if (nlinks > 0 /*&& links[cur].lx == 3*/) {
         move(links[cur].ly,2 /*links[cur].lx-2*/);
--- 1298,1305 ----
  /* display or remove a tag from a given link */
  
  PUBLIC void tagflag ARGS2(
!       int,    flag,
!       int,    cur)
  {
      if (nlinks > 0 /*&& links[cur].lx == 3*/) {
         move(links[cur].ly,2 /*links[cur].lx-2*/);
***************
*** 1160,1180 ****
  
  #if defined(FANCY_CURSES) || defined(USE_SLANG)
        if(!LYShowCursor)
!           move(LYlines-1,LYcols-1);  /* get cursor out of the way */
        else
  #endif /* FANCY CURSES || USE_SLANG */
          /* never hide the cursor if there's no FANCY CURSES */
!           move(links[cur].ly, links[cur].lx);
  
  /***
        if(flag)
  ***/
!           refresh();
      }
  }
  
  PUBLIC void showtags ARGS1(
!       taglink *,      t)
  {
      int i;
      taglink *s;
--- 1311,1331 ----
  
  #if defined(FANCY_CURSES) || defined(USE_SLANG)
        if(!LYShowCursor)
!         move(LYlines-1,LYcols-1);  /* get cursor out of the way */
        else
  #endif /* FANCY CURSES || USE_SLANG */
          /* never hide the cursor if there's no FANCY CURSES */
!         move(links[cur].ly, links[cur].lx);
  
  /***
        if(flag)
  ***/
!         refresh();
      }
  }
  
  PUBLIC void showtags ARGS1(
!       taglink *,      t)
  {
      int i;
      taglink *s;
***************
*** 1192,1198 ****
  }
  
  PUBLIC char * strip_trailing_slash ARGS1(
!       char *,         dirname)
  {
     int i;
  
--- 1343,1349 ----
  }
  
  PUBLIC char * strip_trailing_slash ARGS1(
!       char *,         dirname)
  {
     int i;
  
***************
*** 1204,1210 ****
  /* Perform file management operations for LYNXDIRED URL's */
  
  PUBLIC int local_dired ARGS1(
!       document *,     doc)
  {
     char *line;
     char *cp,*tp;
--- 1355,1361 ----
  /* Perform file management operations for LYNXDIRED URL's */
  
  PUBLIC int local_dired ARGS1(
!       document *,     doc)
  {
     char *line;
     char *cp,*tp;
***************
*** 1236,1241 ****
--- 1387,1403 ----
        if (modify_location(&line[27])) ++LYforce_no_cache;
     } else if (!strncmp(line,"LYNXDIRED://MOVE_TAGGED",23)) {
        if (modify_tagged(&line[23])) ++LYforce_no_cache;
+ 
+ /* Add LYNXDIRED://DOWNLOAD_TAGGED - rhung */
+ 
+    } else if (!strncmp(line,"LYNXDIRED://DOWNLOAD_TAGGED",27)) {
+       if (download_tagged()) ++LYforce_no_cache;
+ 
+ /* Add LYNXDIRED://ZIP_TAGGED - rhung */
+ 
+    } else if (!strncmp(line,"LYNXDIRED://ZIP_TAGGED",22)) {
+       if (zip_tagged(&line[22])) ++LYforce_no_cache;
+ 
  #ifdef OK_PERMIT
     } else if (!strncmp(line,"LYNXDIRED://PERMIT_SRC",22)) {
        permit_location(NULL, &line[22], &tp);
***************
*** 1316,1322 ****
  
        } else if (!strncmp(line,"LYNXDIRED://TAR_Z",17)) {
        *cp++ = '\0';
!         cp = quote_pathname(cp);
        tp = quote_pathname(line+17);
        sprintf(buffer,"(cd %s; %s -cfe - %s) | %s >%s/%s.tar.Z",tp,TAR_PATH, 
cp,COMPRESS_PATH, tp,cp);
        FREE(cp);
--- 1478,1484 ----
  
        } else if (!strncmp(line,"LYNXDIRED://TAR_Z",17)) {
        *cp++ = '\0';
!       cp = quote_pathname(cp);
        tp = quote_pathname(line+17);
        sprintf(buffer,"(cd %s; %s -cfe - %s) | %s >%s/%s.tar.Z",tp,TAR_PATH, 
cp,COMPRESS_PATH, tp,cp);
        FREE(cp);
***************
*** 1324,1330 ****
  
        } else if (!strncmp(line,"LYNXDIRED://TAR",15)) {
        *cp++ = '\0';
!         cp = quote_pathname(cp);
        tp = quote_pathname(line+15);
        sprintf(buffer,"(cd %s; %s -cfe %s.tar %s)",tp,TAR_PATH, cp, cp);
        FREE(cp);
--- 1486,1492 ----
  
        } else if (!strncmp(line,"LYNXDIRED://TAR",15)) {
        *cp++ = '\0';
!       cp = quote_pathname(cp);
        tp = quote_pathname(line+15);
        sprintf(buffer,"(cd %s; %s -cfe %s.tar %s)",tp,TAR_PATH, cp, cp);
        FREE(cp);
***************
*** 1333,1345 ****
  
  #ifdef OK_GZIP
        } else if (!strncmp(line,"LYNXDIRED://GZIP",16)) {
        tp = quote_pathname(line+16);
!       sprintf(buffer,"%s -q %s", GZIP_PATH, tp);
        FREE(tp);
  # ifndef ARCHIVE_ONLY
        } else if (!strncmp(line,"LYNXDIRED://UNGZIP",18)) {
        tp = quote_pathname(line+18);
!       sprintf(buffer,"%s -d %s", GZIP_PATH, tp);
        FREE(tp);
  # endif /* !ARCHIVE_ONLY */
  #endif /* OK_GZIP */
--- 1495,1513 ----
  
  #ifdef OK_GZIP
        } else if (!strncmp(line,"LYNXDIRED://GZIP",16)) {
+         *cp++ = '\0';
+         cp = quote_pathname(cp);
        tp = quote_pathname(line+16);
!       sprintf(buffer,"cd %s; %s -q %s", tp, GZIP_PATH, cp);
!       FREE(cp);
        FREE(tp);
  # ifndef ARCHIVE_ONLY
        } else if (!strncmp(line,"LYNXDIRED://UNGZIP",18)) {
+         *cp++ = '\0';
+         cp = quote_pathname(cp);
        tp = quote_pathname(line+18);
!       sprintf(buffer,"cd %s; %s -d %s", tp, GZIP_PATH, cp);
!       FREE(cp);
        FREE(tp);
  # endif /* !ARCHIVE_ONLY */
  #endif /* OK_GZIP */
***************
*** 1346,1358 ****
  
  #ifdef OK_ZIP
        } else if (!strncmp(line,"LYNXDIRED://ZIP",15)) {
        tp = quote_pathname(line+15);
!       sprintf(buffer,"%s -rq %s.zip %s", ZIP_PATH, tp, tp);
        FREE(tp);
  # ifndef ARCHIVE_ONLY
        } else if (!strncmp(line,"LYNXDIRED://UNZIP",17)) {
        tp = quote_pathname(line+17);
!       sprintf(buffer,"%s -q %s", UNZIP_PATH, tp);
        FREE(tp);
  # endif /* !ARCHIVE_ONLY */
  #endif /* OK_ZIP */
--- 1514,1532 ----
  
  #ifdef OK_ZIP
        } else if (!strncmp(line,"LYNXDIRED://ZIP",15)) {
+         *cp++ = '\0';
+         cp = quote_pathname(cp);
        tp = quote_pathname(line+15);
!       sprintf(buffer,"cd %s; %s -9jrq %s.zip %s", tp, ZIP_PATH, cp, cp);
!       FREE(cp);
        FREE(tp);
  # ifndef ARCHIVE_ONLY
        } else if (!strncmp(line,"LYNXDIRED://UNZIP",17)) {
+         *cp++ = '\0';
+         cp = quote_pathname(cp);
        tp = quote_pathname(line+17);
!       sprintf(buffer,"cd %s; %s -j -q %s", tp, UNZIP_PATH, cp);
!       FREE(cp);
        FREE(tp);
  # endif /* !ARCHIVE_ONLY */
  #endif /* OK_ZIP */
***************
*** 1390,1397 ****
  /* Provide a menu of file management options. */
  
  PUBLIC int dired_options ARGS2(
!       document *,     doc,
!       char **,        newfile)
  {
      static char tempfile[128];
      static BOOLEAN first = TRUE;
--- 1564,1571 ----
  /* Provide a menu of file management options. */
  
  PUBLIC int dired_options ARGS2(
!       document *,     doc,
!       char **,        newfile)
  {
      static char tempfile[128];
      static BOOLEAN first = TRUE;
***************
*** 1409,1415 ****
  
  
      if (first) {
!         tempname(tempfile, NEW_FILE);
        first = FALSE;
      }
  
--- 1583,1589 ----
  
  
      if (first) {
!       tempname(tempfile, NEW_FILE);
        first = FALSE;
      }
  
***************
*** 1464,1478 ****
      
fprintf(fp0,"<head>\n<title>%s</title></head>\n<body>\n",DIRED_MENU_TITLE);
  
      fprintf(fp0,"\n<h1>File Management Options (%s Version %s)</h1>",
!                                               LYNX_NAME, LYNX_VERSION);
  
      fprintf(fp0,"Current directory is %s <br>\n",dir);
  
      if (tagged == NULL)
         if (strlen(path))
!           fprintf(fp0,"Current selection is %s <p>\n",path);
         else
!           fprintf(fp0,"Nothing currently selected. <p>\n");
      else 
         fprintf(fp0,"Current selection is all tagged items. <p>\n");
  
--- 1638,1652 ----
      
fprintf(fp0,"<head>\n<title>%s</title></head>\n<body>\n",DIRED_MENU_TITLE);
  
      fprintf(fp0,"\n<h1>File Management Options (%s Version %s)</h1>",
!                                               LYNX_NAME, LYNX_VERSION);
  
      fprintf(fp0,"Current directory is %s <br>\n",dir);
  
      if (tagged == NULL)
         if (strlen(path))
!         fprintf(fp0,"Current selection is %s <p>\n",path);
         else
!         fprintf(fp0,"Nothing currently selected. <p>\n");
      else 
         fprintf(fp0,"Current selection is all tagged items. <p>\n");
  
***************
*** 1521,1529 ****
  }
  
  PRIVATE int my_spawn ARGS3(
!       char *,         path,
!       char **,        argv,
!       char *,         msg)
  {
      int rc;
      char tmpbuf[512];
--- 1695,1703 ----
  }
  
  PRIVATE int my_spawn ARGS3(
!       char *,         path,
!       char **,        argv,
!       char *,         msg)
  {
      int rc;
      char tmpbuf[512];
***************
*** 1574,1582 ****
  }
  
  PRIVATE char *filename ARGS3(
!       char *,         prompt,
!       char *,         buf,
!       int,            bufsize)
  {
     char *cp;
  
--- 1748,1756 ----
  }
  
  PRIVATE char *filename ARGS3(
!       char *,         prompt,
!       char *,         buf,
!       int,            bufsize)
  {
     char *cp;
  
***************
*** 1591,1597 ****
     }
  
     if (no_dotfiles || !show_dotfiles) {
!        cp = strrchr(buf, '/');        /* find last slash */
         if (cp) 
           cp += 1;
         else
--- 1765,1771 ----
     }
  
     if (no_dotfiles || !show_dotfiles) {
!        cp = strrchr(buf, '/');  /* find last slash */
         if (cp) 
           cp += 1;
         else
***************
*** 1608,1616 ****
  /* Install the specified file or directory. */
  
  PUBLIC BOOLEAN local_install ARGS3(
!       char *,         destpath,
!       char *,         srcpath,
!       char **,        newpath)
  {
     char tmpbuf[512];
     static char savepath[512]; /* this will be the link that is to be 
installed */
--- 1782,1790 ----
  /* Install the specified file or directory. */
  
  PUBLIC BOOLEAN local_install ARGS3(
!       char *,         destpath,
!       char *,         srcpath,
!       char **,        newpath)
  {
     char tmpbuf[512];
     static char savepath[512]; /* this will be the link that is to be 
installed */
***************
*** 1627,1642 ****
        if(strncmp(srcpath,"file://localhost",16) == 0)
         srcpath += 16;
        if (stat(srcpath,&dir_info) == -1) {
!          sprintf(tmpbuf,"Unable to get status of %s ",srcpath);
!          _statusline(tmpbuf);
!          sleep(AlertSecs);
!          return 0;
        } else if ((dir_info.st_mode & S_IFMT) != S_IFDIR && 
!                  (dir_info.st_mode & S_IFMT) != S_IFREG) {
!          _statusline(
          "The selected item is not a file or a directory! Request ignored. ");
!          sleep(AlertSecs);
!          return 0;
        }
        strcpy(savepath, srcpath);
        ++LYforce_no_cache;
--- 1801,1816 ----
        if(strncmp(srcpath,"file://localhost",16) == 0)
         srcpath += 16;
        if (stat(srcpath,&dir_info) == -1) {
!        sprintf(tmpbuf,"Unable to get status of %s ",srcpath);
!        _statusline(tmpbuf);
!        sleep(AlertSecs);
!        return 0;
        } else if ((dir_info.st_mode & S_IFMT) != S_IFDIR && 
!                (dir_info.st_mode & S_IFMT) != S_IFREG) {
!        _statusline(
          "The selected item is not a file or a directory! Request ignored. ");
!        sleep(AlertSecs);
!        return 0;
        }
        strcpy(savepath, srcpath);
        ++LYforce_no_cache;
***************
*** 1650,1668 ****
        destpath = strip_trailing_slash(destpath);
  
        if (stat(destpath,&dir_info) == -1) {
!          sprintf(tmpbuf,"Unable to get status of %s ",destpath);
!          _statusline(tmpbuf);
!          sleep(AlertSecs);
!          return 0;
        } else if ((dir_info.st_mode & S_IFMT) != S_IFDIR) {
!          _statusline(
!               "The selected item is not a directory! Request ignored. ");
!          sleep(AlertSecs);
!          return 0;
        } else if (0 /*directory not writeable*/) {
!          _statusline("Install in the selected directory not permitted.");
!          sleep(AlertSecs);
!          return 0;
        }
  
     statusline("Just a moment, ...");
--- 1824,1842 ----
        destpath = strip_trailing_slash(destpath);
  
        if (stat(destpath,&dir_info) == -1) {
!        sprintf(tmpbuf,"Unable to get status of %s ",destpath);
!        _statusline(tmpbuf);
!        sleep(AlertSecs);
!        return 0;
        } else if ((dir_info.st_mode & S_IFMT) != S_IFDIR) {
!        _statusline(
!               "The selected item is not a directory! Request ignored. ");
!        sleep(AlertSecs);
!        return 0;
        } else if (0 /*directory not writeable*/) {
!        _statusline("Install in the selected directory not permitted.");
!        sleep(AlertSecs);
!        return 0;
        }
  
     statusline("Just a moment, ...");
***************
*** 1677,1686 ****
         if (strncmp("file://localhost", args[1], 16) == 0)
            args[1] = tag->name + 16;
        } else
!          args[1] = savepath;
  
        if (my_spawn(INSTALL_PATH, args, tmpbuf) <= 0)
!          return count;
        count++;
        if (!tagged)
         break;
--- 1851,1860 ----
         if (strncmp("file://localhost", args[1], 16) == 0)
            args[1] = tag->name + 16;
        } else
!        args[1] = savepath;
  
        if (my_spawn(INSTALL_PATH, args, tmpbuf) <= 0)
!        return count;
        count++;
        if (!tagged)
         break;
***************
*** 1708,1714 ****
  }
  
  PUBLIC void add_menu_item ARGS1(
!       char *,         str)
  {
      struct dired_menu *new, *mp;
      char *cp;
--- 1882,1888 ----
  }
  
  PUBLIC void add_menu_item ARGS1(
!       char *,         str)
  {
      struct dired_menu *new, *mp;
      char *cp;
***************
*** 1759,1768 ****
  }
  
  PRIVATE char * render_item ARGS4(
!       char *,         s,
!       char *,         path,
!       char *,         dir,
!       char *,         buf)
  {
        char *cp;
        char *bp;
--- 1933,1942 ----
  }
  
  PRIVATE char * render_item ARGS4(
!       char *,         s,
!       char *,         path,
!       char *,         dir,
!       char *,         buf)
  {
        char *cp;
        char *bp;
***************
*** 1790,1796 ****
                case 'f':
                    cp = strrchr(path, '/');
                    if (cp)
!                       cp++;
                    else
                        cp = path;
                    while (*cp)
--- 1964,1970 ----
                case 'f':
                    cp = strrchr(path, '/');
                    if (cp)
!                       cp++;
                    else
                        cp = path;
                    while (*cp)



;
; 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]