2015-01-01  Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* scripts/cfg_path.sh: Use temporary files instead of pipe.


2014-12-23  Juan Manuel Guerrero  <juan.guerrero@gmx.de>

	* src/LYMail.c: Use the same type for dj_is_bash than in its declaration
	in LYGlobalDefs.h.

	* src/LYMain.c [__DJGPP__]: Define shell variable that has been declared
	as extern in LYGlobalDefs.h.

	* src/LYUtils.c (HomeEnv) [__DJGPP__]: For __DJGPP__ do not call
	w32_get_shell_folder.  Also check for TMPDIR to get a valid temporary
	directory path.











diff -aprNU5 lynx2-8-8.orig/scripts/cfg_path.sh lynx2-8-8/scripts/cfg_path.sh
--- lynx2-8-8.orig/scripts/cfg_path.sh	2006-05-29 22:44:54 +0100
+++ lynx2-8-8/scripts/cfg_path.sh	2015-01-02 17:32:42 +0100
@@ -1,5 +1,5 @@
 #!/bin/sh
 # Use this script for substituting the configured path into lynx.cfg -
 # not all paths begin with a slash.
 SECOND=`echo "$2" | sed -e 's,^/,,'`
-sed -e "/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]*:file:/s,/PATH_TO/$1,/$SECOND,"
+sed -e "/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]*:file:/s,/PATH_TO/$1,/$SECOND," $3
diff -aprNU5 lynx2-8-8.orig/src/LYMail.c lynx2-8-8/src/LYMail.c
--- lynx2-8-8.orig/src/LYMail.c	2013-11-29 00:52:56 +0100
+++ lynx2-8-8/src/LYMail.c	2014-12-23 12:38:30 +0100
@@ -532,11 +532,11 @@ int LYSendMailFile(char *the_address,
 		       personal_mail_address);
     } else
 #endif
 #ifdef __DJGPP__
     if (LYGetEnv("SHELL")) {
-	extern int dj_is_bash;
+	extern BOOLEAN dj_is_bash;
 	extern char *shell;
 	const char *c_option;
 	const char *format = "%s %s %s -t %s -F %s";
 
 	if (dj_is_bash) {
diff -aprNU5 lynx2-8-8.orig/src/LYMain.c lynx2-8-8/src/LYMain.c
--- lynx2-8-8.orig/src/LYMain.c	2014-02-14 13:00:16 +0100
+++ lynx2-8-8/src/LYMain.c	2014-12-23 17:22:20 +0100
@@ -333,10 +333,11 @@ BOOLEAN LYforce_HTML_mode = FALSE;
 BOOLEAN LYfind_leaks = TRUE;
 
 #ifdef __DJGPP__
 BOOLEAN watt_debug = FALSE;	/* WATT-32 debugging */
 BOOLEAN dj_is_bash = FALSE;	/* Check for bash shell under DJGPP */
+char *shell = NULL;
 #endif /* __DJGPP__ */
 
 #ifdef WIN_EX
 BOOLEAN focus_window = FALSE;	/* 1998/10/05 (Mon) 17:18:42 */
 char windows_drive[4];		/* 1998/01/13 (Tue) 21:13:24 */
diff -aprNU5 lynx2-8-8.orig/src/LYUtils.c lynx2-8-8/src/LYUtils.c
--- lynx2-8-8.orig/src/LYUtils.c	2014-03-09 21:43:10 +0100
+++ lynx2-8-8/src/LYUtils.c	2014-12-23 17:22:34 +0100
@@ -5206,10 +5206,11 @@ static char *HomeEnv(void)
     if (result == 0) {
 	char *head;
 	char *leaf;
 	static char *temp = NULL;
 
+#ifndef __DJGPP__
 	result = w32_get_shell_folder("Personal");
 	if (result == 0) {
 	    /* Windows Vista/7 */
 	    if ((head = LYGetEnv("USERPROFILE")) != 0) {
 		HTSprintf0(&temp, "%s%sDocuments", head, FILE_SEPARATOR);
@@ -5219,19 +5220,25 @@ static char *HomeEnv(void)
 		    HTSprintf0(&temp, "%s%sMy Documents", head, FILE_SEPARATOR);
 		    result = CheckDir(temp);
 		}
 	    }
 	}
+#endif /* __DJGPP__ */
 	/* NT4 */
 	if (result == 0) {
 	    if ((head = LYGetEnv("HOMEDRIVE")) != 0) {
 		if ((leaf = LYGetEnv("HOMEPATH")) != 0) {
 		    HTSprintf0(&temp, "%s%s%s", head, FILE_SEPARATOR, leaf);
 		    result = CheckDir(temp);
 		}
 	    }
 	}
+#ifdef __DJGPP__
+	/* DJGPP specific */
+	if (result == 0)
+	    result = CheckDir(LYGetEnv("TMPDIR"));
+#endif /* __DJGPP__ */
 	/* General M$ */
 #ifdef USE_PROGRAM_DIR
 	if (result == 0)
 	    result = CheckDir(program_dir);
 #endif
