blob: 9866aacafc8d0035440ff92a242a5dfd3abccbe6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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_ */
|