emulators/cpmtools: stdify the old source code
This source code used to compile for about 40 years now since its
original creation.
Now, C compilers no longer compile traditional (= pre-C89) source
code, so a large patch was needed to add function prototypes.