Enlightenment CVS committal
Author : dj2
Project : e17
Module : proto
Dir : e17/proto/edje_cc
Modified Files:
edje.l
Log Message:
make script work again
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/edje_cc/edje.l,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- edje.l 8 Sep 2004 06:22:49 -0000 1.18
+++ edje.l 8 Sep 2004 06:39:02 -0000 1.19
@@ -29,10 +29,14 @@
#define SCRIPT_PIECE() if (script == NULL) { \
script =
strdup(yytext); \
- /*} else { \
- realloc(script,
strlen(script) + yyleng + 1); \
- strncat(script,
yytext, yyleng); \
- */}
+ } else { \
+ char *t = NULL; \
+ int len =
strlen(script) + yyleng + 1; \
+ t = (char
*)malloc(sizeof(char) * len); \
+ snprintf(t, len,
"%s%s", script, yytext); \
+ free(script); \
+ script = t; \
+ }
#define SCRIPT_NEW_LINE() lnum ++; SCRIPT_PIECE();
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs