[poppler] Poppler 0.90.1 released
Jean Ghali
jghali at libertysurf.fr
Fri Jul 17 12:28:53 UTC 2020
Le 11/07/2020 à 19:16, Albert Astals Cid a écrit :
> Available from
> http://poppler.freedesktop.org/poppler-0.90.1.tar.xz
>
> The tarball is signed at http://poppler.freedesktop.org/poppler-0.90.1.tar.xz.sig with my key
> http://hkps.pool.sks-keyservers.net/pks/lookup?op=get&search=0xCA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7
>
> Release 0.90.1:
> core:
> * Fix regression on PS conversion.
> Regression only happened on applications that are locale enabled
> i.e. Okular but not pdftops, when using a quite new lcms and
> the user locale uses , as decimal separator instead of .
> * Add UTF16LE support to TextStringToUCS4.
> Even if the standard clearly says it should be UTF16BE
>
> This release was brought to you by Albert Astals Cid, Nelson Benítez León and everyone else that filed bugs or helped with code reviews :)
>
> Testing, patches and bug reports welcome.
>
> Cheers,
> Albert
Hi,
It seems clang-format has broken compilation on Windows, at least with Visual Studio 2017
and 2019 compilers. The errors occur when compiling the _WIN32 specific assembly code
located in SplashMath.h because of incorrect formatting performed by clang-format on lines
beginning with __asm keyword. For example in splashFloor(), we see that clang-format has
grouped several __asm blocks on same lines:
#elif defined(_WIN32) && defined(_M_IX86)
// floor() and (int)() are implemented separately, which results
// in changing the FPCW multiple times - so we optimize it with
// some inline assembly
unsigned short oldCW, newCW;
int result;
__asm fld QWORD PTR x __asm fnstcw WORD PTR oldCW __asm mov ax, WORD PTR oldCW __asm
and ax, 0xf3ff __asm or ax, 0x0400 __asm mov WORD PTR newCW,
ax // round down
__asm fldcw WORD PTR newCW __asm fistp DWORD PTR result __asm fldcw WORD PTR
oldCW return result;
Finishing lines beginning with __asm keyword with a semicolon is optional and as of
poppler 0.90.0, these lines beginning with __asm keyword did indeed not end with a
semicolon. To fix this issue with clang-format, my guess is that a semicolon should simply
be added. You will find a patch in attachments.
Best regards,
Jean Ghali
-------------- next part --------------
--- a/splash/SplashMath.h 2020-07-11 18:39:45.000000000 +0200
+++ b/splash/SplashMath.h 2020-07-17 13:48:33.249941200 +0200
@@ -66,9 +66,16 @@
unsigned short oldCW, newCW;
int result;
- __asm fld QWORD PTR x __asm fnstcw WORD PTR oldCW __asm mov ax, WORD PTR oldCW __asm and ax, 0xf3ff __asm or ax, 0x0400 __asm mov WORD PTR newCW,
- ax // round down
- __asm fldcw WORD PTR newCW __asm fistp DWORD PTR result __asm fldcw WORD PTR oldCW return result;
+ __asm fld QWORD PTR x;
+ __asm fnstcw WORD PTR oldCW;
+ __asm mov ax, WORD PTR oldCW;
+ __asm and ax, 0xf3ff;
+ __asm or ax, 0x0400;
+ __asm mov WORD PTR newCW, ax; // round down
+ __asm fldcw WORD PTR newCW;
+ __asm fistp DWORD PTR result;
+ __asm fldcw WORD PTR oldCW;
+ return result;
#else
if (x > 0)
return (int)x;
@@ -107,9 +114,16 @@
unsigned short oldCW, newCW;
int result;
- __asm fld QWORD PTR x __asm fnstcw WORD PTR oldCW __asm mov ax, WORD PTR oldCW __asm and ax, 0xf3ff __asm or ax, 0x0800 __asm mov WORD PTR newCW,
- ax // round up
- __asm fldcw WORD PTR newCW __asm fistp DWORD PTR result __asm fldcw WORD PTR oldCW return result;
+ __asm fld QWORD PTR x;
+ __asm fnstcw WORD PTR oldCW;
+ __asm mov ax, WORD PTR oldCW;
+ __asm and ax, 0xf3ff;
+ __asm or ax, 0x0800;
+ __asm mov WORD PTR newCW, ax; // round up
+ __asm fldcw WORD PTR newCW;
+ __asm fistp DWORD PTR result;
+ __asm fldcw WORD PTR oldCW;
+ return result;
#else
return (int)ceil(x);
#endif
@@ -145,9 +159,16 @@
int result;
x += 0.5;
- __asm fld QWORD PTR x __asm fnstcw WORD PTR oldCW __asm mov ax, WORD PTR oldCW __asm and ax, 0xf3ff __asm or ax, 0x0400 __asm mov WORD PTR newCW,
- ax // round down
- __asm fldcw WORD PTR newCW __asm fistp DWORD PTR result __asm fldcw WORD PTR oldCW return result;
+ __asm fld QWORD PTR x;
+ __asm fnstcw WORD PTR oldCW;
+ __asm mov ax, WORD PTR oldCW;
+ __asm and ax, 0xf3ff;
+ __asm or ax, 0x0400;
+ __asm mov WORD PTR newCW, ax; // round down
+ __asm fldcw WORD PTR newCW;
+ __asm fistp DWORD PTR result;
+ __asm fldcw WORD PTR oldCW;
+ return result;
#else
return (int)splashFloor(x + 0.5);
#endif
More information about the poppler
mailing list