More fixes for C++

C++ complains about a type mismatch on the mode parameter on all these
functions.  Changed from byte to int.