diff options
| author | su_v <suv-sf@users.sourceforge.net> | 2012-09-23 17:19:33 +0000 |
|---|---|---|
| committer | ~suv <suv-sf@users.sourceforge.net> | 2012-09-23 17:19:33 +0000 |
| commit | 89bb2602a15a830b7e2133307a8ec6a08ebd0f84 (patch) | |
| tree | 9d99114076f755d5098b353b1cd26215e74abe61 /src/extension/internal/uemf_endian.h | |
| parent | Add libunicode-convert: routines for converting between Unicode and nonunicod... (diff) | |
| download | inkscape-89bb2602a15a830b7e2133307a8ec6a08ebd0f84.tar.gz inkscape-89bb2602a15a830b7e2133307a8ec6a08ebd0f84.zip | |
Fixes bug #988601: omnibus patch for EMF input/output support (cross-platform)
(bzr r11668.1.8)
Diffstat (limited to 'src/extension/internal/uemf_endian.h')
| -rw-r--r-- | src/extension/internal/uemf_endian.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/extension/internal/uemf_endian.h b/src/extension/internal/uemf_endian.h new file mode 100644 index 000000000..9866aacaf --- /dev/null +++ b/src/extension/internal/uemf_endian.h @@ -0,0 +1,37 @@ +/** + @file uemf_endian.h Prototype for function for converting EMF records between Big Endian and Little Endian +*/ + +/* +File: uemf_endian.h +Version: 0.0.3 +Date: 24-JUL-2012 +Author: David Mathog, Biology Division, Caltech +email: mathog@caltech.edu +Copyright: 2012 David Mathog and California Institute of Technology (Caltech) +*/ + +#ifndef _UEMF_ENDIAN_ +#define _UEMF_ENDIAN_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* There is no way for the preprocessor, in general, to figure out endianness. So the command line must define + WORDS_BIGENDIAN for a big endian machine. Otherwise we assume is is little endian. If it is something + else this code won't work in any case. */ +#ifdef WORDS_BIGENDIAN +#define U_BYTE_SWAP 1 +#else +#define U_BYTE_SWAP 0 +#endif + +// prototypes +int U_emf_endian(char *contents, size_t length, int torev); + +#ifdef __cplusplus +} +#endif + +#endif /* _UEMF_ENDIAN_ */ |
