From 8f621792f7e321df325377487ea8193844044d07 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 21 Feb 2006 23:40:16 +0000 Subject: Added pj_ansi/native/unicode_snprintf, and added comment in errno.h git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@206 74dad513-b988-da41-8d7b-12977e46ad98 --- pjlib/include/pj/compat/string.h | 5 +++++ pjlib/include/pj/errno.h | 8 ++++++++ 2 files changed, 13 insertions(+) (limited to 'pjlib/include') diff --git a/pjlib/include/pj/compat/string.h b/pjlib/include/pj/compat/string.h index 3e4a429a..63cfdc51 100644 --- a/pjlib/include/pj/compat/string.h +++ b/pjlib/include/pj/compat/string.h @@ -42,6 +42,7 @@ # define strncasecmp strnicmp # endif # define snprintf _snprintf +# define snwprintf _snwprintf # define wcsicmp _wcsicmp # define wcsnicmp _wcsnicmp #else @@ -66,6 +67,7 @@ #define pj_ansi_strncasecmp strncasecmp #define pj_ansi_strnicmp strncasecmp #define pj_ansi_sprintf sprintf +#define pj_ansi_snprintf snprintf #define pj_unicode_strcmp wcscmp #define pj_unicode_strncmp wcsncmp @@ -79,6 +81,7 @@ #define pj_unicode_strncasecmp wcsnicmp #define pj_unicode_strnicmp wcsnicmp #define pj_unicode_sprintf swprintf +#define pj_unicode_snprintf snwprintf #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 @@ -94,6 +97,7 @@ # define pj_native_strncasecmp pj_unicode_strncasecmp # define pj_native_strnicmp pj_unicode_strnicmp # define pj_native_sprintf pj_unicode_sprintf +# define pj_native_snprintf pj_unicode_snprintf #else # define pj_native_strcmp pj_ansi_strcmp # define pj_native_strncmp pj_ansi_strncmp @@ -107,6 +111,7 @@ # define pj_native_strncasecmp pj_ansi_strncasecmp # define pj_native_strnicmp pj_ansi_strnicmp # define pj_native_sprintf pj_ansi_sprintf +# define pj_native_snprintf pj_ansi_snprintf #endif diff --git a/pjlib/include/pj/errno.h b/pjlib/include/pj/errno.h index 906d2053..eb3cd2ae 100644 --- a/pjlib/include/pj/errno.h +++ b/pjlib/include/pj/errno.h @@ -301,6 +301,14 @@ PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code, #define PJ_ERRNO_START_USER (PJ_ERRNO_START_SYS + PJ_ERRNO_SPACE_SIZE) +/* + * Below are list of error spaces that have been taken so far: + * - PJSIP_ERRNO_START (PJ_ERRNO_START_USER) + * - PJMEDIA_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE) + * - PJSIP_SIMPLE_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*2) + */ + + PJ_END_DECL #endif /* __PJ_ERRNO_H__ */ -- cgit v1.2.3