[poppler] utils/pdfseparate.cc

Pino Toscano pino at kde.org
Sun Oct 9 13:56:52 UTC 2016


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20161009/53f23eda/attachment.sig>


More information about the poppler mailing list