Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore


Modified Files:
        ecore_str.c 


Log Message:
add doxy

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore/ecore_str.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ecore_str.c 13 Mar 2007 06:46:14 -0000      1.7
+++ ecore_str.c 21 May 2007 09:54:20 -0000      1.8
@@ -23,7 +23,13 @@
 #include "ecore_private.h"
 #include "Ecore_Data.h"
 
-/*
+/**
+ * @param dst the destination
+ * @param src the source
+ * @param siz the size of the destination
+ * @return the length of the source string
+ * @brief copy a c-string
+ *
  * Copy src to string dst of size siz.  At most siz-1 characters
  * will be copied.  Always NUL terminates (unless siz == 0).
  * Returns strlen(src); if retval >= siz, truncation occurred.
@@ -61,7 +67,13 @@
 #endif
 }
 
-/*
+/**
+ * @param dst the destination
+ * @param src the source
+ * @param siz the size of the destination
+ * @return the length of the source string plus MIN(siz, strlen(initial dst)) 
+ * @brief append a c-string
+ *
  * Appends src to string dst of size siz (unlike strncat, siz is the
  * full size of dst, not space left).  At most siz-1 characters
  * will be copied.  Always NUL terminates (unless siz <= strlen(dst)).
@@ -96,12 +108,17 @@
         return(dlen + (s - src));        /* count does not include NUL */
 }
 
-
+/**
+ * @param str the string to work with
+ * @param prefix the prefix to check for
+ * @return true if str has the given prefix
+ * @brief checks if the string has the given prefix
+ */
 int
 ecore_str_has_prefix(const char *str, const char *prefix)
 {
-   int str_len;
-   int prefix_len;
+   size_t str_len;
+   size_t prefix_len;
 
    CHECK_PARAM_POINTER_RETURN("str", str, 0);
    CHECK_PARAM_POINTER_RETURN("prefix", prefix, 0);
@@ -114,11 +131,17 @@
    return (strncmp(str, prefix, prefix_len) == 0);
 }
 
+/**
+ * @param str the string to work with
+ * @param suffix the suffix to check for
+ * @return true if str has the given suffix
+ * @brief checks if the string has the given suffix
+ */
 int
 ecore_str_has_suffix(const char *str, const char *suffix)
 {
-   int str_len;
-   int suffix_len;
+   size_t str_len;
+   size_t suffix_len;
 
    CHECK_PARAM_POINTER_RETURN("str", str, 0);
    CHECK_PARAM_POINTER_RETURN("suffix", suffix, 0);



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to