updates to c-functions.c

Madelyne's changes to c-functions.c. Should be up to date with her work
now, and hopefully will sync better now.