diff options
Diffstat (limited to 'test/testutils/utils.c')
-rw-r--r-- | test/testutils/utils.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/testutils/utils.c b/test/testutils/utils.c new file mode 100644 index 0000000..739933f --- /dev/null +++ b/test/testutils/utils.c @@ -0,0 +1,34 @@ +/* + * This file is part of libdom test suite. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org> + */ + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +#include "utils.h" + +void *myrealloc(void *ptr, size_t len, void *pw) +{ + UNUSED(pw); + + return realloc(ptr, len); +} + +void mymsg(uint32_t severity, void *ctx, const char *msg, ...) +{ + va_list l; + + UNUSED(ctx); + + va_start(l, msg); + + fprintf(stderr, "%d: ", severity); + vfprintf(stderr, msg, l); + fprintf(stderr, "\n"); +} + + |