@thomasorus this function is pure vanity I’m not event sorry
@thomasorus Sure, you could fopen() and fread() the svg into a buffer and use it where you need it.
What you have there doesn't make sense though -- keep in mind that #defines are literally just a text search-and-replace that occurs before the compiler even runs. You would just be replacing occurences of the text "LOGO" in your C source with that fopen() call.
@stevenf Ok thanks, I thought that was stretching things a little too much. I'll find another way!
@thomasorus Unfortunately, you can't do that exactly but, you might be able to move your templates over into separate include files or as separate C files (containing the string as global variables).
@leimon Having them into another file as global variables could be a good solution yes! Thanks for suggesting it, do you have any demo of this somewhere?
@thomasorus @leimon literally just split them out to a .h (header) or .inl (inline) file and #include that file where the variables are needed.
@thomasorus Umm, if you'd like I could whip up a little example for you later after my kiddos are in bed.
@thomasorus This is a bit of a crappy example but, here I've essentially embeded a sample "template" string within a second C source file and then just make the other source file aware of it by using an extern. Hopefully this will give you some inspiration.
FYI: This pastebin site only keeps things up for about 24 hours. So hopefully this reaches you in time.
@thomasorus hmm. why preprocessor directives? could you not just define the svgs as strings in header files and include them? just off the top of my head...
@thomasorus that’s what I do