diff options
author | Mattias Andrée <maandree@kth.se> | 2023-01-08 17:13:25 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-01-08 17:13:25 +0100 |
commit | b5471b4ba742879de17f7ea777bb0dd62c14b81f (patch) | |
tree | 37d7abc4f84373ed92059ccd59f6e4a4df2f77ae /libfonts.h | |
parent | m (diff) | |
download | libfonts-b5471b4ba742879de17f7ea777bb0dd62c14b81f.tar.gz libfonts-b5471b4ba742879de17f7ea777bb0dd62c14b81f.tar.bz2 libfonts-b5471b4ba742879de17f7ea777bb0dd62c14b81f.tar.xz |
struct libfonts_context will be used to print warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libfonts.h')
-rw-r--r-- | libfonts.h | 39 |
1 files changed, 26 insertions, 13 deletions
@@ -7,6 +7,12 @@ /** + * The header file's version of `struct libfonts_context` + */ +#define LIBFONTS_CONTEXT_VERSION 0 + + +/** * Style-based default fonts */ enum libfonts_default_font { @@ -1573,10 +1579,24 @@ struct libfonts_font_description { /** * Structure that can be used to spoof the - * environment the library is executed in + * environment the library is executed in, + * as well as the print warnings from the + * library */ struct libfonts_context { /** + * Set to `LIBFONTS_CONTEXT_VERSION` + */ + int version; + + /** + * Non-zero to remove all environment + * variables that are not included in + * `.environ` + */ + int ignore_process_environ; + + /** * Environment variables to add or override * * `libfonts_used_environs` can be used to @@ -1586,23 +1606,16 @@ struct libfonts_context { char **environ; /** + * Whether `.uid` is used + */ + int use_context_uid; + + /** * The real user ID of the process * * Only used if `.use_context_uid` is non-zero */ uid_t uid; - - /** - * Non-zero to remove all environment - * variables that are not included in - * `.environ` - */ - int ignore_process_environ; - - /** - * Whether `.uid` is used - */ - int use_context_uid; }; |