Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin Modified Files: main.c Log Message: - add text tutorial - fix up * handling in tutorial parser =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/main.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- main.c 12 Mar 2006 01:42:16 -0000 1.21 +++ main.c 12 Mar 2006 06:01:46 -0000 1.22 @@ -631,15 +631,21 @@ } else if (*ptr2 == '*') { - char *prev; + char *prev, tmp; prev = ptr2; while ((*ptr2 == '*') || (*ptr2 == ' ')) ptr2 --; - *(++ptr2) = '\0'; + + if (*ptr2 != '\n') + ptr2 = prev; + + tmp = *(++ptr2); + *ptr2 = '\0'; if (ptr2 > ptr) ewl_text_text_append(tutorial, ptr); + *ptr2 = tmp; ptr2 = prev; /* we're done if we have a / */ @@ -660,6 +666,7 @@ || (!strncmp(ptr2, "section", 7))) { int size = 14; + char t; if (!strncmp(ptr2, "addtogroup", 10)) size = 18; @@ -669,13 +676,15 @@ while (*tmp != ' ') tmp --; tmp ++; + t = *ptr2; *ptr2 = '\0'; ewl_text_font_size_set(tutorial, size); ewl_text_text_append(tutorial, tmp); ewl_text_text_append(tutorial, "\n"); ewl_text_font_size_set(tutorial, 10); - + + *ptr2 = t; ptr2 ++; } else if (!strncmp(ptr2, "code", 4)) ------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs