Warning: session_start(): open(/var/lib/php/sessions/sess_unr40rss68dquld7bfrqb38u96, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sbool ctxExpandMacros_debug;
static S ctxExpandMacros(S s, SS macros) {
while true {
S s2 = ctxExpandMacros_step(s, macros);
if (eq(s, s2)) ret s;
s = s2;
}
}
static S ctxExpandMacros_step(S s, SS macros) {
Matcher m = regexp("#([^#]+)#", s);
while (m.find()) {
if (ctxExpandMacros_debug)
print("Replacing " + m.group(1));
S key = m.group(1);
S macro = macros.get(key);
if (macro == null) macro = "#{100}+";
s = s.replace(m.group(), unnull(macro));
}
ret s;
}