diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -6,6 +6,7 @@ #include <inttypes.h> #include <limits.h> #include <pwd.h> +#include <stdarg.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -124,6 +125,18 @@ static inline void +warning(struct libfonts_context *ctx, int err, const char *function, const char *fmt, ...) +{ + va_list args; + if (ctx && ctx->warning) { + va_start(args, fmt); + ctx->warning(err, function, fmt, args, ctx->user); + va_end(args); + } +} + + +static inline void transform(double *x_out, double *y_out, double x, double y, const struct libfonts_transformation *transformation) { double a = transformation->m[0][0], b = transformation->m[0][1], c = transformation->m[0][2]; |