Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: core/include/fxcrt/fx_ext.h

Issue 1172793002: Merge to XFA: Use stdint.h types throughout PDFium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fxcrt/fx_coordinates.h ('k') | core/include/fxcrt/fx_safe_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fxcrt/fx_ext.h
diff --git a/core/include/fxcrt/fx_ext.h b/core/include/fxcrt/fx_ext.h
index 97c47df6f6043633380ab1324f9f5c28cf20cac1..b31d7a43f74a9093468b5d1d94d34ee5f95fd95d 100644
--- a/core/include/fxcrt/fx_ext.h
+++ b/core/include/fxcrt/fx_ext.h
@@ -19,31 +19,31 @@ extern "C" {
FX_FLOAT FXSYS_tan(FX_FLOAT a);
FX_FLOAT FXSYS_logb(FX_FLOAT b, FX_FLOAT x);
-FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, FX_INT32 iLength = -1, FX_INT32 *pUsedLen = NULL);
-FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, FX_INT32 iLength = -1, FX_INT32 *pUsedLen = NULL);
+FX_FLOAT FXSYS_strtof(FX_LPCSTR pcsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
+FX_FLOAT FXSYS_wcstof(FX_LPCWSTR pwsStr, int32_t iLength = -1, int32_t *pUsedLen = NULL);
FX_LPWSTR FXSYS_wcsncpy(FX_LPWSTR dstStr, FX_LPCWSTR srcStr, size_t count);
-FX_INT32 FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count);
-FX_INT32 FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count);
+int32_t FXSYS_wcsnicmp(FX_LPCWSTR s1, FX_LPCWSTR s2, size_t count);
+int32_t FXSYS_strnicmp(FX_LPCSTR s1, FX_LPCSTR s2, size_t count);
-inline FX_BOOL FXSYS_islower(FX_INT32 ch)
+inline FX_BOOL FXSYS_islower(int32_t ch)
{
return ch >= 'a' && ch <= 'z';
}
-inline FX_BOOL FXSYS_isupper(FX_INT32 ch)
+inline FX_BOOL FXSYS_isupper(int32_t ch)
{
return ch >= 'A' && ch <= 'Z';
}
-inline FX_INT32 FXSYS_tolower(FX_INT32 ch)
+inline int32_t FXSYS_tolower(int32_t ch)
{
return ch < 'A' || ch > 'Z' ? ch : (ch + 0x20);
}
-inline FX_INT32 FXSYS_toupper(FX_INT32 ch)
+inline int32_t FXSYS_toupper(int32_t ch)
{
return ch < 'a' || ch > 'z' ? ch : (ch - 0x20);
}
-FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, FX_INT32 iLength, FX_BOOL bIgnoreCase = FALSE);
-FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, FX_INT32 iLength, FX_BOOL bIgnoreCase = FALSE);
+FX_DWORD FX_HashCode_String_GetA(FX_LPCSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE);
+FX_DWORD FX_HashCode_String_GetW(FX_LPCWSTR pStr, int32_t iLength, FX_BOOL bIgnoreCase = FALSE);
#ifdef __cplusplus
}
@@ -58,11 +58,11 @@ FX_DWORD FX_Random_MT_Generate(FX_LPVOID pContext);
void FX_Random_MT_Close(FX_LPVOID pContext);
-void FX_Random_GenerateBase(FX_LPDWORD pBuffer, FX_INT32 iCount);
+void FX_Random_GenerateBase(FX_LPDWORD pBuffer, int32_t iCount);
-void FX_Random_GenerateMT(FX_LPDWORD pBuffer, FX_INT32 iCount);
+void FX_Random_GenerateMT(FX_LPDWORD pBuffer, int32_t iCount);
-void FX_Random_GenerateCrypto(FX_LPDWORD pBuffer, FX_INT32 iCount);
+void FX_Random_GenerateCrypto(FX_LPDWORD pBuffer, int32_t iCount);
#ifdef __cplusplus
}
#endif
@@ -74,7 +74,7 @@ typedef struct FX_GUID {
FX_DWORD data1;
FX_WORD data2;
FX_WORD data3;
- FX_BYTE data4[8];
+ uint8_t data4[8];
} FX_GUID, * FX_LPGUID;
typedef FX_GUID const * FX_LPCGUID;
@@ -88,10 +88,10 @@ template<class baseType>
class CFX_SSortTemplate
{
public:
- void ShellSort(baseType *pArray, FX_INT32 iCount)
+ void ShellSort(baseType *pArray, int32_t iCount)
{
FXSYS_assert(pArray != NULL && iCount > 0);
- FX_INT32 i, j, gap;
+ int32_t i, j, gap;
baseType v1, v2;
gap = iCount >> 1;
while (gap > 0) {
« no previous file with comments | « core/include/fxcrt/fx_coordinates.h ('k') | core/include/fxcrt/fx_safe_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698