summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/lib/assigndefined.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ipfilter/lib/assigndefined.c')
-rw-r--r--contrib/ipfilter/lib/assigndefined.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/ipfilter/lib/assigndefined.c b/contrib/ipfilter/lib/assigndefined.c
new file mode 100644
index 0000000..34f8d9a
--- /dev/null
+++ b/contrib/ipfilter/lib/assigndefined.c
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 by Darren Reed.
+ *
+ * See the IPFILTER.LICENCE file for details on licencing.
+ *
+ * $Id: assigndefined.c,v 1.4.2.2 2012/07/22 08:04:24 darren_r Exp $
+ */
+
+#include "ipf.h"
+
+void assigndefined(env)
+ char *env;
+{
+ char *s, *t;
+
+ if (env == NULL)
+ return;
+
+ for (s = strtok(env, ";"); s != NULL; s = strtok(NULL, ";")) {
+ t = strchr(s, '=');
+ if (t == NULL)
+ continue;
+ *t++ = '\0';
+ set_variable(s, t);
+ *--t = '=';
+ }
+}
OpenPOWER on IntegriCloud