Changeset 514 for pjproject/trunk/pjlib/include/pj/unicode.h
- Timestamp:
- Jun 16, 2006 4:52:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/unicode.h
r181 r514 22 22 #include <pj/types.h> 23 23 24 25 /** 26 * @defgroup PJ_UNICODE Unicode Support 27 * @ingroup PJ_MISC 28 * @{ 29 */ 24 30 25 31 PJ_BEGIN_DECL … … 61 67 #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 62 68 69 /** 70 * This macro is used to declare temporary Unicode buffer for ANSI to 71 * Unicode conversion, and should be put in declaration section of a block. 72 * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this 73 * macro will expand to nothing. 74 */ 63 75 # define PJ_DECL_UNICODE_TEMP_BUF(buf,size) wchar_t buf[size]; 76 77 /** 78 * This macro will convert ANSI string to native, when the platform's 79 * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero). 80 */ 64 81 # define PJ_STRING_TO_NATIVE(s,buf,max) pj_ansi_to_unicode( \ 65 82 s, strlen(s), \ 66 83 buf, max) 84 85 /** 86 * This macro is used to declare temporary ANSI buffer for Unicode to 87 * ANSI conversion, and should be put in declaration section of a block. 88 * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this 89 * macro will expand to nothing. 90 */ 67 91 # define PJ_DECL_ANSI_TEMP_BUF(buf,size) char buf[size]; 92 93 94 /** 95 * This macro will convert Unicode string to ANSI, when the platform's 96 * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero). 97 */ 68 98 # define PJ_NATIVE_TO_STRING(cs,buf,max) pj_unicode_to_ansi( \ 69 99 cs, wcslen(cs), \ … … 72 102 #else 73 103 104 /** 105 * This macro is used to declare temporary Unicode buffer for ANSI to 106 * Unicode conversion, and should be put in declaration section of a block. 107 * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this 108 * macro will expand to nothing. 109 */ 74 110 # define PJ_DECL_UNICODE_TEMP_BUF(var,size) 111 /** 112 * This macro will convert ANSI string to native, when the platform's 113 * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero). 114 */ 75 115 # define PJ_STRING_TO_NATIVE(s,buf,max) ((char*)s) 116 /** 117 * This macro is used to declare temporary ANSI buffer for Unicode to 118 * ANSI conversion, and should be put in declaration section of a block. 119 * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this 120 * macro will expand to nothing. 121 */ 76 122 # define PJ_DECL_ANSI_TEMP_BUF(buf,size) 123 /** 124 * This macro will convert Unicode string to ANSI, when the platform's 125 * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero). 126 */ 77 127 # define PJ_NATIVE_TO_STRING(cs,buf,max) ((char*)(const char*)cs) 78 128 … … 83 133 PJ_END_DECL 84 134 135 /* 136 * @} 137 */ 138 85 139 86 140 #endif /* __PJ_UNICODE_H__ */
Note: See TracChangeset
for help on using the changeset viewer.