Open DimitriPapadopoulos opened 1 year ago
I would be great to rely on a recent version of EDFlib. Not sure how to extract the patches that need to be re-applied onto a new version.
I agree. In the optimal scenario, we rewrite the code base such that the original C code remains untouched and all additions/changes are in external files.
Unfortunately, I do not have the resources to this right now :-/ it's probably a bit of work but less than expected. I updated the C library once.
So, if I understand you correctly, the C files contain more additions than actual changes. Maybe I'll give it a try.
Yes! I think there are very little actual changes in the .c . I think some error messages have been added to the header files.
Best would be to compare the C library version with a diffchecker with the corresponding version of the original. Then you'll see what has actually been changed and what not :)
It's even less than I thought: https://www.diffchecker.com/iE3iuUXR/ . Some changes might even be consistent with newer edflib
versions, as I've added some 1.21 changes to the code base without integrating the entire file.
Seeing that it's not actually much, we might just be able to replace the C file as is and apply patches with external files. However, I'm not confident enough in C to know how best to do this. I think there are more changes in the header file, but it's a small file.
Modifying the functionality of a C function does require to modify its source code. Perhaps I can write an additional C function that runs extra code before/after calling the original EDFlib function. However, the existing and new functionality might be inextricably interlinked, enough to prevent splitting it into two functions.
While building on Ubuntu 22.04: