When memory mapping is not available, the mapfile module was using readoutput() to slurp the file contents. This metafies the contents (which is necessary for return as a parameter value) but has the side-effect of dropping trailing newlines. Src/input.c has another file-slurping function stuff() which has the side-effect of loading the input buffer. This patch separates the guts of stuff() into a separately-callable function and uses that in mapfile.c to preserve the newlines.