[w3m-dev 03495] local CGI can't work

* local.c: #include "hash.h"
	(set_environ): env string put in hash
From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
Fumitoshi UKAI
2002-11-27 16:35:18 +00:00
parent 3335de859a
commit 09c3eb83b9
2 changed files with 14 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2002-11-28 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03495] local CGI can't work
* local.c: #include "hash.h"
(set_environ): env string put in hash
2002-11-28 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp> 2002-11-28 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03494] Number of line is few when pager mode. * [w3m-dev 03494] Number of line is few when pager mode.
@@ -5220,4 +5226,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1 * release-0-2-1
* import w3m-0.2.1 * import w3m-0.2.1
$Id: ChangeLog,v 1.567 2002/11/27 16:32:51 ukai Exp $ $Id: ChangeLog,v 1.568 2002/11/27 16:35:18 ukai Exp $

View File

@@ -1,4 +1,4 @@
/* $Id: local.c,v 1.15 2002/11/26 18:03:26 ukai Exp $ */ /* $Id: local.c,v 1.16 2002/11/27 16:35:18 ukai Exp $ */
#include "fm.h" #include "fm.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
@@ -14,6 +14,7 @@
#include <limits.h> /* _MAX_PATH ? */ #include <limits.h> /* _MAX_PATH ? */
#endif /* __EMX__ */ #endif /* __EMX__ */
#include "local.h" #include "local.h"
#include "hash.h"
#define CGIFN_NORMAL 0 #define CGIFN_NORMAL 0
#define CGIFN_DROOT 1 #define CGIFN_DROOT 1
@@ -214,7 +215,12 @@ set_environ(char *var, char *value)
setenv(var, value, 1); setenv(var, value, 1);
#else /* not HAVE_SETENV */ #else /* not HAVE_SETENV */
#ifdef HAVE_PUTENV #ifdef HAVE_PUTENV
static Hash_sv *env_hash = NULL;
Str tmp = Strnew_m_charp(var, "=", value, NULL); Str tmp = Strnew_m_charp(var, "=", value, NULL);
if (env_hash == NULL)
env_hash = newHash_sv(20);
putHash_sv(env_hash, var, (void *)tmp->ptr);
putenv(tmp->ptr); putenv(tmp->ptr);
#else /* not HAVE_PUTENV */ #else /* not HAVE_PUTENV */
extern char **environ; extern char **environ;