I've looked through my HDD for those terrain deformation and painting demos (from NeoNeper), and luckely I've found
them! In the archive you can also find 'saveLoad.c' file, with two function, one to save terrain vertex positions into the .txt file, and another one to load them back (this was done before
save hmp file dll was created and contributed by Wjbender).
Best regards!