001: /* Licensed to the Apache Software Foundation (ASF) under one or more
002: * contributor license agreements. See the NOTICE file distributed with
003: * this work for additional information regarding copyright ownership.
004: * The ASF licenses this file to You under the Apache License, Version 2.0
005: * (the "License"); you may not use this file except in compliance with
006: * the License. You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: package org.apache.harmony.luni.platform;
018:
019: /**
020: * Defines some C scalar types.
021: *
022: */
023:
024: public interface ICommonDataTypes {
025:
026: // Nothing
027: public static final int SIZEOF_NO_BYTES = 0;
028:
029: public static final int SIZEOF_VOID = SIZEOF_NO_BYTES;
030:
031: // One byte
032: public static final int SIZEOF_ONE_BYTE = 1;
033:
034: public static final int SIZEOF_UNSIGNED_CHAR = SIZEOF_ONE_BYTE; // ANSI C
035:
036: public static final int SIZEOF_JBOOLEAN = SIZEOF_ONE_BYTE; // Java language
037:
038: public static final int SIZEOF_BOOLEAN = SIZEOF_ONE_BYTE;
039:
040: public static final int SIZEOF_BOOL = SIZEOF_ONE_BYTE;
041:
042: public static final int SIZEOF_SIGNED_8_BITS = SIZEOF_ONE_BYTE;
043:
044: public static final int SIZEOF_SIGNED_CHAR = SIZEOF_ONE_BYTE; // ANSI C
045:
046: public static final int SIZEOF_JBYTE = SIZEOF_ONE_BYTE; // Java language
047:
048: // Two bytes
049: public static final int SIZEOF_TWO_BYTES = 2;
050:
051: public static final int SIZEOF_UNSIGNED_SHORT = SIZEOF_TWO_BYTES; // ANSI
052: // C
053:
054: public static final int SIZEOF_JCHAR = SIZEOF_TWO_BYTES; // Java language
055:
056: public static final int SIZEOF_UINT16 = SIZEOF_TWO_BYTES; // Common
057: // abbreviation
058:
059: public static final int SIZEOF_SIGNED_16_BITS = SIZEOF_TWO_BYTES;
060:
061: public static final int SIZEOF_SIGNED_SHORT = SIZEOF_TWO_BYTES; // ANSI C
062:
063: public static final int SIZEOF_JSHORT = SIZEOF_TWO_BYTES; // Java language
064:
065: public static final int SIZEOF_SHORT = SIZEOF_TWO_BYTES; // Common
066: // convention
067:
068: public static final int SIZEOF_INT16 = SIZEOF_TWO_BYTES; // Common
069: // abbreviation
070:
071: // Four bytes
072: public static final int SIZE_OF_FOUR_BYTES = 4;
073:
074: public static final int SIZEOF_UNSIGNED_32_BITS = SIZE_OF_FOUR_BYTES;
075:
076: public static final int SIZEOF_UINT32 = SIZE_OF_FOUR_BYTES; // Common
077: // abbreviation
078:
079: public static final int SIZEOF_UNSIGNED_LONG = SIZE_OF_FOUR_BYTES; // Common
080: // convention
081:
082: public static final int SIZEOF_SIGNED_32_BITS = SIZE_OF_FOUR_BYTES;
083:
084: public static final int SIZEOF_SIGNED_LONG = SIZE_OF_FOUR_BYTES; // ANSI
085: // C
086:
087: public static final int SIZEOF_JINT = SIZE_OF_FOUR_BYTES; // Java language
088:
089: public static final int SIZEOF_JSIZE = SIZE_OF_FOUR_BYTES; // Java language
090:
091: public static final int SIZEOF_LONG = SIZE_OF_FOUR_BYTES; // Common
092: // abbreviation
093:
094: public static final int SIZEOF_INT32 = SIZE_OF_FOUR_BYTES; // Common
095: // abbreviation
096:
097: public static final int SIZEOF_IEEE754_32_BITS = SIZE_OF_FOUR_BYTES;
098:
099: public static final int SIZEOF_JFLOAT = SIZE_OF_FOUR_BYTES; // Java language
100:
101: public static final int SIZEOF_FLOAT = SIZE_OF_FOUR_BYTES; // Common
102: // convention
103:
104: // Eight bytes
105: public static final int SIZEOF_EIGHT_BYTES = 8;
106:
107: public static final int SIZEOF_UNSIGNED_64_BITS = SIZEOF_EIGHT_BYTES;
108:
109: public static final int SIZEOF_SIGNED_64_BITS = SIZEOF_EIGHT_BYTES;
110:
111: public static final int SIZEOF_JLONG = SIZEOF_EIGHT_BYTES; // Java language
112:
113: public static final int SIZEOF_IEEE754_64_BITS = SIZEOF_EIGHT_BYTES;
114:
115: public static final int SIZEOF_JDOUBLE = SIZEOF_EIGHT_BYTES; // Java
116: // language
117:
118: public static final int SIZEOF_DOUBLE = SIZEOF_EIGHT_BYTES; // Common
119: // convention
120: }
|