[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS gsasl/lib/src
From: |
gsasl-commit |
Subject: |
CVS gsasl/lib/src |
Date: |
Tue, 30 Nov 2004 04:04:41 +0100 |
Update of /home/cvs/gsasl/lib/src
In directory dopio:/tmp/cvs-serv2931
Modified Files:
saslprep.c
Log Message:
Improve API.
--- /home/cvs/gsasl/lib/src/saslprep.c 2004/11/30 02:51:30 1.2
+++ /home/cvs/gsasl/lib/src/saslprep.c 2004/11/30 03:04:41 1.3
@@ -24,10 +24,11 @@
#include <stringprep.h>
/**
- * gsasl_saslprep:
+ * gsasl_saslprep - prepare internationalized string
* @in: a UTF-8 encoded string.
- * @allowunassigned: whether to allow unassigned code points in the output.
+ * @flags: any SASLprep flag, e.g., %GSASL_ALLOW_UNASSIGNED.
* @out: on exit, contains newly allocated output string.
+ * @stringpreprc: if non-NULL, will hold precise stringprep return code.
*
* Prepare string using SASLprep. On success, the @out variable must
* be deallocated by the caller.
@@ -38,12 +39,18 @@
* Since: 0.2.3
**/
int
-gsasl_saslprep (const char *in, int allowunassigned, char **out)
+gsasl_saslprep (const char *in, Gsasl_saslprep_flags flags,
+ char **out, int *stringpreprc)
{
int rc;
rc = stringprep_profile (in, out, "SASLprep",
- allowunassigned ? STRINGPREP_NO_UNASSIGNED : 0);
+ (flags & GSASL_ALLOW_UNASSIGNED)
+ ? STRINGPREP_NO_UNASSIGNED : 0);
+
+ if (stringpreprc)
+ *stringpreprc = rc;
+
if (rc != STRINGPREP_OK)
{
*out = NULL;
- CVS gsasl/lib/src, (continued)
- CVS gsasl/lib/src, gsasl-commit, 2004/11/28
- CVS gsasl/lib/src, gsasl-commit, 2004/11/28
- CVS gsasl/lib/src, gsasl-commit, 2004/11/28
- CVS gsasl/lib/src, gsasl-commit, 2004/11/28
- CVS gsasl/lib/src, gsasl-commit, 2004/11/29
- CVS gsasl/lib/src, gsasl-commit, 2004/11/29
- CVS gsasl/lib/src, gsasl-commit, 2004/11/29
- CVS gsasl/lib/src, gsasl-commit, 2004/11/29
- CVS gsasl/lib/src, gsasl-commit, 2004/11/29
- CVS gsasl/lib/src, gsasl-commit, 2004/11/29
- CVS gsasl/lib/src,
gsasl-commit <=
- CVS gsasl/lib/src, gsasl-commit, 2004/11/29
- CVS gsasl/lib/src, gsasl-commit, 2004/11/30
- CVS gsasl/lib/src, gsasl-commit, 2004/11/30