Skip to content

Commit

Permalink
Merge remote branch 'trunk' into upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
barak committed Jan 15, 2010
2 parents 0df97b8 + 209a0ac commit b2165a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion po/ru.po
Expand Up @@ -330,7 +330,7 @@ msgstr "Сохранение: выполнено %d из %d\n"
#: minidjvu.c:624
#, c-format
msgid "bad --pages-per-dict value\n"
msgstr "неподходящее значение --pages-per-dict value\n"
msgstr "неподходящее значение --pages-per-dict\n"

#: minidjvu.c:636
#, c-format
Expand Down
5 changes: 4 additions & 1 deletion src/alg/clean.c
Expand Up @@ -23,7 +23,10 @@ MDJVU_IMPLEMENT void mdjvu_clean(mdjvu_image_t image)
{
mdjvu_bitmap_t bitmap = mdjvu_image_get_blit_bitmap(image, i);
int32 mass = mdjvu_image_get_mass(image, bitmap);
if (mass <= tinysize)
/* Don't cleanup blits which were produced as a result of splitting larger
/* shapes (such as horizontal rulers) */
int32 big = mdjvu_image_get_suspiciously_big_flag(image, bitmap);
if (mass <= tinysize && !big)
mdjvu_image_set_blit_bitmap(image, i, NULL);
}

Expand Down
7 changes: 4 additions & 3 deletions tools/minidjvu.c
Expand Up @@ -428,8 +428,9 @@ static void multipage_encode(int n, char **pages, char *outname, uint32 multipag
mdjvu_image_t *images;
mdjvu_image_t dict;
int i, el = 0;
int ndicts = (n % pages_per_dict > 0) ? (int) fabs( n/pages_per_dict) + 1:
(int) fabs( n/pages_per_dict);
int ndicts = (pages_per_dict <= 0)? 1 :
(n % pages_per_dict > 0) ? (int) fabs(n/pages_per_dict) + 1:
(int) fabs(n/pages_per_dict);
char *dict_name, *path;
char **elements = MDJVU_MALLOCV(char *, n + ndicts);
int *sizes = MDJVU_MALLOCV(int, n + ndicts);
Expand Down Expand Up @@ -625,7 +626,7 @@ static int process_options(int argc, char **argv)
i++;
if (i == argc) show_usage_and_exit();
pages_per_dict = atoi(argv[i]);
if (pages_per_dict <= 0)
if (pages_per_dict < 0)
{
fprintf(stderr, _("bad --pages-per-dict value\n"));
exit(2);
Expand Down

0 comments on commit b2165a7

Please sign in to comment.