(output_prolog): Use multiple fputs calls instead of