Changeset 182 for pjproject/trunk/pjlib/include/pj/compat/string.h
- Timestamp:
- Feb 14, 2006 9:04:47 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/compat/string.h
r125 r182 25 25 */ 26 26 27 /** 28 * Native char type, which will be equal to wchar_t for Unicode 29 * and char for ANSI. 30 */ 31 #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 32 typedef wchar_t pj_char_t; 33 #else 34 typedef char pj_char_t; 35 #endif 36 27 37 #if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H != 0 28 38 # include <string.h> … … 42 52 # endif 43 53 # define snprintf _snprintf 54 # define wcsicmp _wcsicmp 55 # define wcsnicmp _wcsnicmp 44 56 #else 45 57 # define stricmp strcasecmp 46 58 # define strnicmp strncasecmp 59 60 # if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 61 # error "Implement Unicode string functions" 62 # endif 47 63 #endif 48 64 49 65 50 #define pj_native_strcmp strcmp 51 #define pj_native_strncmp strncmp 52 #define pj_native_strlen strlen 53 #define pj_native_strcpy strcpy 54 #define pj_native_strstr strstr 55 #define pj_native_strchr strchr 56 #define pj_native_strcasecmp strcasecmp 57 #define pj_native_stricmp strcasecmp 58 #define pj_native_strncasecmp strncasecmp 59 #define pj_native_strnicmp strncasecmp 66 #define pj_ansi_strcmp strcmp 67 #define pj_ansi_strncmp strncmp 68 #define pj_ansi_strlen strlen 69 #define pj_ansi_strcpy strcpy 70 #define pj_ansi_strcat strcat 71 #define pj_ansi_strstr strstr 72 #define pj_ansi_strchr strchr 73 #define pj_ansi_strcasecmp strcasecmp 74 #define pj_ansi_stricmp strcasecmp 75 #define pj_ansi_strncasecmp strncasecmp 76 #define pj_ansi_strnicmp strncasecmp 77 #define pj_ansi_sprintf sprintf 78 79 #define pj_unicode_strcmp wcscmp 80 #define pj_unicode_strncmp wcsncmp 81 #define pj_unicode_strlen wcslen 82 #define pj_unicode_strcpy wcscpy 83 #define pj_unicode_strcat wcscat 84 #define pj_unicode_strstr wcsstr 85 #define pj_unicode_strchr wcschr 86 #define pj_unicode_strcasecmp wcsicmp 87 #define pj_unicode_stricmp wcsicmp 88 #define pj_unicode_strncasecmp wcsnicmp 89 #define pj_unicode_strnicmp wcsnicmp 90 #define pj_unicode_sprintf swprintf 91 92 93 #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 94 # define pj_native_strcmp pj_unicode_strcmp 95 # define pj_native_strncmp pj_unicode_strncmp 96 # define pj_native_strlen pj_unicode_strlen 97 # define pj_native_strcpy pj_unicode_strcpy 98 # define pj_native_strcat pj_unicode_strcat 99 # define pj_native_strstr pj_unicode_strstr 100 # define pj_native_strchr pj_unicode_strchr 101 # define pj_native_strcasecmp pj_unicode_strcasecmp 102 # define pj_native_stricmp pj_unicode_stricmp 103 # define pj_native_strncasecmp pj_unicode_strncasecmp 104 # define pj_native_strnicmp pj_unicode_strnicmp 105 # define pj_native_sprintf pj_unicode_sprintf 106 #else 107 # define pj_native_strcmp pj_ansi_strcmp 108 # define pj_native_strncmp pj_ansi_strncmp 109 # define pj_native_strlen pj_ansi_strlen 110 # define pj_native_strcpy pj_ansi_strcpy 111 # define pj_native_strcat pj_ansi_strcat 112 # define pj_native_strstr pj_ansi_strstr 113 # define pj_native_strchr pj_ansi_strchr 114 # define pj_native_strcasecmp pj_ansi_strcasecmp 115 # define pj_native_stricmp pj_ansi_stricmp 116 # define pj_native_strncasecmp pj_ansi_strncasecmp 117 # define pj_native_strnicmp pj_ansi_strnicmp 118 # define pj_native_sprintf pj_ansi_sprintf 119 #endif 120 60 121 61 122 #endif /* __PJ_COMPAT_STRING_H__ */
Note: See TracChangeset
for help on using the changeset viewer.