Commit a4c1a50d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a VCC_Return_Name() function to convert a return action to a string.



git-svn-id: http://www.varnish-cache.org/svn/trunk@3478 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d80a7eb6
......@@ -31,5 +31,5 @@
char *VCC_Compile(struct vsb *sb, const char *b, const char *e);
void VCC_InitCompile(const char *default_vcl);
const char *VCC_Return_Name(unsigned action);
......@@ -662,6 +662,23 @@ VCC_Compile(struct vsb *sb, const char *b, const char *e)
return (r);
}
/*--------------------------------------------------------------------*/
const char *
VCC_Return_Name(unsigned method)
{
switch (method) {
case 0: return ("<none>");
#define VCL_RET_MAC(l, u, b, i) case b: return(#u);
#define VCL_RET_MAC_E(l, u, b, i) case b: return(#u);
#include "vcl_returns.h"
#undef VCL_RET_MAC_E
#undef VCL_RET_MAC
}
return (NULL);
}
/*--------------------------------------------------------------------
* Initialize the compiler and register the default VCL code for later
* compilation runs.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment