diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-27 16:35:18 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-11-27 16:35:18 +0000 |
commit | 09c3eb83b98fba7d8f2c5efbbacdd1c8a66a4dfa (patch) | |
tree | fa1245d02f4603ae57093c0f408b246d48cf7701 /local.c | |
parent | [w3m-dev 03494] Number of line is few when pager mode. (diff) | |
download | w3m-09c3eb83b98fba7d8f2c5efbbacdd1c8a66a4dfa.tar.gz w3m-09c3eb83b98fba7d8f2c5efbbacdd1c8a66a4dfa.zip |
[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>
Diffstat (limited to '')
-rw-r--r-- | local.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 <string.h> #include <stdio.h> @@ -14,6 +14,7 @@ #include <limits.h> /* _MAX_PATH ? */ #endif /* __EMX__ */ #include "local.h" +#include "hash.h" #define CGIFN_NORMAL 0 #define CGIFN_DROOT 1 @@ -214,7 +215,12 @@ set_environ(char *var, char *value) setenv(var, value, 1); #else /* not HAVE_SETENV */ #ifdef HAVE_PUTENV + static Hash_sv *env_hash = 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); #else /* not HAVE_PUTENV */ extern char **environ; |