Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/native/common/LEStandalone.h
38825 views
/*1* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2*3* This code is free software; you can redistribute it and/or modify it4* under the terms of the GNU General Public License version 2 only, as5* published by the Free Software Foundation. Oracle designates this6* particular file as subject to the "Classpath" exception as provided7* by Oracle in the LICENSE file that accompanied this code.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425#ifndef __LESTANDALONE26#define __LESTANDALONE2728#ifndef U_COPYRIGHT_STRING29#define U_COPYRIGHT_STRING " (C) Copyright IBM Corp and Others. 1998-2010 - All Rights Reserved"30#endif3132/* ICU Version number */33#ifndef U_ICU_VERSION34#define U_ICU_VERSION "4.6"35#endif3637/* Definitions to make Layout Engine work away from ICU. */38#ifndef U_NAMESPACE_BEGIN39#define U_NAMESPACE_BEGIN40#endif4142#ifndef U_NAMESPACE_END43#define U_NAMESPACE_END44#endif4546/* RTTI Definition */47typedef const char *UClassID;48#ifndef UOBJECT_DEFINE_RTTI_IMPLEMENTATION49#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(x) UClassID x::getStaticClassID(){static char z=0; return (UClassID)&z; } UClassID x::getDynamicClassID() const{return x::getStaticClassID(); }50#endif5152/* UMemory's functions aren't used by the layout engine. */53struct UMemory {};54/* UObject's functions aren't used by the layout engine. */55struct UObject {};5657/* String handling */58#include <stdlib.h>59#include <string.h>6061/**62* A convenience macro to test for the success of a LayoutEngine call.63*64* @stable ICU 2.465*/66#define LE_SUCCESS(code) ((code)<=LE_NO_ERROR)6768/**69* A convenience macro to test for the failure of a LayoutEngine call.70*71* @stable ICU 2.472*/73#define LE_FAILURE(code) ((code)>LE_NO_ERROR)747576#ifndef _LP6477typedef long le_int32;78typedef unsigned long le_uint32;79#else80typedef int le_int32;81typedef unsigned int le_uint32;82#endif8384#define HAVE_LE_INT32 185#define HAVE_LE_UINT32 18687typedef unsigned short UChar;88typedef le_uint32 UChar32;8990typedef short le_int16;91#define HAVE_LE_INT16 19293typedef unsigned short le_uint16;94#define HAVE_LE_UINT169596typedef signed char le_int8;97#define HAVE_LE_INT89899typedef unsigned char le_uint8;100#define HAVE_LE_UINT8101102typedef char UBool;103104/**105* Error codes returned by the LayoutEngine.106*107* @stable ICU 2.4108*/109enum LEErrorCode {110/* informational */111LE_NO_SUBFONT_WARNING = -127, // U_USING_DEFAULT_WARNING,112113/* success */114LE_NO_ERROR = 0, // U_ZERO_ERROR,115116/* failures */117LE_ILLEGAL_ARGUMENT_ERROR = 1, // U_ILLEGAL_ARGUMENT_ERROR,118LE_MEMORY_ALLOCATION_ERROR = 7, // U_MEMORY_ALLOCATION_ERROR,119LE_INDEX_OUT_OF_BOUNDS_ERROR = 8, //U_INDEX_OUTOFBOUNDS_ERROR,120LE_NO_LAYOUT_ERROR = 16, // U_UNSUPPORTED_ERROR,121LE_INTERNAL_ERROR = 5, // U_INTERNAL_PROGRAM_ERROR,122LE_FONT_FILE_NOT_FOUND_ERROR = 4, // U_FILE_ACCESS_ERROR,123LE_MISSING_FONT_TABLE_ERROR = 2 // U_MISSING_RESOURCE_ERROR124};125#define HAVE_LEERRORCODE126127#define U_LAYOUT_API128129#define uprv_malloc malloc130#define uprv_free free131#define uprv_memcpy memcpy132#define uprv_realloc realloc133134#define U_EXPORT2135#define U_CAPI extern "C"136137#if !defined(U_IS_BIG_ENDIAN)138#ifdef _LITTLE_ENDIAN139#define U_IS_BIG_ENDIAN 0140#endif141#endif142143#endif144145146