ref: 4cbfe26da4c90969dd36c224b79d77a1d69ddce5
parent: 3d581e8b72e70182c68bfcf0fef7ca0ccf371082
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sun Jun 16 18:43:09 EDT 2013
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
--- a/sys/src/cmd/abaco/util.c
+++ b/sys/src/cmd/abaco/util.c
@@ -866,7 +866,7 @@
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 @@
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;
--
⑨