annotate src/platform.h @ 41:78c981f2ff2d

Fix some obvious errors.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 05 Aug 2013 23:44:43 +0300
parents 785057719d9b
children d85542c96791
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /* ============================================================================
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * Freetype GL - A C OpenGL Freetype engine
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * Platform: Any
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 * WWW: http://code.google.com/p/freetype-gl/
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 * ----------------------------------------------------------------------------
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 *
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 * Redistribution and use in source and binary forms, with or without
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 * modification, are permitted provided that the following conditions are met:
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 *
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 * 1. Redistributions of source code must retain the above copyright notice,
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 * this list of conditions and the following disclaimer.
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 *
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 * 2. Redistributions in binary form must reproduce the above copyright
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 * notice, this list of conditions and the following disclaimer in the
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 * documentation and/or other materials provided with the distribution.
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 *
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''AS IS'' AND ANY EXPRESS OR
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 * EVENT SHALL NICOLAS P. ROUGIER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 *
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 * The views and conclusions contained in the software and documentation are
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 * those of the authors and should not be interpreted as representing official
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 * policies, either expressed or implied, of Nicolas P. Rougier.
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 * ============================================================================
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 */
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 #ifndef __PLATFORM_H__
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 #define __PLATFORM_H__
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 #include <stdlib.h>
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 //-------------------------------------------------
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 // stdint.h is not available on VS2008 or lower
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 //-------------------------------------------------
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 #ifdef _MSC_VER
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 typedef __int32 int32_t;
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 typedef unsigned __int32 uint32_t;
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 typedef __int64 int64_t;
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 typedef unsigned __int64 uint64_t;
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 #else
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 #include <stdint.h>
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 #endif // _MSC_VER
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51 #ifdef __cplusplus
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 extern "C" {
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 #endif
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 #ifdef __APPLE__
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56 /* strndup() was only added in OSX lion */
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 char * strndup( const char *s1, size_t n);
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 #elif defined(_WIN32) || defined(_WIN64)
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 /* does not exist on windows */
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 char * strndup( const char *s1, size_t n);
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 // double round (float v);
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 # pragma warning (disable: 4244) // suspend warnings
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63 #endif // _WIN32 || _WIN64
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 #ifdef __cplusplus
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66 }
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 #endif // __cplusplus
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68
785057719d9b Import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 #endif /* __PLATFORM_H__ */