From 4cbfe26da4c90969dd36c224b79d77a1d69ddce5 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 16 Jun 2013 22:43:09 +0200 Subject: [PATCH] abaco: allow single quotes for ctype attribute (thanks plhk) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plhk9 → abaco: charset 'utf-8'> not supported plhk9 → http://plhk.ru/trash/abaco-singlequote.diff makes it go away --- sys/src/cmd/abaco/util.c | 12 ++++++++---- 1 file 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;