change parameters to unsigned char. cast arguments in calls to standard lib to
char *.