summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2010-03-07 06:59:28 +0000
committerVincent Torri <vincent.torri@gmail.com>2010-03-07 06:59:28 +0000
commit993b4a6960acf6a6e6e223794c835e73f2dc33d9 (patch)
treed89998082efd7bb1418a78a500ddb4c996e84ba2
parent3f465fc58b663c64aeeceb13d6da003dda716f15 (diff)
fix doc for eina_str
SVN revision: 46931
-rw-r--r--legacy/eina/src/include/eina_inline_str.x18
-rw-r--r--legacy/eina/src/include/eina_str.h19
-rw-r--r--legacy/eina/src/lib/eina_str.c18
3 files changed, 42 insertions, 13 deletions
diff --git a/legacy/eina/src/include/eina_inline_str.x b/legacy/eina/src/include/eina_inline_str.x
index bcfdb5c832..27b3540ce6 100644
--- a/legacy/eina/src/include/eina_inline_str.x
+++ b/legacy/eina/src/include/eina_inline_str.x
@@ -20,21 +20,23 @@
20#define EINA_STR_INLINE_H_ 20#define EINA_STR_INLINE_H_
21 21
22/** 22/**
23 * @addtogroup Eina_Str_Group Str 23 * @addtogroup Eina_String_Group String
24 * 24 *
25 * @{ 25 * @{
26 */ 26 */
27 27
28/** 28/**
29 * strlen() that will count up to maxlen bytes. 29 * @brief Count up to a given amount of bytes of the given string.
30 * 30 *
31 * If one wants to know the size of @a str, but it should not be 31 * @param str The string pointer.
32 * greater than @a maxlen, then use this function and avoid needless 32 * @param maxlen The maximum length to allow.
33 * iterations after that size.
34 *
35 * @param str the string pointer, must be valid and not @c NULL.
36 * @param maxlen the maximum length to allow.
37 * @return the string size or (size_t)-1 if greater than @a maxlen. 33 * @return the string size or (size_t)-1 if greater than @a maxlen.
34 *
35 * This function returns the size of @p str, up to @p maxlen
36 * characters. It avoid needless iterations after that size. @p str
37 * must be a valid pointer and MUST not be @c NULL, otherwise this
38 * function will crash. This function returns the string size, or
39 * (size_t)-1 if the size is greater than @a maxlen.
38 */ 40 */
39static inline size_t 41static inline size_t
40eina_strlen_bounded(const char *str, size_t maxlen) 42eina_strlen_bounded(const char *str, size_t maxlen)
diff --git a/legacy/eina/src/include/eina_str.h b/legacy/eina/src/include/eina_str.h
index 43a78d310c..150365e84b 100644
--- a/legacy/eina/src/include/eina_str.h
+++ b/legacy/eina/src/include/eina_str.h
@@ -7,8 +7,15 @@
7#include "eina_types.h" 7#include "eina_types.h"
8 8
9/** 9/**
10 * @file eina_str.h 10 * @addtogroup Eina_Tools_Group Tools
11 * @brief Contains useful C string functions. 11 *
12 * @{
13 */
14
15/**
16 * @defgroup Eina_String_Group String
17 *
18 * @{
12 */ 19 */
13 20
14/* strlcpy implementation for libc's lacking it */ 21/* strlcpy implementation for libc's lacking it */
@@ -74,4 +81,12 @@ static inline size_t eina_strlen_bounded(const char *str, size_t maxlen) EINA_PU
74 81
75#include "eina_inline_str.x" 82#include "eina_inline_str.x"
76 83
84/**
85 * @}
86 */
87
88/**
89 * @}
90 */
91
77#endif /* EINA_STR_H */ 92#endif /* EINA_STR_H */
diff --git a/legacy/eina/src/lib/eina_str.c b/legacy/eina/src/lib/eina_str.c
index 6127994846..cfdb228512 100644
--- a/legacy/eina/src/lib/eina_str.c
+++ b/legacy/eina/src/lib/eina_str.c
@@ -170,6 +170,14 @@ eina_str_split_full_helper(const char *str, const char *delim, int max_tokens, u
170 * API * 170 * API *
171 *============================================================================*/ 171 *============================================================================*/
172 172
173/**
174 * @addtogroup Eina_String_Group String
175 *
176 * @brief These functions provide useful C string management.
177 *
178 * @{
179 */
180
173 181
174/** 182/**
175 * @brief Copy a c-string to another. 183 * @brief Copy a c-string to another.
@@ -392,9 +400,9 @@ eina_str_split(const char *str, const char *delim, int max_tokens)
392 * separate them with @p sep. The result is stored in the buffer 400 * separate them with @p sep. The result is stored in the buffer
393 * @p dst and at most @p size - 1 characters will be written and the 401 * @p dst and at most @p size - 1 characters will be written and the
394 * string is NULL-terminated. @p a_len is the length of @p a (not 402 * string is NULL-terminated. @p a_len is the length of @p a (not
395 * including '\0') and @p b_len is the length of @p b (not including 403 * including '\\0') and @p b_len is the length of @p b (not including
396 * '\0'). This function returns the number of characters printed (not 404 * '\\0'). This function returns the number of characters printed (not
397 * including the trailing '\0' used to end output to strings). Just 405 * including the trailing '\\0' used to end output to strings). Just
398 * like snprintf(), it will not write more than @p size bytes, thus a 406 * like snprintf(), it will not write more than @p size bytes, thus a
399 * returned value of @p size or more means that the output was 407 * returned value of @p size or more means that the output was
400 * truncated. 408 * truncated.
@@ -548,3 +556,7 @@ eina_str_escape(const char *str)
548 *d = 0; 556 *d = 0;
549 return s2; 557 return s2;
550} 558}
559
560/**
561 * @}
562 */