Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,33 @@
file f;
data b;
list l;
record r;
f.stdin;
o_text("Enter the blank line terminated story:\n");
while (0 < f.b_line(b)) {
l.append(b);
}
for (, b in l) {
integer p, q;
text s, t;
while ((p = b.place('<')) ^ -1) {
q = b.probe(p, '>');
if (q ^ -1) {
s = bq_string(b, p + 1, q - 1);
b.erase(p, q);
if (!r.key(s)) {
o_("Replacement for `", s, "':\n");
f.line(t);
r.put(s, t);
}
b.paste(p, r[s]);
}
}
}
l.ucall(o_, 0, "\n");