aboutsummaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-17 14:47:14 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-17 14:47:14 -0500
commit5d2d54ae0ebad9b7e2314735ba89b8e09b4ab147 (patch)
tree4cebfd72fd0d04d16c761663c999a2a6333319ad /compile.c
parent605eb45626a0076b748a23f77a1899fc0e5b631a (diff)
Tweak cord formatting
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index e23c894c..3cdd39d2 100644
--- a/compile.c
+++ b/compile.c
@@ -318,7 +318,7 @@ CORD compile(env_t *env, ast_t *ast)
CORD_appendf(&cord_func, "\treturn use_color ? \"\\x1b[0;1m%s\\x1b[m(\\x1b[2m...\\x1b[m)\" : \"%s(...)\";\n}",
def->name, def->name);
} else {
- CORD_appendf(&cord_func, "\treturn CORD_asprintf(use_color ? \"\\x1b[0;1m%s\\x1b[m(", def->name);
+ CORD_appendf(&cord_func, "\treturn StrF(use_color ? \"\\x1b[0;1m%s\\x1b[m(", def->name);
for (arg_ast_t *field = def->fields; field; field = field->next) {
CORD_appendf(&cord_func, "%s=\\x1b[35m%%r\\x1b[m", field->name);
if (field->next) cord_func = CORD_cat(cord_func, ", ");
@@ -379,7 +379,7 @@ CORD compile(env_t *env, ast_t *ast)
for (ast_list_t *target = assign->targets; target; target = target->next)
CORD_appendf(&code, "%r = $%ld;\n", compile(env, target->ast), i++);
- CORD expr_cord = "CORD_asprintf(\"";
+ CORD expr_cord = "StrF(\"";
for (ast_list_t *target = assign->targets; target; target = target->next)
expr_cord = CORD_cat(expr_cord, target->next ? "%r, " : "%r");
expr_cord = CORD_cat(expr_cord, "\"");