See this FAQ: http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1048384537&id=1043284392