single_cream
single_cream copied to clipboard
put the scheme code into the c file
You can turn all the stdlib scheme code into a C string with this:
cat src/init.scm src/preprocessor.scm src/std.scm | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$/"/' >> src/sch3.c
but then you have error: string length ‘15446’ is greater than the length ‘4095’ ISO C99 compilers are required to support [-Werror=overlength-strings] and need to ether use a slightly uncommon function fmemopen to read characters from it or do an object oriented layer for reading from a FILE* or a char* like in s - which adds code and complexity.
Can you mention what the goal is of doing this? I think I can guess, but probably better that I don't :)
Well i got the idea from the problem you had with running sch3 without loading the standard library. This way there would be no extra trouble reading in files from disk, it would just be loaded up already
Ah, I see. I'm not sure you need to optimize for my foolishness there :/ Your Readme said the right command clear as day.