[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Patch for dev.18
From: |
Doug Kaufman |
Subject: |
Re: lynx-dev Patch for dev.18 |
Date: |
Sun, 12 Jul 1998 15:01:57 -0700 (PDT) |
On Sun, 12 Jul 1998, T.E.Dickey wrote:
> actually (I found a different cause, testing with Purify while trying to
> see a problem with the VERBOSE_IMAGES) the malloc a couple of lines down
> should be a calloc.
Now that I got lynx2.8.1dev.18 to load, I see that you are quite
right. The patch that I submitted allowed lynx to run, but none of
the environment variables set in lynx.cfg were actually put in the
environment. I don't know much about calloc and malloc. I made the
following change in LYReadCFG.c, and now lynx seems to work properly.
Is this the change that you had in mind ?
Doug
*** lynx2-8-1/src/LYReadCFG.c Sat Jul 11 16:44:02 1998
--- lynx2-8-1/src/LYReadCFG.c.new Sun Jul 12 14:25:16 1998
***************
*** 1117,1123 ****
#else
char tmpbuf[MAX_LINE_BUFFER_LEN];
sprintf (tmpbuf, "%s=%s", tbl->name, value);
! q->str_value = (char **)malloc(sizeof(char **));
StrAllocCopy(*(q->str_value), tmpbuf);
putenv (*(q->str_value));
#endif
--- 1117,1123 ----
#else
char tmpbuf[MAX_LINE_BUFFER_LEN];
sprintf (tmpbuf, "%s=%s", tbl->name, value);
! q->str_value = (char **)calloc(1, sizeof(char **));
StrAllocCopy(*(q->str_value), tmpbuf);
putenv (*(q->str_value));
#endif
__
Doug Kaufman
Internet: address@hidden (preferred)
address@hidden