aboutsummaryrefslogtreecommitdiff
path: root/builtins/functions.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-18 16:31:34 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-18 16:31:34 -0400
commit1df26851d73e50407a3b7c79bcdb5b0cc053fe67 (patch)
treec2e3c393b30ab34d782fd6839100c6854abd7e91 /builtins/functions.c
parente439fcd1e2090ff797b46c80c6264f08ea9e9cfb (diff)
Add syntax for "inline C(...)"
Diffstat (limited to 'builtins/functions.c')
-rw-r--r--builtins/functions.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/builtins/functions.c b/builtins/functions.c
index eedcc9fb..b2808c5a 100644
--- a/builtins/functions.c
+++ b/builtins/functions.c
@@ -68,7 +68,7 @@ public void fail_source(const char *filename, int64_t start, int64_t end, CORD f
file_t *file = filename ? load_file(filename) : NULL;
if (filename && file) {
fputs("\n", stderr);
- fprint_span(stderr, file, file->text+start, file->text+end, "\x1b[31;1m", 2, USE_COLOR);
+ highlight_error(file, file->text+start, file->text+end, "\x1b[31;1m", 2, USE_COLOR);
}
raise(SIGABRT);
@@ -240,24 +240,4 @@ public bool pop_flag(char **argv, int *i, const char *flag, CORD *result)
}
}
-public void *xfopen(CORD path, CORD flags)
-{
- return fopen(CORD_to_const_char_star(path), CORD_to_const_char_star(flags));
-}
-
-public CORD xfread_all(void *fp)
-{
- return CORD_from_file_eager(fp);
-}
-
-public void xfputs(CORD text, void *fp)
-{
- CORD_put(text, fp);
-}
-
-public void xfclose(void *fp)
-{
- fclose(fp);
-}
-
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0