Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_text.c 


Log Message:
- cleanup
- add doxy

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_text.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -3 -r1.107 -r1.108
--- ewl_text.c  30 Jun 2006 00:00:20 -0000      1.107
+++ ewl_text.c  30 Jun 2006 00:46:41 -0000      1.108
@@ -2186,6 +2186,62 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
+/**
+ * @param text: The text to work with
+ * @param pos: The position to move too
+ * @return Returns the position to use
+ * @brief Finds the actual text position to move to when you select the @a
+ * pos
+ */
+unsigned int
+ewl_text_utf_char_position_next(const char *text, unsigned int pos)
+{
+       const unsigned char *t;
+       int len;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("text", text, 0);
+
+       if (text[0] == '\0')
+               DRETURN_INT(0, DLEVEL_STABLE);
+
+       t = text;
+       len = strlen(text);
+
+       while ((t[pos] >= 0x80) && (t[pos] <= 0xbf) && (pos < len));
+               pos++;
+
+       DRETURN_INT(pos, DLEVEL_STABLE);
+}
+
+/**
+ * @param text: The text to work with
+ * @param pos: The position to move too
+ * @return Returns the position to use
+ * @brief Finds the actual text position to move to when you select the @a
+ * pos
+ */
+unsigned int
+ewl_text_utf_char_position_prev(const char *text, unsigned int pos)
+{
+       const unsigned char *t;
+       int len;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET("text", text, 0);
+
+       if (text[0] == '\0')
+               DRETURN_INT(0, DLEVEL_STABLE);
+
+       t = text;
+       len = strlen(text);
+
+       while ((t[pos] >= 0x80) && (t[pos] <= 0xbf) && (pos < len));
+               pos--;
+
+       DRETURN_INT(pos, DLEVEL_STABLE);
+}
+
 static void
 ewl_text_display(Ewl_Text *t)
 {
@@ -2972,48 +3028,6 @@
        FREE(appearance);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-unsigned int
-ewl_text_utf_char_position_next(const char *text, unsigned int pos)
-{
-       const unsigned char *t;
-       int len;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR_RET("text", text, 0);
-
-       if (text[0] == '\0')
-               DRETURN_INT(0, DLEVEL_STABLE);
-
-       t = text;
-       len = strlen(text);
-
-       while ((t[pos] >= 0x80) && (t[pos] <= 0xbf) && (pos < len));
-               pos++;
-
-       DRETURN_INT(pos, DLEVEL_STABLE);
-}
-
-unsigned int
-ewl_text_utf_char_position_prev(const char *text, unsigned int pos)
-{
-       const unsigned char *t;
-       int len;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR_RET("text", text, 0);
-
-       if (text[0] == '\0')
-               DRETURN_INT(0, DLEVEL_STABLE);
-
-       t = text;
-       len = strlen(text);
-
-       while ((t[pos] >= 0x80) && (t[pos] <= 0xbf) && (pos < len));
-               pos--;
-
-       DRETURN_INT(pos, DLEVEL_STABLE);
 }
 
 /*



Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to