Debian Codegraph @

common/free42.h

raw
1 /*****************************************************************************
2 * Free42 -- an HP-42S calculator simulator
3 * Copyright (C) 2004-2026 Thomas Okken
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, version 2,
7 * as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see http://www.gnu.org/licenses/.
16 *****************************************************************************/
17
18 #ifndef FREE42_H
19 #define FREE42_H 1
20
21
22 #ifndef BCD_MATH
23 #include <math.h>
24 #endif
25
26 #define int2 short
27 #define uint2 unsigned short
28 #define int4 int
29 #define uint4 unsigned int
30 #define int8 long long
31 #define uint8 unsigned long long
32
33 #pragma STDC FP_CONTRACT OFF
34
35 #if defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
36 /* I have tested big-endian state file compatibility in Fedora 12
37 * running on qemu-system-ppc. I found that I needed to explicitly
38 * set F42_BIG_ENDIAN for it to work; apparently the __BYTE_ORDER__
39 * macro is not defined in such old compilers.
40 * Also see the comment about setting BID_BIG_ENDIAN in
41 * gtk/build-intel-lib.sh.
42 */
43 #define F42_BIG_ENDIAN 1
44 #endif
45
46 /* Magic number "24kF" for the state file. */
47 #define FREE42_MAGIC 0x466b3432
48 #define FREE42_MAGIC_STR "24kF"
49
50
51 #endif