September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,65 @@
record r, s;
integer c;
file f;
list l;
text an, d, k;
an = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
f_affix(f, "tmp/config");
while ((c = f_peek(f)) ^ -1) {
integer removed;
f_side(f, " \t\r");
c = f_peek(f);
removed = c == ';';
if (removed) {
f_pick(f);
f_side(f, " \t\r");
c = f_peek(f);
}
c = index(an, c);
if (-1 < c && c < 52) {
f_near(f, an, k);
if (removed) {
r[k] = "false";
} else {
data b;
f_side(f, " \t\r");
if (f_peek(f) == '=') {
f_pick(f);
f_side(f, " \t\r");
}
f_ever(f, ",#\n", d);
b = d;
bb_drop(b, " \r\t");
d = b_string(b);
if (f_peek(f) != ',') {
r[k] = length(d) ? d : "true";
} else {
f_news(f, l, 0, 0, ",");
lf_push(l, d);
for (c, d in l) {
b = d;
bb_drop(b, " \r\t");
bf_drop(b, " \r\t");
l[c] = b_string(b);
}
r_put(s, k, l);
f_seek(f, -1, SEEK_CURRENT);
}
}
}
f_slip(f);
}
r_wcall(r, o_, 0, 2, ": ", "\n");
for (k, l in s) {
o_(k, ": ");
l_ucall(l, o_, 0, ", ");
o_("\n");
}