summaryrefslogtreecommitdiff
path: root/win32/contrib
diff options
context:
space:
mode:
authorTim Champagne <tchamp@users.sourceforge.net>2003-05-08 22:47:31 +0000
committerTim Champagne <tchamp@users.sourceforge.net>2003-05-08 22:47:31 +0000
commit4b55f2a805638a3d817a6df37c5540243887274a (patch)
tree307a07f6e87b3449e1ae2327ae3ca69138c17ce9 /win32/contrib
parentf17a74c5afc347424a21b688819e74bfb78648b3 (diff)
downloadxine-lib-4b55f2a805638a3d817a6df37c5540243887274a.tar.gz
xine-lib-4b55f2a805638a3d817a6df37c5540243887274a.tar.bz2
Forgot these files during my last commit
CVS patchset: 4802 CVS date: 2003/05/08 22:47:31
Diffstat (limited to 'win32/contrib')
-rwxr-xr-xwin32/contrib/setenv.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/win32/contrib/setenv.c b/win32/contrib/setenv.c
new file mode 100755
index 000000000..ffd85f872
--- /dev/null
+++ b/win32/contrib/setenv.c
@@ -0,0 +1,19 @@
+
+#include <xinesuppt.h>
+
+#include <stdlib.h>
+#include <string.h>
+
+/* This function will leak a small amount of memory */
+void setenv(const char *name, const char *val, int _xx)
+{
+ int len = strlen(name) + strlen(val) + 2;
+ char *env = malloc(len);
+
+ if (env != NULL) {
+ strcpy(env, name);
+ strcat(env, "=");
+ strcat(env, val);
+ putenv(env);
+ }
+}