[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LYNX-DEV lynx.cfg bug in ac-0.28
From: |
Barry Rountree |
Subject: |
LYNX-DEV lynx.cfg bug in ac-0.28 |
Date: |
Wed, 4 Jun 1997 02:24:41 -0400 (EDT) |
Re: lynx2.7.1ac-0.28
When LYMain.c doesn't find lynx.cfg on the
command line or as an environment variable,
it then (erroneously?) looks for
{$HOME}/.lynxrc (or lynx.rc)
instead of
{$HOME}/lynx.cfg.
If .lynxrc is found, then lynx_cfg_file
is assigned "{$HOME}/.lynxrc" and the actual
lynx.cfg file is ignored.
This is not a problem for lynx2-7-1 or
fotemods as of June 3rd, as neither of them
attempt to find the lynx.cfg in $HOME.
The included patch seems to fix it, but as
this is my first contributed patch, I'd
prefer strict scrutiny.
Barry Rountree
*** ./src/LYMain.c.old Tue Jun 3 22:24:43 1997
--- ./src/LYMain.c Tue Jun 3 23:31:53 1997
***************
*** 456,473 ****
char *lynx_lss_file=NULL;
#endif
! PRIVATE char *make_homedir_lynxrc_filename ARGS1(char *, name)
{
char *home = NULL;
if (name == NULL)
! {
! #if defined(UNIX) && !defined(DJGPP)
! name = "/.lynxrc";
! #else
! name = "/lynx.rc";
! #endif
! }
#ifdef DOSPATH
StrAllocCopy(home, HTDOS_wwwName((char *)Home_Dir()));
--- 456,467 ----
char *lynx_lss_file=NULL;
#endif
! PRIVATE char *make_homedir_lynxcfg_filename ARGS1(char *, name)
{
char *home = NULL;
if (name == NULL)
! name = "/lynx.cfg";
#ifdef DOSPATH
StrAllocCopy(home, HTDOS_wwwName((char *)Home_Dir()));
***************
*** 480,485 ****
--- 474,480 ----
#endif /* DOSPATH */
StrAllocCat(home, name);
+
return home;
}
***************
*** 871,877 ****
/* If we still have no config file, check one in home directory */
if (NULL == lynx_cfg_file)
{
! temp = make_homedir_lynxrc_filename (NULL);
if (temp != NULL)
{
if (NULL != (fp = fopen (temp, "r")))
--- 866,872 ----
/* If we still have no config file, check one in home directory */
if (NULL == lynx_cfg_file)
{
! temp = make_homedir_lynxcfg_filename (NULL);
if (temp != NULL)
{
if (NULL != (fp = fopen (temp, "r")))
***************
*** 897,903 ****
/* I think this should only be performed if lynx_cfg_file starts with ~/ */
if ((lynx_cfg_file[0] == '~') && (lynx_cfg_file[1] == '/'))
{
! temp = make_homedir_lynxrc_filename (lynx_cfg_file + 2);
FREE(lynx_cfg_file);
lynx_cfg_file = temp;
temp = NULL;
--- 892,898 ----
/* I think this should only be performed if lynx_cfg_file starts with ~/ */
if ((lynx_cfg_file[0] == '~') && (lynx_cfg_file[1] == '/'))
{
! temp = make_homedir_lynxcfg_filename (lynx_cfg_file + 2);
FREE(lynx_cfg_file);
lynx_cfg_file = temp;
temp = NULL;
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;
- LYNX-DEV lynx.cfg bug in ac-0.28,
Barry Rountree <=