summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-02-21 23:40:16 +0000
committerBenny Prijono <bennylp@teluu.com>2006-02-21 23:40:16 +0000
commit8f621792f7e321df325377487ea8193844044d07 (patch)
tree57967c81e5c552fe24516aa75891913cf68517df
parent0d81e067197a673a11e69ed71ac3c52e71fa5cdc (diff)
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
-rw-r--r--pjlib/include/pj/compat/string.h5
-rw-r--r--pjlib/include/pj/errno.h8
2 files changed, 13 insertions, 0 deletions
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__ */