OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef _FX_SYSTEM | 7 #ifndef _FX_SYSTEM |
8 #define _FX_SYSTEM | 8 #define _FX_SYSTEM |
9 #ifdef __cplusplus | 9 #ifdef __cplusplus |
10 extern "C" { | 10 extern "C" { |
11 #endif | 11 #endif |
12 #define FX_RAD2DEG(r) ((r) * 180.0f / FX_PI) | 12 #define FX_RAD2DEG(r) ((r) * 180.0f / FX_PI) |
13 #define FX_DEG2RAD(a) ((a) * FX_PI / 180.0f) | 13 #define FX_DEG2RAD(a) ((a) * FX_PI / 180.0f) |
14 typedef FX_INT8 *» » » FX_LPINT8; | 14 typedef int8_t *» » » FX_LPINT8; |
15 typedef FX_INT8 const *»» FX_LPCINT8; | 15 typedef int8_t const *» » FX_LPCINT8; |
16 typedef FX_INT32 *» » » FX_LPINT32; | 16 typedef int32_t *» » » FX_LPINT32; |
17 typedef FX_INT32 const *» FX_LPCINT32; | 17 typedef int32_t const *»FX_LPCINT32; |
18 typedef long FX_LONG; | 18 typedef long FX_LONG; |
19 typedef FX_LONG * FX_LPLONG; | 19 typedef FX_LONG * FX_LPLONG; |
20 typedef FX_LONG const * FX_LPCLONG; | 20 typedef FX_LONG const * FX_LPCLONG; |
21 typedef FX_FLOAT const * FX_LPCFLOAT; | 21 typedef FX_FLOAT const * FX_LPCFLOAT; |
22 typedef double FX_DOUBLE; | 22 typedef double FX_DOUBLE; |
23 typedef FX_DOUBLE * FX_LPDOUBLE; | 23 typedef FX_DOUBLE * FX_LPDOUBLE; |
24 typedef FX_DOUBLE const * FX_LPCDOUBLE; | 24 typedef FX_DOUBLE const * FX_LPCDOUBLE; |
25 FX_FLOAT FX_tan(FX_FLOAT a); | 25 FX_FLOAT FX_tan(FX_FLOAT a); |
26 FX_FLOAT FX_log(FX_FLOAT b, FX_FLOAT x); | 26 FX_FLOAT FX_log(FX_FLOAT b, FX_FLOAT x); |
27 FX_FLOAT» FX_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength = -1, FX_INT32 *pUs
edLen = NULL); | 27 FX_FLOAT» FX_strtof(FX_LPCSTR pcsStr, int32_t iLength = -1, int32_t *pUsed
Len = NULL); |
28 FX_FLOAT» FX_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength = -1, FX_INT32 *pU
sedLen = NULL); | 28 FX_FLOAT» FX_wcstof(FX_LPCWSTR pwsStr, int32_t iLength = -1, int32_t *pUse
dLen = NULL); |
29 FX_LPWSTR FX_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count); | 29 FX_LPWSTR FX_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count); |
30 FX_INT32» FX_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count); | 30 int32_t»FX_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count); |
31 FX_INT32» FX_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count); | 31 int32_t»FX_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count); |
32 inline FX_BOOL» FX_islower(FX_INT32 ch) | 32 inline FX_BOOL» FX_islower(int32_t ch) |
33 { | 33 { |
34 return ch >= 'a' && ch <= 'z'; | 34 return ch >= 'a' && ch <= 'z'; |
35 } | 35 } |
36 inline FX_BOOL» FX_isupper(FX_INT32 ch) | 36 inline FX_BOOL» FX_isupper(int32_t ch) |
37 { | 37 { |
38 return ch >= 'A' && ch <= 'Z'; | 38 return ch >= 'A' && ch <= 'Z'; |
39 } | 39 } |
40 inline FX_INT32»FX_tolower(FX_INT32 ch) | 40 inline int32_t» FX_tolower(int32_t ch) |
41 { | 41 { |
42 return FX_isupper(ch) ? (ch + 0x20) : ch; | 42 return FX_isupper(ch) ? (ch + 0x20) : ch; |
43 } | 43 } |
44 inline FX_INT32 FX_toupper(FX_INT32 ch) | 44 inline int32_t FX_toupper(int32_t ch) |
45 { | 45 { |
46 return FX_islower(ch) ? (ch - 0x20) : ch; | 46 return FX_islower(ch) ? (ch - 0x20) : ch; |
47 } | 47 } |
48 FX_INT32» FX_filelength(FXSYS_FILE *file); | 48 int32_t»FX_filelength(FXSYS_FILE *file); |
49 FX_BOOL»» FX_fsetsize(FXSYS_FILE *file, FX_INT32 size); | 49 FX_BOOL»» FX_fsetsize(FXSYS_FILE *file, int32_t size); |
50 void» » FX_memset(FX_LPVOID pBuf, FX_INT32 iValue, size_t size); | 50 void» » FX_memset(FX_LPVOID pBuf, int32_t iValue, size_t size); |
51 void FX_memcpy(FX_LPVOID pDst, FX_LPCVOID pSrc, size_t size); | 51 void FX_memcpy(FX_LPVOID pDst, FX_LPCVOID pSrc, size_t size); |
52 FX_BOOL FX_IsRelativePath(const CFX_WideStringC &wsPath); | 52 FX_BOOL FX_IsRelativePath(const CFX_WideStringC &wsPath); |
53 FX_BOOL FX_JoinPath(const CFX_WideStringC &wsBasePath, const CFX_WideStr
ingC &wsRelativePath, CFX_WideString &wsAbsolutePath); | 53 FX_BOOL FX_JoinPath(const CFX_WideStringC &wsBasePath, const CFX_WideStr
ingC &wsRelativePath, CFX_WideString &wsAbsolutePath); |
54 typedef struct _FX_VERSION { | 54 typedef struct _FX_VERSION { |
55 FX_DWORD dwMajorVersion; | 55 FX_DWORD dwMajorVersion; |
56 FX_DWORD dwMinorVersion; | 56 FX_DWORD dwMinorVersion; |
57 FX_DWORD dwBuildVersion; | 57 FX_DWORD dwBuildVersion; |
58 } FX_VERSION, * FX_LPVERSION; | 58 } FX_VERSION, * FX_LPVERSION; |
59 typedef FX_VERSION const * FX_LPCVERSION; | 59 typedef FX_VERSION const * FX_LPCVERSION; |
60 #ifdef __cplusplus | 60 #ifdef __cplusplus |
61 }; | 61 }; |
62 #endif | 62 #endif |
63 #endif | 63 #endif |
OLD | NEW |