c = s = estrdup(list);
for(;;) {
-#if 0
+#if
char *tk = NULL, *tv = NULL;
if (key) {
if (!val) {
val = c;
}
+ if (!*c) {
+ --val;
+ st = ST_ADD;
+ }
}
break;
case ' ':
break;
- case '\0':
case ';':
+ goto add;
+ break;
+
+ case '\0':
st = ST_ADD;
break;
break;
case '\0':
- keylen = c - key;
- st = ST_ADD;
+ if (key) {
+ keylen = c - key;
+ st = ST_ADD;
+ }
break;
}
break;
add:
if (val) {
vallen = c - val - (*c?1:0);
+ while (val[vallen-1] == ' ') --vallen;
} else {
val = "";
vallen = 0;