Minor changes to avoid compilation and link errors:

1) changed some "char *" to "const char *" to avoid problems with C++

2) made one trivial function (that was defined in a header file) inline to avoid linker
issues when more than one source file includes the header file.