reformat the source code

this was done semi-automatically. The line length has been set to 80
characters, but with a quite low penalty for crossing this limit.