summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-06-16 22:43:09 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-06-16 22:43:09 +0200
commit4cbfe26da4c90969dd36c224b79d77a1d69ddce5 (patch)
tree480047b549d95cfdd1717b98c736577a76db5116
parent3d581e8b72e70182c68bfcf0fef7ca0ccf371082 (diff)
downloadplan9front-4cbfe26da4c90969dd36c224b79d77a1d69ddce5.tar.xz
abaco: allow single quotes for ctype attribute (thanks plhk)
plhk9 → abaco: charset 'utf-8'> not supported plhk9 → http://plhk.ru/trash/abaco-singlequote.diff makes it go away
-rw-r--r--sys/src/cmd/abaco/util.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/src/cmd/abaco/util.c b/sys/src/cmd/abaco/util.c
index cd7e7b3da..2a704793e 100644
--- a/sys/src/cmd/abaco/util.c
+++ b/sys/src/cmd/abaco/util.c
@@ -866,7 +866,7 @@ static
int
findctype(char *b, int l, char *keyword, char *s)
{
- char *p, *e;
+ char *p, *e, c;
int i;
p = cistrstr(s, keyword);
@@ -882,14 +882,18 @@ findctype(char *b, int l, char *keyword, char *s)
p++;
if(!*p)
return -1;
- if(*p == '"'){
+ switch (c = *p){
+ case '"':
+ case '\'':
p++;
- e = strchr(p, '"');
+ e = strchr(p, c);
if(!e)
return -1;
- }else
+ break;
+ default:
for(e = p; *e < 127 && *e > ' ' ; e++)
;
+ }
i = e-p;
if(i < 1)
return -1;