mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[PR #273] [CLOSED] Use macro for printing to stderr #455
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#455
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jmcnamara/libxlsxwriter/pull/273
Author: @jeroen
Created: 2/16/2020
Status: ❌ Closed
Base:
master← Head:printerr📝 Commits (1)
055643dUse single macro for printing to stderr📊 Changes
3 files changed (+22 additions, -19 deletions)
View changed files
📝
include/xlsxwriter/common.h(+13 -10)📝
src/Makefile(+1 -1)📝
src/workbook.c(+8 -8)📄 Description
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!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.