summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-10-12 11:44:35 +0100
committerRobin Watts <robin.watts@artifex.com>2016-10-12 12:37:49 +0100
commit798aaf5adcc326ff96823be918452f01a29e0449 (patch)
tree363e0488fcf03652e736fabd06fc56154bf63108 /source/fitz
parent80308eae9964e71b66a18f3de6ebcd2ebf0d306b (diff)
downloadmupdf-798aaf5adcc326ff96823be918452f01a29e0449.tar.xz
Change code from using bandheight to using band_height.
Keep to our naming conventions.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/bitmap.c4
-rw-r--r--source/fitz/halftone.c2
-rw-r--r--source/fitz/output-pcl.c14
-rw-r--r--source/fitz/output-png.c10
-rw-r--r--source/fitz/output-pnm.c8
-rw-r--r--source/fitz/output-ps.c10
6 files changed, 24 insertions, 24 deletions
diff --git a/source/fitz/bitmap.c b/source/fitz/bitmap.c
index 46cfa533..f26cf935 100644
--- a/source/fitz/bitmap.c
+++ b/source/fitz/bitmap.c
@@ -346,7 +346,7 @@ fz_write_bitmap_as_pkm(fz_context *ctx, fz_output *out, fz_bitmap *bitmap)
}
static void
-pbm_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int bandheight, const unsigned char *p)
+pbm_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int band_height, const unsigned char *p)
{
fz_output *out = writer->out;
int w = writer->w;
@@ -366,7 +366,7 @@ pbm_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_sta
}
static void
-pkm_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int bandheight, const unsigned char *p)
+pkm_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int band_height, const unsigned char *p)
{
fz_output *out = writer->out;
int w = writer->w;
diff --git a/source/fitz/halftone.c b/source/fitz/halftone.c
index 02353e76..0bc1dc98 100644
--- a/source/fitz/halftone.c
+++ b/source/fitz/halftone.c
@@ -509,7 +509,7 @@ static int gcd(int u, int v)
while (1);
}
-fz_bitmap *fz_new_bitmap_from_pixmap_band(fz_context *ctx, fz_pixmap *pix, fz_halftone *ht, int band_start, int bandheight)
+fz_bitmap *fz_new_bitmap_from_pixmap_band(fz_context *ctx, fz_pixmap *pix, fz_halftone *ht, int band_start, int band_height)
{
fz_bitmap *out = NULL;
unsigned char *ht_line = NULL;
diff --git a/source/fitz/output-pcl.c b/source/fitz/output-pcl.c
index 96e7c973..4485453a 100644
--- a/source/fitz/output-pcl.c
+++ b/source/fitz/output-pcl.c
@@ -771,7 +771,7 @@ color_pcl_write_header(fz_context *ctx, fz_band_writer *writer_)
}
static void
-color_pcl_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_start, int bandheight, const unsigned char *sp)
+color_pcl_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_start, int band_height, const unsigned char *sp)
{
color_pcl_band_writer *writer = (color_pcl_band_writer *)writer_;
fz_output *out = writer->super.out;
@@ -791,18 +791,18 @@ color_pcl_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int b
comp = writer->compbuf;
seed_valid = writer->seed_valid;
- if (band_start+bandheight >= h)
- bandheight = h - band_start;
+ if (band_start+band_height >= h)
+ band_height = h - band_start;
y = 0;
- while (y < bandheight)
+ while (y < band_height)
{
/* Skip over multiple blank lines */
int blanks;
do
{
blanks = 0;
- while (blanks < 32767 && y < bandheight)
+ while (blanks < 32767 && y < band_height)
{
if (!line_is_blank(curr, sp, w))
break;
@@ -826,7 +826,7 @@ color_pcl_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int b
}
while (blanks == 32767);
- if (y == bandheight)
+ if (y == band_height)
break;
/* So, at least 1 more line to copy, and it's in curr */
@@ -1132,7 +1132,7 @@ mono_pcl_write_header(fz_context *ctx, fz_band_writer *writer_)
}
static void
-mono_pcl_write_band(fz_context *ctx, fz_band_writer *writer_, int ss, int band_start, int bandheight, const unsigned char *data)
+mono_pcl_write_band(fz_context *ctx, fz_band_writer *writer_, int ss, int band_start, int band_height, const unsigned char *data)
{
mono_pcl_band_writer *writer = (mono_pcl_band_writer *)writer_;
fz_output *out = writer->super.out;
diff --git a/source/fitz/output-png.c b/source/fitz/output-png.c
index 620fa811..960e5292 100644
--- a/source/fitz/output-png.c
+++ b/source/fitz/output-png.c
@@ -125,7 +125,7 @@ png_write_header(fz_context *ctx, fz_band_writer *writer_)
}
static void
-png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_start, int bandheight, const unsigned char *sp)
+png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_start, int band_height, const unsigned char *sp)
{
png_band_writer *writer = (png_band_writer *)(void *)writer_;
fz_output *out = writer->super.out;
@@ -137,13 +137,13 @@ png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st
h = writer->super.h;
n = writer->super.n;
- finalband = (band_start+bandheight >= h);
+ finalband = (band_start+band_height >= h);
if (finalband)
- bandheight = h - band_start;
+ band_height = h - band_start;
if (writer->udata == NULL)
{
- writer->usize = (w * n + 1) * bandheight;
+ writer->usize = (w * n + 1) * band_height;
/* Sadly the bound returned by compressBound is just for a
* single usize chunk; if you compress a sequence of them
* the buffering can result in you suddenly getting a block
@@ -159,7 +159,7 @@ png_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st
dp = writer->udata;
stride -= w*n;
- for (y = 0; y < bandheight; y++)
+ for (y = 0; y < band_height; y++)
{
*dp++ = 1; /* sub prediction filter */
for (x = 0; x < w; x++)
diff --git a/source/fitz/output-pnm.c b/source/fitz/output-pnm.c
index b5796ab2..3a605524 100644
--- a/source/fitz/output-pnm.c
+++ b/source/fitz/output-pnm.c
@@ -25,7 +25,7 @@ pnm_write_header(fz_context *ctx, fz_band_writer *writer)
}
static void
-pnm_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int bandheight, const unsigned char *p)
+pnm_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int band_height, const unsigned char *p)
{
fz_output *out = writer->out;
int w = writer->w;
@@ -34,7 +34,7 @@ pnm_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_sta
int alpha = writer->alpha;
char buffer[2*3*4*5*6]; /* Buffer must be a multiple of 2 and 3 at least. */
int len;
- int end = band_start + bandheight;
+ int end = band_start + band_height;
if (n-alpha != 1 && n-alpha != 3)
fz_throw(ctx, FZ_ERROR_GENERIC, "pixmap must be grayscale or rgb to write as pnm");
@@ -179,14 +179,14 @@ pam_write_header(fz_context *ctx, fz_band_writer *writer)
}
static void
-pam_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int bandheight, const unsigned char *sp)
+pam_write_band(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int band_height, const unsigned char *sp)
{
fz_output *out = writer->out;
int w = writer->w;
int h = writer->h;
int n = writer->n;
int y;
- int end = band_start + bandheight;
+ int end = band_start + band_height;
if (end > h)
end = h;
diff --git a/source/fitz/output-ps.c b/source/fitz/output-ps.c
index 6e63110c..8b8d9bdb 100644
--- a/source/fitz/output-ps.c
+++ b/source/fitz/output-ps.c
@@ -175,7 +175,7 @@ void fz_save_pixmap_as_ps(fz_context *ctx, fz_pixmap *pixmap, char *filename, in
}
static void
-ps_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_start, int bandheight, const unsigned char *samples)
+ps_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_start, int band_height, const unsigned char *samples)
{
ps_band_writer *writer = (ps_band_writer *)writer_;
fz_output *out = writer->super.out;
@@ -187,10 +187,10 @@ ps_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_sta
int required_output;
unsigned char *o;
- if (band_start+bandheight >= h)
- bandheight = h - band_start;
+ if (band_start+band_height >= h)
+ band_height = h - band_start;
- required_input = w*(n-1)*bandheight;
+ required_input = w*(n-1)*band_height;
required_output = (int)deflateBound(&writer->stream, required_input);
if (writer->input == NULL || writer->input_size < required_input)
@@ -210,7 +210,7 @@ ps_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_sta
}
o = writer->input;
- for (y = 0; y < bandheight; y++)
+ for (y = 0; y < band_height; y++)
{
for (x = 0; x < w; x++)
{