Fix problem with data type narrowing from 'unsigned char' to 'char'

The explicit list of 8 bit numbers in the files tool0, tool1, etc
were stored in arrays of char. However, they contain values larger than 127,
which is illegal in C++11 -- the type must be unsigned char.
On the other hand, the char arrays are handed to X, which really does
expect signed char.
The patch fixes the problem by changing the types to unsigned char,
and explicitly casting the arguments of the X calls.