weigert / c-embed Goto Github PK
View Code? Open in Web Editor NEWNaturally embed read-only filesystems into C99-C++20 w. a single header, zero dependencies and zero modifications to your code
Naturally embed read-only filesystems into C99-C++20 w. a single header, zero dependencies and zero modifications to your code
The Cygwin executable also runs when launched from a Windows terminal (and copying the required Cygwin DLLs into the directory).
Regards,
GW
Also, I think it should scan for '\n' instead of '\r'.
Regards,
GW
First, nice collection of repos :)
Here a simple message for giving an idea (with care, I may be wrong and probably not portable idea) but clib functions such as fopen, printf, read, write are weak functions, therefore you can define a function with their name to change their behavior without having to deal by "namespacing" them (fopen => eopen).
I used it on Linux for unit test for example: https://github.com/Lecrapouille/BacASable/tree/master/Cpp/UnitTests with some risk for example, like in my case not restoring the original function and calling code coverage tools that keep using the mocked function and ending by segfault.
I am getting the following error when compiling '0_fgets' on Linux:
gcc main.c c-embed.o -include ../../c-embed.h -DCEMBED_TRANSLATE -o main
In file included from :
./../../c-embed.h:177:6: error: conflicting types for ‘rewind’
177 | void rewind(EFILE* e){
| ^~~~~~
In file included from ./../../c-embed.h:14,
from :
/usr/include/stdio.h:694:13: note: previous declaration of ‘rewind’ was here
694 | extern void rewind (FILE *__stream);
| ^~~~~~
make: *** [makefile:19: build] Error 1
Looking at c-embed.h I guess 'rewind' should be renamed to 'erewind'?
Regards,
GW
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.