[Fontconfig] [PATCH] Rework Reporting Of Config Parse Errors To Use Callback

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Mon Jul 8 23:55:40 UTC 2019


This patch reworks the FcConfigMessage routine in fcxml.c to pass all
messages through a callback action. The idea is that it becomes easy to
add alternate versions of the FcConfigParseAndLoadxxx routines that pass
a caller-specified callback for capturing the messages, rather than
sending them direct to stderr.

Initially I had the callback details stored as fields in the
_FcConfigParse structure. Then I discovered that messages could be
reported in situations where such a structure did not exist. So I put
them in a separate _MessageCallback structure. So this structure has to
be passed as a separate arg to every FcConfigMessage call.

Let me know what you think.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ldo_config_parse_20190709.patch
Type: text/x-patch
Size: 44450 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20190709/832aee8d/attachment-0001.bin>


More information about the Fontconfig mailing list