ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvt.h
(Generate patch)

Comparing rxvt-unicode/src/rxvt.h (file contents):
Revision 1.198 by root, Thu Jan 12 00:35:39 2006 UTC vs.
Revision 1.199 by root, Thu Jan 12 01:30:53 2006 UTC

119 119
120// temporarily replace the process environment 120// temporarily replace the process environment
121extern char **environ; 121extern char **environ;
122extern char **rxvt_environ; // the original environ pointer 122extern char **rxvt_environ; // the original environ pointer
123 123
124struct temp_environ 124inline void set_environ (stringvec *envv)
125{ 125{
126 char **prev;
127
128 temp_environ (const stringvec *envv)
129 : prev(environ)
130 {
131 if (envv) 126 if (envv)
132 environ = (char **)envv->begin (); 127 environ = (char **)envv->begin ();
133 } 128}
134 129
135 temp_environ (char **env) 130inline void set_environ (char **envv)
136 : prev(environ) 131{
137 {
138 if (env) 132 if (envv)
139 environ = env; 133 environ = envv;
140 } 134}
141
142 ~temp_environ ()
143 {
144 environ = prev;
145 }
146};
147
148#define TEMP_ENV temp_environ temp_environ (envv)
149 135
150/* 136/*
151 ***************************************************************************** 137 *****************************************************************************
152 * STRUCTURES AND TYPEDEFS 138 * STRUCTURES AND TYPEDEFS
153 ***************************************************************************** 139 *****************************************************************************

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines