diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-04 23:35:45 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-04 23:35:45 +0200 |
commit | 7cf6ccee8c6b59d8aac17ab6e4673bcb69f5e8d2 (patch) | |
tree | b329db03bae14fca178add9909b78b050345c140 /xps/xps_zip.c | |
parent | efc46353676c27b24f2933dce78305796951a01e (diff) | |
download | mupdf-7cf6ccee8c6b59d8aac17ab6e4673bcb69f5e8d2.tar.xz |
Le Roi est mort, vive le Roi!
The run-together words are dead! Long live the underscores!
The postscript inspired naming convention of using all run-together
words has served us well, but it is now time for more readable code.
In this commit I have also added the sed script, rename.sed, that I used
to convert the source. Use it on your patches and application code.
Diffstat (limited to 'xps/xps_zip.c')
-rw-r--r-- | xps/xps_zip.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xps/xps_zip.c b/xps/xps_zip.c index abb78832..e1019ae0 100644 --- a/xps/xps_zip.c +++ b/xps/xps_zip.c @@ -221,19 +221,19 @@ xps_read_zip_dir(xps_context *ctx, int start_offset) static int xps_find_and_read_zip_dir(xps_context *ctx) { - int filesize, back, maxback; + int file_size, back, maxback; int i, n; char buf[512]; fseek(ctx->file, 0, SEEK_END); - filesize = ftell(ctx->file); + file_size = ftell(ctx->file); - maxback = MIN(filesize, 0xFFFF + sizeof buf); + maxback = MIN(file_size, 0xFFFF + sizeof buf); back = MIN(maxback, sizeof buf); while (back < maxback) { - fseek(ctx->file, filesize - back, 0); + fseek(ctx->file, file_size - back, 0); n = fread(buf, 1, sizeof buf, ctx->file); if (n < 0) @@ -241,7 +241,7 @@ xps_find_and_read_zip_dir(xps_context *ctx) for (i = n - 4; i > 0; i--) if (!memcmp(buf + i, "PK\5\6", 4)) - return xps_read_zip_dir(ctx, filesize - back + i); + return xps_read_zip_dir(ctx, file_size - back + i); back += sizeof buf - 4; } @@ -448,12 +448,12 @@ static void xps_free_key_func(void *ptr) static void xps_free_font_func(void *ptr) { - fz_dropfont(ptr); + fz_drop_font(ptr); } static void xps_free_colorspace_func(void *ptr) { - fz_dropcolorspace(ptr); + fz_drop_colorspace(ptr); } int |