diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 17:29:51 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-09-21 17:29:51 +0200 |
commit | f783c31203be2dbd7a28c89557014f97a367bec9 (patch) | |
tree | 8faea8d21fa44b99226af34a13f33c6a0e1f7182 /fitz/base_context.c | |
parent | aa7668835afffd5a2a496a60ed6edb672f5af1a7 (diff) | |
download | mupdf-f783c31203be2dbd7a28c89557014f97a367bec9.tar.xz |
Add warning context.
Diffstat (limited to 'fitz/base_context.c')
-rw-r--r-- | fitz/base_context.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fitz/base_context.c b/fitz/base_context.c index bce0cba1..66811cf9 100644 --- a/fitz/base_context.c +++ b/fitz/base_context.c @@ -33,6 +33,7 @@ fz_new_context(void) ctx = malloc(sizeof(fz_context)); if (!ctx) return NULL; + memset(ctx, 0, sizeof *ctx); ctx->error = malloc(sizeof(fz_error_context)); if (!ctx->error) @@ -40,6 +41,12 @@ fz_new_context(void) ctx->error->top = -1; ctx->error->message[0] = 0; + ctx->warn = malloc(sizeof(fz_warn_context)); + if (!ctx->warn) + goto cleanup; + ctx->warn->message[0] = 0; + ctx->warn->count = 0; + /* New initialisation calls for context entries go here */ return ctx; |