Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We use libxlswriter in R, but we are not supposed to use
fprintf(stderr, ...)
because applications and IDEs that embed the R interpreter ignore this. Instead the interpreter has a functionREprintf(...)
which packages call for text that the IDE or embedding application has to print to the user terminal.So I would need some way to override the error-printing function, either at build time or at runtime. Here is a simple concept solution. This would allow me to compile libxlsxwriter with
And thereby I get the desired behavior. Alternatively you could create some sort of set-callback, but that would be more involved.
The drawback of this approach I suppose is that variadic macros require c99, which is not a problem for me, but I don't know how else I would do this.
Thanks for you thoughts!