b804fe57bd
List of changes on master since MuPDF 1.3 * Headline changes: * CMYK rendering (mudraw PWG and PAM formats) * TIFF viewer (with multi-page support). * Added MuJS Javascript interpreter. * MuJS is the default, V8 and JavaScriptCore are compile time options. * Javascript support has to be explicitly enabled with pdf_enable_js. * All viewers now have JavaScript enabled in the default builds. * Viewers: * X11: Horizontal scroll wheel support. * X11: Status bar display with warnings. * Android: Digital signatures. * iOS: Links, form filling, annotation editing, and javascript. * iOS: Reflow mode. * WinRT: Printing. * WinRT: Improved zooming behaviour. * Tools: * mudraw: Banded rendering with -B /band-height/. * mudraw: Select output format with -F /format/. * mudraw: Write to stdout if you use '-' as the output file name. * mudraw: Add TGA output format. * mudraw: Improved SVG output. * mutool show: Write output to file instead of stdout with -o /filename/. * mutool clean: Clean content streams with -s option. * Annotations: * Improved font handling. * Form fields. * Free text. * Sticky notes. * Optimizations: * glyph cache: Partial eviction. * glyph cache: Run-length compressed glyphs. * Smarter handling of subpixel metrics in text rendering. * Optimized blitting functions. * Optimized gradient mesh drawing. * API changes and additions: * fz_stream API reworked: replace "read" function with "next". * "Rebind" functions to associate context bound objects with another context: fz_output, fz_stream, fz_device and fz_document. * Introduce "document handlers" to detect and open different file types. * Must now call fz_register_document_handlers() to register the defaults. * May register your own handlers as well to work with fz_open_document. * Hook to load system fonts: fz_install_load_system_font_funcs. * PDF xref cache flushing functions (mark/clear/clear-to-mark). * Add our own "printf" set of functions to format strings and write to fz_output: * Format %f as short as possible while preserving precision. * Has %C for formatting a unicode character as UTF-8. * Has %M to format fz_matrix. * Has %R to format fz_rect. * Has %q and %( to format strings with escaped characters. * PDF process interface: allow PDF interpreter to do more than just draw! * Content stream state cleaning filter. * Content stream rewriting filter. * PDF digital signatures. * Stroke states may now be stored on the stack. * Improved fz_path internals. * Gradient mesh drawing interface has been improved. * Save files with incremental updates.
82 lines
2.5 KiB
Text
82 lines
2.5 KiB
Text
$NetBSD: patch-ae,v 1.4 2014/04/21 16:14:40 wiz Exp $
|
|
|
|
Avoid namespace conflicts with bswap(3).
|
|
|
|
--- source/fitz/crypt-sha2.c.orig 2014-04-11 15:10:41.000000000 +0000
|
|
+++ source/fitz/crypt-sha2.c
|
|
@@ -17,7 +17,7 @@ static inline int isbigendian(void)
|
|
return *(char*)&one == 0;
|
|
}
|
|
|
|
-static inline unsigned int bswap32(unsigned int num)
|
|
+static inline unsigned int mup_bswap32(unsigned int num)
|
|
{
|
|
return ( (((num) << 24))
|
|
| (((num) << 8) & 0x00FF0000)
|
|
@@ -25,7 +25,7 @@ static inline unsigned int bswap32(unsig
|
|
| (((num) >> 24)) );
|
|
}
|
|
|
|
-static inline uint64_t bswap64(uint64_t num)
|
|
+static inline uint64_t mup_bswap64(uint64_t num)
|
|
{
|
|
return ( (((num) << 56))
|
|
| (((num) << 40) & 0x00FF000000000000ULL)
|
|
@@ -99,7 +99,7 @@ transform256(unsigned int state[8], unsi
|
|
/* ensure big-endian integers */
|
|
if (!isbigendian())
|
|
for (j = 0; j < 16; j++)
|
|
- data[j] = bswap32(data[j]);
|
|
+ data[j] = mup_bswap32(data[j]);
|
|
|
|
/* Copy state[] to working vars. */
|
|
memcpy(T, state, sizeof(T));
|
|
@@ -192,8 +192,8 @@ void fz_sha256_final(fz_sha256 *context,
|
|
|
|
if (!isbigendian())
|
|
{
|
|
- context->buffer.u32[14] = bswap32(context->count[1]);
|
|
- context->buffer.u32[15] = bswap32(context->count[0]);
|
|
+ context->buffer.u32[14] = mup_bswap32(context->count[1]);
|
|
+ context->buffer.u32[15] = mup_bswap32(context->count[0]);
|
|
}
|
|
else
|
|
{
|
|
@@ -204,7 +204,7 @@ void fz_sha256_final(fz_sha256 *context,
|
|
|
|
if (!isbigendian())
|
|
for (j = 0; j < 8; j++)
|
|
- context->state[j] = bswap32(context->state[j]);
|
|
+ context->state[j] = mup_bswap32(context->state[j]);
|
|
|
|
memcpy(digest, &context->state[0], 32);
|
|
memset(context, 0, sizeof(fz_sha256));
|
|
@@ -271,7 +271,7 @@ transform512(uint64_t state[8], uint64_t
|
|
/* ensure big-endian integers */
|
|
if (!isbigendian())
|
|
for (j = 0; j < 16; j++)
|
|
- data[j] = bswap64(data[j]);
|
|
+ data[j] = mup_bswap64(data[j]);
|
|
|
|
/* Copy state[] to working vars. */
|
|
memcpy(T, state, sizeof(T));
|
|
@@ -364,8 +364,8 @@ void fz_sha512_final(fz_sha512 *context,
|
|
|
|
if (!isbigendian())
|
|
{
|
|
- context->buffer.u64[14] = bswap64(context->count[1]);
|
|
- context->buffer.u64[15] = bswap64(context->count[0]);
|
|
+ context->buffer.u64[14] = mup_bswap64(context->count[1]);
|
|
+ context->buffer.u64[15] = mup_bswap64(context->count[0]);
|
|
}
|
|
else
|
|
{
|
|
@@ -376,7 +376,7 @@ void fz_sha512_final(fz_sha512 *context,
|
|
|
|
if (!isbigendian())
|
|
for (j = 0; j < 8; j++)
|
|
- context->state[j] = bswap64(context->state[j]);
|
|
+ context->state[j] = mup_bswap64(context->state[j]);
|
|
|
|
memcpy(digest, &context->state[0], 64);
|
|
memset(context, 0, sizeof(fz_sha512));
|