libmp: update of library functions and test program.