[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV lynx-386 filename problem
From: |
Doug Kaufman |
Subject: |
Re: LYNX-DEV lynx-386 filename problem |
Date: |
Thu, 18 Sep 1997 00:00:54 -0700 (PDT) |
On Wed, 17 Sep 1997, Doug Kaufman wrote:
> I was able to test this last night. This fix doesn't work. The forward
> slash is hardcoded in LYMain.c. I'll try to make a patch for this and
> recompile. If I can make a patch that works, I will post it to the
> list.
In fixing this mixed forward/backslash problem, I found out that I
missed a number of "chmod 600" lines in LYPrint.c that affect printing
on the DOS platform. Attached is the combined patch of LYPrint.c and
LYMain.c that seems to fix the problem. This is a patch against
ac-0.58. I will make an executable available privately to Gary.
Doug
__
Doug Kaufman
Internet: address@hidden (preferred)
address@hidden
*** lynx2-7-1/src/LYMain.c Sat Aug 30 11:08:14 1997
--- lynx2-7-1/src/LYMain.c.new Wed Sep 17 23:10:14 1997
***************
*** 645,650 ****
--- 645,653 ----
StrAllocCat(lynx_version_putenv_command, LYNX_VERSION);
putenv(lynx_version_putenv_command);
#endif /* VMS */
+ if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL)
+ StrAllocCopy(lynx_temp_space, cp);
+ else
#ifdef DOSPATH
if ((cp = getenv("TEMP")) != NULL)
StrAllocCopy(lynx_temp_space, cp);
***************
*** 652,660 ****
StrAllocCopy(lynx_temp_space, cp);
else
#endif
- if ((cp = getenv("LYNX_TEMP_SPACE")) != NULL)
- StrAllocCopy(lynx_temp_space, cp);
- else
StrAllocCopy(lynx_temp_space, TEMP_SPACE);
if ((cp = strchr(lynx_temp_space, '~'))) {
*(cp++) = '\0';
--- 655,660 ----
***************
*** 707,717 ****
--- 707,725 ----
StrAllocCat(lynx_temp_space, ":");
}
#else
+ #ifndef __DJGPP__
{
if (((len = strlen(lynx_temp_space)) > 1) &&
lynx_temp_space[len-1] != '/') {
StrAllocCat(lynx_temp_space, "/");
}
+ #else
+ {
+ if (((len = strlen(lynx_temp_space)) > 1) &&
+ lynx_temp_space[len-1] != '\\') {
+ StrAllocCat(lynx_temp_space, "\\");
+ }
+ #endif /* __DJGPP__ */
}
#endif /* VMS */
#ifdef VMS
*** lynx2-7-1/src/LYPrint.c Sun Jul 27 17:36:16 1997
--- lynx2-7-1/src/LYPrint.c.new Wed Sep 17 22:47:12 1997
***************
*** 437,443 ****
--- 437,445 ----
FnameNum = FnameTotal;
goto retry;
}
+ #ifndef __DJGPP__
chmod(buffer, 0600);
+ #endif /* __DJGPP__ */
if (HTisDocumentSource()) {
/*
***************
*** 517,523 ****
--- 519,527 ----
HTAlert(UNABLE_TO_OPEN_TEMPFILE);
break;
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
/*
* Write the contents to a temp file.
***************
*** 804,810 ****
--- 808,816 ----
HTAlert(FILE_ALLOC_FAILED);
break;
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif /* __DJGPP__ */
if (HTisDocumentSource()) {
/*
***************
*** 1083,1089 ****
--- 1089,1097 ----
HTAlert(UNABLE_TO_OPEN_PRINTOP_FILE);
return(-1);
}
+ #ifndef __DJGPP__
chmod(tempfile, 0600);
+ #endif __DJGPP__
StrAllocCopy(*newfile, print_filename);
LYforce_no_cache = TRUE;
Re: LYNX-DEV lynx-386 filename problem, Doug Kaufman, 1997/09/21