[poppler] utils/pdfseparate.cc

Thomas Freitag thomas.freitag.bbr at gmail.com
Sun Oct 9 14:22:37 UTC 2016


Sorry,  my mistake. Thought in printf syntax and haven't tested it before
answer.

Thomas

Am 09.10.2016 16:18 schrieb "Pino Toscano" <pino at kde.org>:

Hi,

(no need to CC me, I'm subscribed to the list already.)

In data domenica 9 ottobre 2016 15:30:44 CEST, Thomas Freitag ha scritto:
> That's not correct,  Pino

No, my change is correct.

> If you take a deeper look at this error message, the %d is not a
> placeholder for a number, the percent sign should be printed. And to asure
> this it's escaped by a second percent sign.

error() uses GooString::format(), which uses its own syntax for
placeholders, described also in the comment above the
GooString::format() declaration in GooString.h.  % is not used at all
by this function, and thus it was printed twice.

In this specific example:

> -    error(errSyntaxError, -1, "'{0:s}' must contain '%%d' if more than
one page should be extracted", destFileName);
> +    error(errSyntaxError, -1, "'{0:s}' must contain '%d' if more than
one page should be extracted", destFileName);

the placeholder for "destFileName" is the "{0:s}" part in the error
string.

--
Pino Toscano
_______________________________________________
poppler mailing list
poppler at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20161009/f0ed0fe0/attachment.html>


More information about the poppler mailing list