Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
text.c
Log Message:
Remove unnecessary function.
===================================================================
RCS file: /cvs/e/e16/e/src/text.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- text.c 29 Mar 2006 19:13:17 -0000 1.63
+++ text.c 30 Mar 2006 20:56:05 -0000 1.64
@@ -109,37 +109,6 @@
return NULL;
}
-static char **
-TextGetLines(const char *text, int *count)
-{
- int i, j, k;
- char **list = NULL;
-
- *count = 0;
- i = 0;
- k = 0;
- if (!text)
- return NULL;
- *count = 1;
- while (text[i])
- {
- j = i;
- while ((text[j]) && (text[j] != '\n'))
- j++;
- k++;
- list = Erealloc(list, sizeof(char *) * k);
- list[k - 1] = Emalloc(sizeof(char) * (j - i + 1));
-
- strncpy(list[k - 1], &(text[i]), (j - i));
- list[k - 1][j - i] = 0;
- i = j;
- if (text[i] == '\n')
- i++;
- }
- *count = k;
- return list;
-}
-
static void
TextStateLoadFont(TextState * ts)
{
@@ -240,7 +209,7 @@
/* Do encoding conversion, if necessary */
str = EstrInt2Enc(text, ts->need_utf8);
- lines = TextGetLines(str, &num_lines);
+ lines = StrlistFromString(str, '\n', &num_lines);
EstrInt2EncFree(str, ts->need_utf8);
if (!lines)
return;
@@ -319,7 +288,7 @@
/* Do encoding conversion, if necessary */
str = EstrInt2Enc(text, ts->need_utf8);
- lines = TextGetLines(str, &num_lines);
+ lines = StrlistFromString(str, '\n', &num_lines);
EstrInt2EncFree(str, ts->need_utf8);
if (!lines)
return;
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs