#include "lib/fastbuf.h"
#include "lib/chartype.h"
#include "lib/lfs.h"
+#include "lib/stkstring.h"
#include <stdlib.h>
#include <string.h>
}
line++;
- // FIXME: this is utterly bogus, since printf() only expands these
- // percents, and the \n, \x1b codes are actually expanded by the compiler
- for (byte *c=copy_buf.ptr+start_copy; *c; c++)
- if (*c == '%') {
- if (c[1] != '%')
- return "Formating sequences are not allowed";
- else
- c++;
- }
- byte *tmp = cf_printf(copy_buf.ptr + start_copy);
+ byte *tmp = stk_str_unesc(copy_buf.ptr + start_copy);
uns l = strlen(tmp);
bb_grow(©_buf, start_copy + l + 1);
strcpy(copy_buf.ptr + start_copy, tmp);
\
17M
nrs2 3 3k 3 3 3 ; \
- str1 "hello, world%%\n"
+ str1 "hello,\t\x2bworld%%\n"
str2 'Hagenuk,
the best' "\
" qu'est-ce que c'est?