diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-03-13 15:11:32 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-03-13 15:11:32 +0000 |
commit | 7888b56b928707329a84a61eca8f8e75ef6a745a (patch) | |
tree | e4603f29da8e9175c45f5852020483bc0fe56378 /fitz/base_hash.c | |
parent | 7fa60e876f733f3bd90787145d9a7eb0eb91e9a2 (diff) | |
download | mupdf-7888b56b928707329a84a61eca8f8e75ef6a745a.tar.xz |
Make fz_print functions all take a FILE *.
Also tidy up the taking of fz_context *'s, and hide an unwanted indent
param.
Diffstat (limited to 'fitz/base_hash.c')
-rw-r--r-- | fitz/base_hash.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fitz/base_hash.c b/fitz/base_hash.c index bf56b9bc..4ba02f4d 100644 --- a/fitz/base_hash.c +++ b/fitz/base_hash.c @@ -268,22 +268,22 @@ fz_hash_remove(fz_context *ctx, fz_hash_table *table, void *key) } void -fz_print_hash(fz_context *ctx, fz_hash_table *table) +fz_print_hash(fz_context *ctx, FILE *out, fz_hash_table *table) { int i, k; - printf("cache load %d / %d\n", table->load, table->size); + fprintf(out, "cache load %d / %d\n", table->load, table->size); for (i = 0; i < table->size; i++) { if (!table->ents[i].val) - printf("table % 4d: empty\n", i); + fprintf(out, "table % 4d: empty\n", i); else { - printf("table % 4d: key=", i); + fprintf(out, "table % 4d: key=", i); for (k = 0; k < MAX_KEY_LEN; k++) - printf("%02x", ((char*)table->ents[i].key)[k]); - printf(" val=$%p\n", table->ents[i].val); + fprintf(out, "%02x", ((char*)table->ents[i].key)[k]); + fprintf(out, " val=$%p\n", table->ents[i].val); } } } |