Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Improvements to several Lang.cpp functions
Re: Improvements to several Lang.cpp functions [message #20399 is a reply to message #20386] Tue, 17 March 2009 03:37 Go to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
I don't insist on using alloca(). Smile
I'm pretty sure alloca() doesn't exist on gaming consoles, but it exists in msvc, glibc (Linux and BSD).

Below is an implementation of alloca(), which I found in GLIBC.

# define alloca(size)	__builtin_alloca (size)

#ifndef NO_UNDERSCORES
#define __builtin_alloca ___builtin_alloca
#endif

ENTRY (__builtin_alloca)
	sub %sp, %o0, %sp	/* Push some stack space.  */
	retl			/* Return; the returned buffer leaves 96 */
	add %sp, 96, %o0	/* bytes of register save area at the top. */
END (__builtin_alloca) 


IMHO, using of alloca() is just safer and cleaner. But that is completely up to you.


Regards,
Novo

[Updated on: Tue, 17 March 2009 03:38]

Report message to a moderator

 
Read Message icon3.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: Basic character set analyzer
Next Topic: Russian tr file for SVN 963
Goto Forum:
  


Current Time: Thu May 16 14:49:33 CEST 2024

Total time taken to generate the page: 0.02748 seconds