Graphiteng
Types.h
Go to the documentation of this file.
00001 /*  GRAPHITE2 LICENSING
00002 
00003     Copyright 2010, SIL International
00004     All rights reserved.
00005 
00006     This library is free software; you can redistribute it and/or modify
00007     it under the terms of the GNU Lesser General Public License as published
00008     by the Free Software Foundation; either version 2.1 of License, or
00009     (at your option) any later version.
00010 
00011     This program is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Lesser General Public License for more details.
00015 
00016     You should also have received a copy of the GNU Lesser General Public
00017     License along with this library in the file named "LICENSE".
00018     If not, write to the Free Software Foundation, 51 Franklin Street,
00019     Suite 500, Boston, MA 02110-1335, USA or visit their web page on the
00020     internet at http://www.fsf.org/licenses/lgpl.html.
00021 
00022     Alternatively, the contents of this file may be used under the terms
00023     of the Mozilla Public License (http://mozilla.org/MPL) or the GNU
00024     General Public License, as published by the Free Software Foundation,
00025     either version 2 of the License or (at your option) any later version.
00026 */
00027 #pragma once
00028 
00029 #include <stddef.h>
00030 
00031 typedef unsigned char   gr_uint8;
00032 typedef gr_uint8        gr_byte;
00033 typedef signed char     gr_int8;
00034 typedef unsigned short  gr_uint16;
00035 typedef short           gr_int16;
00036 typedef unsigned int    gr_uint32;
00037 typedef int             gr_int32;
00038 
00039 enum gr_encform {
00040   gr_utf8 = 1/*sizeof(uint8)*/, gr_utf16 = 2/*sizeof(uint16)*/, gr_utf32 = 4/*sizeof(uint32)*/
00041 };
00042 
00043 // Definitions for library publicly exported symbols
00044 #if defined _WIN32 || defined __CYGWIN__
00045   #ifdef GR2_EXPORTING
00046     #ifdef __GNUC__
00047       #define GR2_API    __attribute__((dllexport))
00048     #else
00049       #define GR2_API    __declspec(dllexport)
00050     #endif
00051   #else
00052     #ifdef __GNUC__
00053       #define GR2_API    __attribute__((dllimport))
00054     #else
00055       #define GR2_API    __declspec(dllimport)
00056     #endif
00057   #endif
00058   #define GR2_LOCAL
00059 #else
00060   #if __GNUC__ >= 4
00061     #define GR2_API      __attribute__ ((visibility("default")))
00062     #define GR2_LOCAL       __attribute__ ((visibility("hidden")))
00063   #else
00064     #define GR2_API
00065     #define GR2_LOCAL
00066   #endif
00067 #endif
 All Files Functions Typedefs Enumerations Enumerator Defines