Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openjdk-multiarch-jdk8u
Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/common/LEStandalone.h
38825 views
1
/*
2
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3
*
4
* This code is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 2 only, as
6
* published by the Free Software Foundation. Oracle designates this
7
* particular file as subject to the "Classpath" exception as provided
8
* by Oracle in the LICENSE file that accompanied this code.
9
*
10
* This code is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13
* version 2 for more details (a copy is included in the LICENSE file that
14
* accompanied this code).
15
*
16
* You should have received a copy of the GNU General Public License version
17
* 2 along with this work; if not, write to the Free Software Foundation,
18
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19
*
20
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21
* or visit www.oracle.com if you need additional information or have any
22
* questions.
23
*
24
*/
25
26
#ifndef __LESTANDALONE
27
#define __LESTANDALONE
28
29
#ifndef U_COPYRIGHT_STRING
30
#define U_COPYRIGHT_STRING " (C) Copyright IBM Corp and Others. 1998-2010 - All Rights Reserved"
31
#endif
32
33
/* ICU Version number */
34
#ifndef U_ICU_VERSION
35
#define U_ICU_VERSION "4.6"
36
#endif
37
38
/* Definitions to make Layout Engine work away from ICU. */
39
#ifndef U_NAMESPACE_BEGIN
40
#define U_NAMESPACE_BEGIN
41
#endif
42
43
#ifndef U_NAMESPACE_END
44
#define U_NAMESPACE_END
45
#endif
46
47
/* RTTI Definition */
48
typedef const char *UClassID;
49
#ifndef UOBJECT_DEFINE_RTTI_IMPLEMENTATION
50
#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(x) UClassID x::getStaticClassID(){static char z=0; return (UClassID)&z; } UClassID x::getDynamicClassID() const{return x::getStaticClassID(); }
51
#endif
52
53
/* UMemory's functions aren't used by the layout engine. */
54
struct UMemory {};
55
/* UObject's functions aren't used by the layout engine. */
56
struct UObject {};
57
58
/* String handling */
59
#include <stdlib.h>
60
#include <string.h>
61
62
/**
63
* A convenience macro to test for the success of a LayoutEngine call.
64
*
65
* @stable ICU 2.4
66
*/
67
#define LE_SUCCESS(code) ((code)<=LE_NO_ERROR)
68
69
/**
70
* A convenience macro to test for the failure of a LayoutEngine call.
71
*
72
* @stable ICU 2.4
73
*/
74
#define LE_FAILURE(code) ((code)>LE_NO_ERROR)
75
76
77
#ifndef _LP64
78
typedef long le_int32;
79
typedef unsigned long le_uint32;
80
#else
81
typedef int le_int32;
82
typedef unsigned int le_uint32;
83
#endif
84
85
#define HAVE_LE_INT32 1
86
#define HAVE_LE_UINT32 1
87
88
typedef unsigned short UChar;
89
typedef le_uint32 UChar32;
90
91
typedef short le_int16;
92
#define HAVE_LE_INT16 1
93
94
typedef unsigned short le_uint16;
95
#define HAVE_LE_UINT16
96
97
typedef signed char le_int8;
98
#define HAVE_LE_INT8
99
100
typedef unsigned char le_uint8;
101
#define HAVE_LE_UINT8
102
103
typedef char UBool;
104
105
/**
106
* Error codes returned by the LayoutEngine.
107
*
108
* @stable ICU 2.4
109
*/
110
enum LEErrorCode {
111
/* informational */
112
LE_NO_SUBFONT_WARNING = -127, // U_USING_DEFAULT_WARNING,
113
114
/* success */
115
LE_NO_ERROR = 0, // U_ZERO_ERROR,
116
117
/* failures */
118
LE_ILLEGAL_ARGUMENT_ERROR = 1, // U_ILLEGAL_ARGUMENT_ERROR,
119
LE_MEMORY_ALLOCATION_ERROR = 7, // U_MEMORY_ALLOCATION_ERROR,
120
LE_INDEX_OUT_OF_BOUNDS_ERROR = 8, //U_INDEX_OUTOFBOUNDS_ERROR,
121
LE_NO_LAYOUT_ERROR = 16, // U_UNSUPPORTED_ERROR,
122
LE_INTERNAL_ERROR = 5, // U_INTERNAL_PROGRAM_ERROR,
123
LE_FONT_FILE_NOT_FOUND_ERROR = 4, // U_FILE_ACCESS_ERROR,
124
LE_MISSING_FONT_TABLE_ERROR = 2 // U_MISSING_RESOURCE_ERROR
125
};
126
#define HAVE_LEERRORCODE
127
128
#define U_LAYOUT_API
129
130
#define uprv_malloc malloc
131
#define uprv_free free
132
#define uprv_memcpy memcpy
133
#define uprv_realloc realloc
134
135
#define U_EXPORT2
136
#define U_CAPI extern "C"
137
138
#if !defined(U_IS_BIG_ENDIAN)
139
#ifdef _LITTLE_ENDIAN
140
#define U_IS_BIG_ENDIAN 0
141
#endif
142
#endif
143
144
#endif
145
146