diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/mudraw.c | 4 | ||||
-rw-r--r-- | apps/mupdfclean.c | 4 | ||||
-rw-r--r-- | apps/mupdfinfo.c | 4 | ||||
-rw-r--r-- | apps/pdfapp.c | 16 | ||||
-rw-r--r-- | apps/x11_image.c | 4 |
5 files changed, 16 insertions, 16 deletions
diff --git a/apps/mudraw.c b/apps/mudraw.c index 359b102f..4fce251d 100644 --- a/apps/mudraw.c +++ b/apps/mudraw.c @@ -406,8 +406,8 @@ static void drawrange(fz_context *ctx, fz_document *doc, char *range) epage = pagecount; } - spage = CLAMP(spage, 1, pagecount); - epage = CLAMP(epage, 1, pagecount); + spage = fz_clampi(spage, 1, pagecount); + epage = fz_clampi(epage, 1, pagecount); if (spage < epage) for (page = spage; page <= epage; page++) diff --git a/apps/mupdfclean.c b/apps/mupdfclean.c index 264d8edc..6b185668 100644 --- a/apps/mupdfclean.c +++ b/apps/mupdfclean.c @@ -87,8 +87,8 @@ static void retainpages(int argc, char **argv) if (spage > epage) page = spage, spage = epage, epage = page; - spage = CLAMP(spage, 1, pagecount); - epage = CLAMP(epage, 1, pagecount); + spage = fz_clampi(spage, 1, pagecount); + epage = fz_clampi(epage, 1, pagecount); for (page = spage; page <= epage; page++) { diff --git a/apps/mupdfinfo.c b/apps/mupdfinfo.c index 3a1c9c39..5bdf760e 100644 --- a/apps/mupdfinfo.c +++ b/apps/mupdfinfo.c @@ -921,8 +921,8 @@ showinfo(char *filename, int show, char *pagelist) if (spage > epage) page = spage, spage = epage, epage = page; - spage = CLAMP(spage, 1, pagecount); - epage = CLAMP(epage, 1, pagecount); + spage = fz_clampi(spage, 1, pagecount); + epage = fz_clampi(epage, 1, pagecount); if (allpages) printf("Retrieving info from pages %d-%d...\n", spage, epage); diff --git a/apps/pdfapp.c b/apps/pdfapp.c index d2c28927..50a89610 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -1085,10 +1085,10 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta if (app->iscopying) { app->iscopying = 0; - app->selr.x0 = MIN(app->selx, x) - app->panx + rect.x0; - app->selr.x1 = MAX(app->selx, x) - app->panx + rect.x0; - app->selr.y0 = MIN(app->sely, y) - app->pany + rect.y0; - app->selr.y1 = MAX(app->sely, y) - app->pany + rect.y0; + app->selr.x0 = fz_mini(app->selx, x) - app->panx + rect.x0; + app->selr.x1 = fz_maxi(app->selx, x) - app->panx + rect.x0; + app->selr.y0 = fz_mini(app->sely, y) - app->pany + rect.y0; + app->selr.y1 = fz_maxi(app->sely, y) - app->pany + rect.y0; winrepaint(app); if (app->selr.x0 < app->selr.x1 && app->selr.y0 < app->selr.y1) windocopy(app); @@ -1156,10 +1156,10 @@ void pdfapp_onmouse(pdfapp_t *app, int x, int y, int btn, int modifiers, int sta else if (app->iscopying) { - app->selr.x0 = MIN(app->selx, x) - app->panx + rect.x0; - app->selr.x1 = MAX(app->selx, x) - app->panx + rect.x0; - app->selr.y0 = MIN(app->sely, y) - app->pany + rect.y0; - app->selr.y1 = MAX(app->sely, y) - app->pany + rect.y0; + app->selr.x0 = fz_mini(app->selx, x) - app->panx + rect.x0; + app->selr.x1 = fz_maxi(app->selx, x) - app->panx + rect.x0; + app->selr.y0 = fz_mini(app->sely, y) - app->pany + rect.y0; + app->selr.y1 = fz_maxi(app->sely, y) - app->pany + rect.y0; winrepaint(app); } diff --git a/apps/x11_image.c b/apps/x11_image.c index 06764313..6392d868 100644 --- a/apps/x11_image.c +++ b/apps/x11_image.c @@ -432,10 +432,10 @@ ximage_blit(Drawable d, GC gc, for (ay = 0; ay < srch; ay += HEIGHT) { - h = MIN(srch - ay, HEIGHT); + h = fz_mini(srch - ay, HEIGHT); for (ax = 0; ax < srcw; ax += WIDTH) { - w = MIN(srcw - ax, WIDTH); + w = fz_mini(srcw - ax, WIDTH); image = next_pool_image(); |