On Tue, Nov 22, 2005 at 05:49:49PM +1100, Benno wrote: > I can't actually find it in the C spec but from googling it does appear > that string literals are constants with static storage duration which > means they have lifetime of the program. > > (But I still wouldn't use that style, it is confusing at best.)
I've used it for error messages; a 0 return means ok, non-0 is an error message to be spat out. I'm sure I've seen gnu software use it too; possibly even this way. fwiw, I'm far from sure it's a great idea, but it sure beats mallocing something that is never going to be changed. -- Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
