Implement image handling
[claws.git] / src / plugins / litehtml_viewer / litehtml / os_types.h
1 #pragma once\r
2 \r
3 namespace litehtml\r
4 {\r
5 #if defined( WIN32 ) || defined( WINCE )\r
6 \r
7 #ifndef LITEHTML_UTF8\r
8 \r
9         typedef std::wstring            tstring;\r
10         typedef wchar_t                         tchar_t;\r
11         typedef std::wstringstream      tstringstream;\r
12 \r
13         #define _t(quote)                       L##quote\r
14 \r
15         #define t_strlen                        wcslen\r
16         #define t_strcmp                        wcscmp\r
17         #define t_strncmp                       wcsncmp\r
18         #define t_strcasecmp            _wcsicmp\r
19         #define t_strncasecmp           _wcsnicmp\r
20         #define t_strtol                        wcstol\r
21         #define t_atoi                          _wtoi\r
22         #define t_strtod                        wcstod\r
23         #define t_itoa(value, buffer, size, radix)      _itow_s(value, buffer, size, radix)\r
24         #define t_strstr                        wcsstr\r
25         #define t_tolower                       towlower\r
26         #define t_isdigit                       iswdigit\r
27 \r
28 #else\r
29 \r
30         typedef std::string                     tstring;\r
31         typedef char                            tchar_t;\r
32         typedef std::stringstream       tstringstream;\r
33 \r
34         #define _t(quote)                       quote\r
35 \r
36         #define t_strlen                        strlen\r
37         #define t_strcmp                        strcmp\r
38         #define t_strncmp                       strncmp\r
39         #define t_strcasecmp            _stricmp\r
40         #define t_strncasecmp           _strnicmp\r
41         #define t_strtol                        strtol\r
42         #define t_atoi                          atoi\r
43         #define t_strtod                        strtod\r
44         #define t_itoa(value, buffer, size, radix)      _itoa_s(value, buffer, size, radix)\r
45         #define t_strstr                        strstr\r
46         #define t_tolower                       tolower\r
47         #define t_isdigit                       isdigit\r
48 \r
49 #endif\r
50 \r
51         #ifdef _WIN64\r
52                 typedef unsigned __int64 uint_ptr;\r
53         #else\r
54                 typedef unsigned int    uint_ptr;\r
55         #endif\r
56 \r
57 #else\r
58         #define LITEHTML_UTF8\r
59 \r
60         typedef std::string                     tstring;\r
61         typedef char                            tchar_t;\r
62         typedef void*                           uint_ptr;\r
63         typedef std::stringstream       tstringstream;\r
64 \r
65         #define _t(quote)                       quote\r
66 \r
67         #define t_strlen                        strlen\r
68         #define t_strcmp                        strcmp\r
69         #define t_strncmp                       strncmp\r
70 \r
71         #define t_strcasecmp            strcasecmp\r
72         #define t_strncasecmp           strncasecmp\r
73         #define t_itoa(value, buffer, size, radix)      snprintf(buffer, size, "%d", value)\r
74 \r
75         #define t_strtol                        strtol\r
76         #define t_atoi                          atoi\r
77         #define t_strtod                        strtod\r
78         #define t_strstr                        strstr\r
79         #define t_tolower                       tolower\r
80         #define t_isdigit                       isdigit\r
81 \r
82 #endif\r
83 }\r