summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-04-12 15:09:45 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-04-26 15:12:57 +0200
commitf0d993da8a086aaac201ec3c5e246446e9b40987 (patch)
tree2eb84f85d29b97709b890d664bf34f3a64676c8f /source
parent6c6964373ee61805577a7f5374f658dc64098c70 (diff)
downloadmupdf-f0d993da8a086aaac201ec3c5e246446e9b40987.tar.xz
Rename fz_write_int32be to fz_write_int32_be to be consistent with fz_read_int32_be.
Diffstat (limited to 'source')
-rw-r--r--source/fitz/output-pwg.c92
-rw-r--r--source/fitz/pixmap.c4
-rw-r--r--source/gprf/gprf-skeleton.c10
3 files changed, 53 insertions, 53 deletions
diff --git a/source/fitz/output-pwg.c b/source/fitz/output-pwg.c
index 982f8bec..9302009e 100644
--- a/source/fitz/output-pwg.c
+++ b/source/fitz/output-pwg.c
@@ -21,66 +21,66 @@ fz_write_pwg_page_header(fz_context *ctx, fz_output *out, const fz_pwg_options *
fz_write(ctx, out, pwg ? pwg->media_color : zero, 64);
fz_write(ctx, out, pwg ? pwg->media_type : zero, 64);
fz_write(ctx, out, pwg ? pwg->output_type : zero, 64);
- fz_write_int32be(ctx, out, pwg ? pwg->advance_distance : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->advance_media : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->collate : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->cut_media : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->duplex : 0);
- fz_write_int32be(ctx, out, xres);
- fz_write_int32be(ctx, out, yres);
+ fz_write_int32_be(ctx, out, pwg ? pwg->advance_distance : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->advance_media : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->collate : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->cut_media : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->duplex : 0);
+ fz_write_int32_be(ctx, out, xres);
+ fz_write_int32_be(ctx, out, yres);
/* CUPS format says that 284->300 are supposed to be the bbox of the
* page in points. PWG says 'Reserved'. */
for (i=284; i < 300; i += 4)
fz_write(ctx, out, zero, 4);
- fz_write_int32be(ctx, out, pwg ? pwg->insert_sheet : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->jog : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->leading_edge : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->insert_sheet : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->jog : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->leading_edge : 0);
/* CUPS format says that 312->320 are supposed to be the margins of
* the lower left hand edge of page in points. PWG says 'Reserved'. */
for (i=312; i < 320; i += 4)
fz_write(ctx, out, zero, 4);
- fz_write_int32be(ctx, out, pwg ? pwg->manual_feed : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->media_position : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->media_weight : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->mirror_print : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->negative_print : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->num_copies : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->orientation : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->output_face_up : 0);
- fz_write_int32be(ctx, out, w * 72/ xres); /* Page size in points */
- fz_write_int32be(ctx, out, h * 72/ yres);
- fz_write_int32be(ctx, out, pwg ? pwg->separations : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->tray_switch : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->tumble : 0);
- fz_write_int32be(ctx, out, w); /* Page image in pixels */
- fz_write_int32be(ctx, out, h);
- fz_write_int32be(ctx, out, pwg ? pwg->media_type_num : 0);
- fz_write_int32be(ctx, out, bpp < 8 ? 1 : 8); /* Bits per color */
- fz_write_int32be(ctx, out, bpp); /* Bits per pixel */
- fz_write_int32be(ctx, out, (w * bpp + 7)/8); /* Bytes per line */
- fz_write_int32be(ctx, out, 0); /* Chunky pixels */
+ fz_write_int32_be(ctx, out, pwg ? pwg->manual_feed : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->media_position : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->media_weight : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->mirror_print : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->negative_print : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->num_copies : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->orientation : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->output_face_up : 0);
+ fz_write_int32_be(ctx, out, w * 72/ xres); /* Page size in points */
+ fz_write_int32_be(ctx, out, h * 72/ yres);
+ fz_write_int32_be(ctx, out, pwg ? pwg->separations : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->tray_switch : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->tumble : 0);
+ fz_write_int32_be(ctx, out, w); /* Page image in pixels */
+ fz_write_int32_be(ctx, out, h);
+ fz_write_int32_be(ctx, out, pwg ? pwg->media_type_num : 0);
+ fz_write_int32_be(ctx, out, bpp < 8 ? 1 : 8); /* Bits per color */
+ fz_write_int32_be(ctx, out, bpp); /* Bits per pixel */
+ fz_write_int32_be(ctx, out, (w * bpp + 7)/8); /* Bytes per line */
+ fz_write_int32_be(ctx, out, 0); /* Chunky pixels */
switch (bpp)
{
- case 1: fz_write_int32be(ctx, out, 3); /* Black */ break;
- case 8: fz_write_int32be(ctx, out, 18); /* Sgray */ break;
- case 24: fz_write_int32be(ctx, out, 19); /* Srgb */ break;
- case 32: fz_write_int32be(ctx, out, 6); /* Cmyk */ break;
+ case 1: fz_write_int32_be(ctx, out, 3); /* Black */ break;
+ case 8: fz_write_int32_be(ctx, out, 18); /* Sgray */ break;
+ case 24: fz_write_int32_be(ctx, out, 19); /* Srgb */ break;
+ case 32: fz_write_int32_be(ctx, out, 6); /* Cmyk */ break;
default: fz_throw(ctx, FZ_ERROR_GENERIC, "pixmap bpp must be 1, 8, 24 or 32 to write as pwg");
}
- fz_write_int32be(ctx, out, pwg ? pwg->compression : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->row_count : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->row_feed : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->row_step : 0);
- fz_write_int32be(ctx, out, bpp <= 8 ? 1 : 3); /* Num Colors */
+ fz_write_int32_be(ctx, out, pwg ? pwg->compression : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->row_count : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->row_feed : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->row_step : 0);
+ fz_write_int32_be(ctx, out, bpp <= 8 ? 1 : 3); /* Num Colors */
for (i=424; i < 452; i += 4)
fz_write(ctx, out, zero, 4);
- fz_write_int32be(ctx, out, 1); /* TotalPageCount */
- fz_write_int32be(ctx, out, 1); /* CrossFeedTransform */
- fz_write_int32be(ctx, out, 1); /* FeedTransform */
- fz_write_int32be(ctx, out, 0); /* ImageBoxLeft */
- fz_write_int32be(ctx, out, 0); /* ImageBoxTop */
- fz_write_int32be(ctx, out, w); /* ImageBoxRight */
- fz_write_int32be(ctx, out, h); /* ImageBoxBottom */
+ fz_write_int32_be(ctx, out, 1); /* TotalPageCount */
+ fz_write_int32_be(ctx, out, 1); /* CrossFeedTransform */
+ fz_write_int32_be(ctx, out, 1); /* FeedTransform */
+ fz_write_int32_be(ctx, out, 0); /* ImageBoxLeft */
+ fz_write_int32_be(ctx, out, 0); /* ImageBoxTop */
+ fz_write_int32_be(ctx, out, w); /* ImageBoxRight */
+ fz_write_int32_be(ctx, out, h); /* ImageBoxBottom */
for (i=480; i < 1668; i += 4)
fz_write(ctx, out, zero, 4);
fz_write(ctx, out, pwg ? pwg->rendering_intent : zero, 64);
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
index 6897fe35..88e16d9d 100644
--- a/source/fitz/pixmap.c
+++ b/source/fitz/pixmap.c
@@ -859,13 +859,13 @@ static inline void big32(unsigned char *buf, unsigned int v)
static void putchunk(fz_context *ctx, fz_output *out, char *tag, unsigned char *data, int size)
{
unsigned int sum;
- fz_write_int32be(ctx, out, size);
+ fz_write_int32_be(ctx, out, size);
fz_write(ctx, out, tag, 4);
fz_write(ctx, out, data, size);
sum = crc32(0, NULL, 0);
sum = crc32(sum, (unsigned char*)tag, 4);
sum = crc32(sum, data, size);
- fz_write_int32be(ctx, out, sum);
+ fz_write_int32_be(ctx, out, sum);
}
void
diff --git a/source/gprf/gprf-skeleton.c b/source/gprf/gprf-skeleton.c
index ad0cb6a8..25ee00d9 100644
--- a/source/gprf/gprf-skeleton.c
+++ b/source/gprf/gprf-skeleton.c
@@ -19,17 +19,17 @@ fz_save_gproof(fz_context *ctx, const char *pdf_file, fz_document *doc, const ch
fz_try(ctx)
{
/* File Signature: GPRO */
- fz_write_int32le(ctx, out, 0x4f525047);
+ fz_write_int32_le(ctx, out, 0x4f525047);
/* Version = 1 */
fz_write_byte(ctx, out, 1);
fz_write_byte(ctx, out, 0);
/* Resolution */
- fz_write_int32le(ctx, out, res);
+ fz_write_int32_le(ctx, out, res);
/* Num Pages */
- fz_write_int32le(ctx, out, num_pages);
+ fz_write_int32_le(ctx, out, num_pages);
for (i = 0; i < num_pages; i++)
{
@@ -43,8 +43,8 @@ fz_save_gproof(fz_context *ctx, const char *pdf_file, fz_document *doc, const ch
w = (int)((rect.x1 - rect.x0) * res / 72.0 + 0.5);
h = (int)((rect.y1 - rect.y0) * res / 72.0 + 0.5);
- fz_write_int32le(ctx, out, w);
- fz_write_int32le(ctx, out, h);
+ fz_write_int32_le(ctx, out, w);
+ fz_write_int32_le(ctx, out, h);
}
/* Filenames */