Minor cleanup
This commit is contained in:
parent
58a0b6c6e1
commit
60f3e91b80
@ -54,7 +54,6 @@ int main(int argc, char *argv[])
|
||||
CORD_appendf(&env->main, "%r\n", code);
|
||||
}
|
||||
|
||||
#define CORD_all(...) CORD_catn(sizeof((CORD[]){__VA_ARGS__})/sizeof(CORD), __VA_ARGS__)
|
||||
CORD fileinfo = CORD_asprintf("#line 0 \"%s\"\n", f->filename);
|
||||
CORD program = CORD_all(
|
||||
fileinfo,
|
||||
|
1
util.h
1
util.h
@ -27,6 +27,7 @@ char *heap_str(const char *str);
|
||||
char *heap_strf(const char *fmt, ...);
|
||||
CORD CORD_asprintf(CORD fmt, ...);
|
||||
#define CORD_appendf(cord, fmt, ...) CORD_sprintf(cord, "%r" fmt, *(cord) __VA_OPT__(,) __VA_ARGS__)
|
||||
#define CORD_all(...) CORD_catn(sizeof((CORD[]){__VA_ARGS__})/sizeof(CORD), __VA_ARGS__)
|
||||
|
||||
#define asprintfa(...) ({ char *_buf = alloca(snprintf(0, 0, __VA_ARGS__)); sprintf(_buf, __VA_ARGS__); _buf; })
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user