Changeset 181 for pjproject/trunk/pjlib/include/pj/unicode.h
- Timestamp:
- Feb 14, 2006 9:03:15 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/unicode.h
r126 r181 21 21 22 22 #include <pj/types.h> 23 24 25 PJ_BEGIN_DECL 26 23 27 24 28 /** … … 57 61 #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 58 62 59 # define PJ_DECL_UNICODE_TEMP_BUF(buf,size) wchar_t buf[size]60 # define PJ_STRING_TO_NATIVE(s,buf )pj_ansi_to_unicode( \63 # define PJ_DECL_UNICODE_TEMP_BUF(buf,size) wchar_t buf[size]; 64 # define PJ_STRING_TO_NATIVE(s,buf,max) pj_ansi_to_unicode( \ 61 65 s, strlen(s), \ 62 buf, PJ_ARRAY_SIZE(buf)) 63 # define PJ_TEXT(s) _TEXT(s) 66 buf, max) 67 # define PJ_DECL_ANSI_TEMP_BUF(buf,size) char buf[size]; 68 # define PJ_NATIVE_TO_STRING(cs,buf,max) pj_unicode_to_ansi( \ 69 cs, wcslen(cs), \ 70 buf, max) 64 71 65 72 #else 66 73 67 74 # define PJ_DECL_UNICODE_TEMP_BUF(var,size) 68 # define PJ_STRING_TO_NATIVE(s, buf) (s) 69 # define PJ_TEXT(s) (s) 75 # define PJ_STRING_TO_NATIVE(s,buf,max) ((char*)s) 76 # define PJ_DECL_ANSI_TEMP_BUF(buf,size) 77 # define PJ_NATIVE_TO_STRING(cs,buf,max) ((char*)(const char*)cs) 70 78 71 79 #endif … … 73 81 74 82 83 PJ_END_DECL 84 85 75 86 #endif /* __PJ_UNICODE_H__ */
Note: See TracChangeset
for help on using the changeset viewer.