[master] 1a14e5e I was initially going for vct_name...
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue Jun 27 12:24:06 CEST 2017
commit 1a14e5eef8283057095af3c1a68138e315688ca3
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue Jun 27 12:12:00 2017 +0200
I was initially going for vct_name...
Refs #2354
diff --git a/include/vct.h b/include/vct.h
index e1332d8..7659d99 100644
--- a/include/vct.h
+++ b/include/vct.h
@@ -41,7 +41,8 @@
#define VCT_XMLNAMESTART (1<<7)
#define VCT_XMLNAME (1<<8)
#define VCT_TCHAR (1<<9)
-#define VCT_NAME (1<<10)
+#define VCT_ID (1<<10)
+#define VCT_IDENT (VCT_ALPHA | VCT_DIGIT | VCT_ID)
#define VCT_VAR (1<<11)
#define VCT_VT (1<<12)
#define VCT_SPACE (VCT_LWS | VCT_VT)
@@ -69,8 +70,8 @@ vct_is(int x, uint16_t y)
#define vct_issep(x) vct_is(x, VCT_SEPARATOR)
#define vct_issepctl(x) vct_is(x, VCT_SEPARATOR | VCT_CTL)
#define vct_isident1(x) vct_isalpha(x)
-#define vct_isident(x) vct_is(x, VCT_ALPHA | VCT_DIGIT | VCT_NAME)
-#define vct_isvar(x) vct_is(x, VCT_ALPHA | VCT_DIGIT | VCT_NAME | VCT_VAR)
+#define vct_isident(x) vct_is(x, VCT_IDENT)
+#define vct_isvar(x) vct_is(x, VCT_IDENT | VCT_VAR)
#define vct_isxmlnamestart(x) vct_is(x, VCT_XMLNAMESTART)
#define vct_isxmlname(x) vct_is(x, VCT_XMLNAMESTART | VCT_XMLNAME)
#define vct_istchar(x) vct_is(x, VCT_ALPHA | VCT_DIGIT | VCT_TCHAR)
diff --git a/lib/libvarnish/vct.c b/lib/libvarnish/vct.c
index d8e1118..087a9ca 100644
--- a/lib/libvarnish/vct.c
+++ b/lib/libvarnish/vct.c
@@ -88,7 +88,7 @@ const uint16_t vct_typtab[256] = {
[0x2a] = VCT_TCHAR,
[0x2b] = VCT_TCHAR,
[0x2c] = VCT_SEPARATOR,
- [0x2d] = VCT_XMLNAME | VCT_TCHAR | VCT_NAME,
+ [0x2d] = VCT_XMLNAME | VCT_TCHAR | VCT_ID,
[0x2e] = VCT_XMLNAME | VCT_TCHAR | VCT_VAR,
[0x2f] = VCT_SEPARATOR,
[0x30] = VCT_DIGIT | VCT_HEX | VCT_XMLNAME,
@@ -138,7 +138,7 @@ const uint16_t vct_typtab[256] = {
[0x5c] = VCT_SEPARATOR,
[0x5d] = VCT_SEPARATOR,
[0x5e] = VCT_TCHAR,
- [0x5f] = VCT_XMLNAMESTART | VCT_TCHAR | VCT_NAME,
+ [0x5f] = VCT_XMLNAMESTART | VCT_TCHAR | VCT_ID,
[0x60] = VCT_TCHAR,
[0x61] = VCT_LOALPHA | VCT_HEX | VCT_XMLNAMESTART,
[0x62] = VCT_LOALPHA | VCT_HEX | VCT_XMLNAMESTART,
More information about the varnish-commit
mailing list