log-merging program written in good old ASCII C