Fix a few C99isms
Reported in bug 606761.
This commit is contained in:
@ -1257,6 +1257,12 @@ pixops_process (guchar *dest_buf,
|
|||||||
int x_step;
|
int x_step;
|
||||||
int y_step;
|
int y_step;
|
||||||
|
|
||||||
|
int check_shift;
|
||||||
|
int scaled_x_offset;
|
||||||
|
|
||||||
|
int run_end_x;
|
||||||
|
int run_end_index;
|
||||||
|
|
||||||
x_step = (1 << SCALE_SHIFT) / scale_x; /* X step in source (fixed point) */
|
x_step = (1 << SCALE_SHIFT) / scale_x; /* X step in source (fixed point) */
|
||||||
y_step = (1 << SCALE_SHIFT) / scale_y; /* Y step in source (fixed point) */
|
y_step = (1 << SCALE_SHIFT) / scale_y; /* Y step in source (fixed point) */
|
||||||
|
|
||||||
@ -1266,9 +1272,9 @@ pixops_process (guchar *dest_buf,
|
|||||||
line_bufs = g_new (guchar *, filter->y.n);
|
line_bufs = g_new (guchar *, filter->y.n);
|
||||||
filter_weights = make_filter_table (filter);
|
filter_weights = make_filter_table (filter);
|
||||||
|
|
||||||
int check_shift = check_size ? get_check_shift (check_size) : 0;
|
check_shift = check_size ? get_check_shift (check_size) : 0;
|
||||||
|
|
||||||
int scaled_x_offset = floor (filter->x.offset * (1 << SCALE_SHIFT));
|
scaled_x_offset = floor (filter->x.offset * (1 << SCALE_SHIFT));
|
||||||
|
|
||||||
/* Compute the index where we run off the end of the source buffer. The
|
/* Compute the index where we run off the end of the source buffer. The
|
||||||
* furthest source pixel we access at index i is:
|
* furthest source pixel we access at index i is:
|
||||||
@ -1283,8 +1289,8 @@ pixops_process (guchar *dest_buf,
|
|||||||
*/
|
*/
|
||||||
#define MYDIV(a,b) ((a) > 0 ? (a) / (b) : ((a) - (b) + 1) / (b)) /* Division so that -1/5 = -1 */
|
#define MYDIV(a,b) ((a) > 0 ? (a) / (b) : ((a) - (b) + 1) / (b)) /* Division so that -1/5 = -1 */
|
||||||
|
|
||||||
int run_end_x = (((src_width - filter->x.n + 1) << SCALE_SHIFT) - scaled_x_offset);
|
run_end_x = (((src_width - filter->x.n + 1) << SCALE_SHIFT) - scaled_x_offset);
|
||||||
int run_end_index = MYDIV (run_end_x + x_step - 1, x_step) - render_x0;
|
run_end_index = MYDIV (run_end_x + x_step - 1, x_step) - render_x0;
|
||||||
run_end_index = MIN (run_end_index, render_x1 - render_x0);
|
run_end_index = MIN (run_end_index, render_x1 - render_x0);
|
||||||
|
|
||||||
y = render_y0 * y_step + floor (filter->y.offset * (1 << SCALE_SHIFT));
|
y = render_y0 * y_step + floor (filter->y.offset * (1 << SCALE_SHIFT));
|
||||||
|
Reference in New Issue
Block a user