fix doc for eina_str
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 7 Mar 2010 06:59:28 +0000 (06:59 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 7 Mar 2010 06:59:28 +0000 (06:59 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@46931 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/include/eina_inline_str.x
src/include/eina_str.h
src/lib/eina_str.c

index bcfdb5c..27b3540 100644 (file)
 #define EINA_STR_INLINE_H_
 
 /**
- * @addtogroup Eina_Str_Group Str
+ * @addtogroup Eina_String_Group String
  *
  * @{
  */
 
 /**
- * strlen() that will count up to maxlen bytes.
+ * @brief Count up to a given amount of bytes of the given string.
  *
- * If one wants to know the size of @a str, but it should not be
- * greater than @a maxlen, then use this function and avoid needless
- * iterations after that size.
- *
- * @param str the string pointer, must be valid and not @c NULL.
- * @param maxlen the maximum length to allow.
+ * @param str The string pointer.
+ * @param maxlen The maximum length to allow.
  * @return the string size or (size_t)-1 if greater than @a maxlen.
+ *
+ * This function returns the size of @p str, up to @p maxlen
+ * characters. It avoid needless iterations after that size. @p str
+ * must be a valid pointer and MUST not be @c NULL, otherwise this
+ * function will crash. This function returns the string size, or
+ * (size_t)-1 if the size is greater than @a maxlen.
  */
 static inline size_t
 eina_strlen_bounded(const char *str, size_t maxlen)
index 43a78d3..150365e 100644 (file)
@@ -7,8 +7,15 @@
 #include "eina_types.h"
 
 /**
- * @file eina_str.h
- * @brief Contains useful C string functions.
+ * @addtogroup Eina_Tools_Group Tools
+ *
+ * @{
+ */
+
+/**
+ * @defgroup Eina_String_Group String
+ *
+ * @{
  */
 
 /* 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
 
 #include "eina_inline_str.x"
 
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
 #endif /* EINA_STR_H */
index 6127994..cfdb228 100644 (file)
@@ -170,6 +170,14 @@ eina_str_split_full_helper(const char *str, const char *delim, int max_tokens, u
  *                                   API                                      *
  *============================================================================*/
 
+/**
+ * @addtogroup Eina_String_Group String
+ *
+ * @brief These functions provide useful C string management.
+ *
+ * @{
+ */
+
 
 /**
  * @brief Copy a c-string to another.
@@ -392,9 +400,9 @@ eina_str_split(const char *str, const char *delim, int max_tokens)
  * separate them with @p sep. The result is stored in the buffer
  * @p dst and at most @p size - 1 characters will be written and the
  * string is NULL-terminated. @p a_len is the length of @p a (not
- * including '\0') and @p b_len is the length of @p b (not including
- * '\0'). This function returns the number of characters printed (not
- * including the trailing '\0' used to end output to strings). Just
+ * including '\\0') and @p b_len is the length of @p b (not including
+ * '\\0'). This function returns the number of characters printed (not
+ * including the trailing '\\0' used to end output to strings). Just
  * like snprintf(), it will not write more than @p size bytes, thus a
  * returned value of @p size or more means that the output was
  * truncated.
@@ -548,3 +556,7 @@ eina_str_escape(const char *str)
    *d = 0;
    return s2;
 }
+
+/**
+ * @}
+ */