Added C version.