Commit d9579da1 authored by Geoff Simmons's avatar Geoff Simmons

name the enum for hash algorithms

parent a03a76e4
......@@ -29,5 +29,5 @@ Makefile.in
/src/vcc_if.c
/src/vcc_if.h
/src/vmod_*rst
/src/parse_encoding.c
/src/parse_encoding.h
/src/parse_algorithm.c
/src/parse_algorithm.h
......@@ -12,15 +12,15 @@ libvmod_blobdigest_la_SOURCES = \
nodist_libvmod_blobdigest_la_SOURCES = \
vcc_if.c \
vcc_if.h \
parse_encoding.h \
parse_encoding.c
parse_algorithm.h \
parse_algorithm.c
parse_encoding.h: parse_encoding.c
parse_algorithm.h: parse_algorithm.c
parse_encoding.c: gen_enum_parse.pl
@PERL@ $(srcdir)/gen_enum_parse.pl parse_encoding.c parse_encoding.h
parse_algorithm.c: gen_enum_parse.pl
@PERL@ $(srcdir)/gen_enum_parse.pl parse_algorithm.c parse_algorithm.h
vmod_blobdigest.lo: vcc_if.c vcc_if.h parse_encoding.h
vmod_blobdigest.lo: vcc_if.c vcc_if.h parse_algorithm.h
vcc_if.c: vcc_if.h
......@@ -45,5 +45,5 @@ CLEANFILES = \
$(builddir)/vcc_if.h \
$(builddir)/vmod_blobdigest.rst \
$(builddir)/vmod_blobdigest.man.rst \
$(builddir)/parse_encoding.h \
$(builddir)/parse_encoding.c
$(builddir)/parse_algorithm.h \
$(builddir)/parse_algorithm.c
......@@ -130,12 +130,12 @@ _OUT($h_out, <<'EOF');
EOF
_OUT($h_out,
"enum encoding {\n\t_INVALID = 0,\n\t".
join(",\n\t", @vals).",\n\t__MAX_ENCODING\n};\n");
"enum algorithm {\n\t_INVALID = 0,\n\t".
join(",\n\t", @vals).",\n\t__MAX_ALGORITHM\n};\n");
_OUT($h_out, <<'EOF');
enum encoding parse_encoding (const char *);
enum algorithm parse_algorithm (const char *);
EOF
......@@ -149,10 +149,10 @@ _OUT($c_out, <<EOF);
EOF
_OUT($c_out, <<'EOF');
enum encoding
parse_encoding (const char *m) {
enum algorithm
parse_algorithm (const char *m) {
int p;
enum encoding r;
enum algorithm r;
EOF
......
......@@ -36,7 +36,7 @@
#include "vsha256.h"
#include "vcc_if.h"
#include "parse_encoding.h"
#include "parse_algorithm.h"
#define ERR(ctx, msg) \
errmsg((ctx), "vmod blobcode error: " msg)
......@@ -71,7 +71,7 @@ errmsg(VRT_CTX, const char *fmt, ...)
VCL_BLOB
vmod_hash(VRT_CTX, VCL_ENUM hashs, VCL_BLOB msg)
{
/* enum encoding hash = parse_encoding(hashs); */
/* enum algorithm hash = parse_algorithm(hashs); */
struct vmod_priv *b;
char *snap;
SHA256_CTX hashctx[1];
......
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