Vadik Mironov wrote:
Четверг 02 Сентябрь 2004 22:41, Kim Woelders написал:


        1. The allocation on the stack around 16 kilobytes is not a god idea,
because stack was invented for function calls and recursion , but not for
storing data. And this could theoretically lead to a problem in general
case, if system cannot allocate such a big chunk on the stack.

We may be using a bit more stack space than necessary, but I doubt this causes any problems in E in real life. This construction is used throughout E's parsing code and recursion is never very deep. It is also vastly faster and less error prone than allocating memory dynamically. I don't agree with the "storing data" issue. The stack is the perfect place to store (moderate amounts of) data temporarily.



Point taken. But i hope if i continue to write malloced code, it will be not count as an act of disobeying :-)
That depends on the context.


hopefully nothing,  but still this two functions word and fword are not
safe, scanf("%<num>n") is better, but it is not an easy tool for string
parsing. If somebody protected eesh from buffer smashing, then it is
fine, but still i'm suspicious in using word and fword anyway (and of
course i believe there is no suid binaries in disributions :-)).

If word() or fword() are broken they should be fixed. The solution is not to introduce yet another string parsing function.



Agreed, but getword already there.
No, actually it's just gone :) fword() *is* used. And there should be
only one function doing this type of parsing!

I will look at this functions, hopefully do something.

That would make sense to me.

/Kim


------------------------------------------------------- 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_idP47&alloc_id808&op=click _______________________________________________ enlightenment-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to