summaryrefslogtreecommitdiff
path: root/source4/lib/util/util_unistr.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-02-28 13:12:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:52:09 -0500
commitaa04388943fe5d7d8c873a6ee8a4cc9af2491532 (patch)
tree8073b268875c22e8e0785ddffef42fcf3af3dac1 /source4/lib/util/util_unistr.c
parent4d3cc7384338fe2182a2029c2e6d2fcca2ec8813 (diff)
downloadsamba-aa04388943fe5d7d8c873a6ee8a4cc9af2491532.tar.gz
samba-aa04388943fe5d7d8c873a6ee8a4cc9af2491532.tar.bz2
samba-aa04388943fe5d7d8c873a6ee8a4cc9af2491532.zip
r13752: Add doxyfile and fix formatting of comments. Current output is available at http://samba.org/~jelmer/util-api/
(This used to be commit 90812203df151a5e62394306827c72adfe13c63c)
Diffstat (limited to 'source4/lib/util/util_unistr.c')
-rw-r--r--source4/lib/util/util_unistr.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/source4/lib/util/util_unistr.c b/source4/lib/util/util_unistr.c
index b35822877c..81aa0d6752 100644
--- a/source4/lib/util/util_unistr.c
+++ b/source4/lib/util/util_unistr.c
@@ -22,6 +22,11 @@
#include "includes.h"
#include "system/iconv.h"
+/**
+ * @file
+ * @brief Unicode string manipulation
+ */
+
/* these 2 tables define the unicode case handling. They are loaded
at startup either via mmap() or read() from the lib directory */
static void *upcase_table;
@@ -58,9 +63,9 @@ static void load_case_tables(void)
}
}
-/*******************************************************************
+/**
Convert a codepoint_t to upper case.
-********************************************************************/
+**/
codepoint_t toupper_w(codepoint_t val)
{
if (val < 128) {
@@ -78,9 +83,9 @@ codepoint_t toupper_w(codepoint_t val)
return SVAL(upcase_table, val*2);
}
-/*******************************************************************
+/**
Convert a codepoint_t to lower case.
-********************************************************************/
+**/
codepoint_t tolower_w(codepoint_t val)
{
if (val < 128) {
@@ -98,10 +103,10 @@ codepoint_t tolower_w(codepoint_t val)
return SVAL(lowcase_table, val*2);
}
-/*******************************************************************
+/**
return the number of bytes occupied by a buffer in CH_UTF16 format
the result includes the null termination
-********************************************************************/
+**/
size_t utf16_len(const void *buf)
{
size_t len;
@@ -111,11 +116,11 @@ size_t utf16_len(const void *buf)
return len + 2;
}
-/*******************************************************************
+/**
return the number of bytes occupied by a buffer in CH_UTF16 format
the result includes the null termination
limited by 'n' bytes
-********************************************************************/
+**/
size_t utf16_len_n(const void *src, size_t n)
{
size_t len;
@@ -137,7 +142,7 @@ size_t ucs2_align(const void *base_ptr, const void *p, int flags)
return PTR_DIFF(p, base_ptr) & 1;
}
-/*
+/**
compare two codepoints case insensitively
*/
int codepoint_cmpi(codepoint_t c1, codepoint_t c2)