]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Modular policy implementation. See programmers guide for API details
authorhno <>
Fri, 9 Jun 2000 00:08:19 +0000 (00:08 +0000)
committerhno <>
Fri, 9 Jun 2000 00:08:19 +0000 (00:08 +0000)
src/repl_modules.sh [new file with mode: 0755]

diff --git a/src/repl_modules.sh b/src/repl_modules.sh
new file mode 100755 (executable)
index 0000000..5bf454b
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+echo "/* automatically generated `date` by
+echo   * $0 $*"
+echo " * do not edit"
+echo " */"
+echo "#include \"squid.h\""
+echo ""
+for module in "$@"; do
+   echo "REMOVALPOLICYCREATE createRemovalPolicy_${module};"
+done
+echo "RemovalPolicy * createRemovalPolicy(RemovalPolicySettings *settings)"
+echo "{"
+for module in "$@"; do
+   echo "      if (strcmp(settings->type, \"${module}\") == 0)"
+   echo "              return createRemovalPolicy_${module}(settings->args);"
+done
+   echo "      debug(20,1)(\"Unknown policy %s\n\", settings->type);"
+   echo "      return NULL;"
+echo "}"