diff options
Diffstat (limited to 'src/emu/info.cpp')
-rw-r--r-- | src/emu/info.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/emu/info.cpp b/src/emu/info.cpp index 111022ae223..4bae0daf37a 100644 --- a/src/emu/info.cpp +++ b/src/emu/info.cpp @@ -19,9 +19,6 @@ #include <ctype.h> -#define XML_ROOT "mame" -#define XML_TOP "machine" - //************************************************************************** // GLOBAL VARIABLES //************************************************************************** @@ -191,15 +188,15 @@ info_xml_creator::info_xml_creator(driver_enumerator &drivlist) // for all known games //------------------------------------------------- -void info_xml_creator::output(FILE *out, bool nodevices) +void info_xml_creator::output(FILE *out) { m_output = out; // output the DTD fprintf(m_output, "<?xml version=\"1.0\"?>\n"); std::string dtd(s_dtd_string); - strreplace(dtd, "__XML_ROOT__", XML_ROOT); - strreplace(dtd, "__XML_TOP__", XML_TOP); + strreplace(dtd, "__XML_ROOT__", emulator_info::get_xml_root()); + strreplace(dtd, "__XML_TOP__", emulator_info::get_xml_top()); fprintf(m_output, "%s\n\n", dtd.c_str()); @@ -211,7 +208,7 @@ void info_xml_creator::output(FILE *out, bool nodevices) "no" #endif "\" mameconfig=\"%d\">\n", - XML_ROOT, + emulator_info::get_xml_root(), xml_normalize_string(build_version), CONFIG_VERSION ); @@ -221,11 +218,10 @@ void info_xml_creator::output(FILE *out, bool nodevices) output_one(); // output devices (both devices with roms and slot devices) - if (!nodevices) - output_devices(); + output_devices(); // close the top level tag - fprintf(m_output, "</%s>\n",XML_ROOT); + fprintf(m_output, "</%s>\n",emulator_info::get_xml_root()); } @@ -250,7 +246,7 @@ void info_xml_creator::output_one() portlist.append(*device, errors); // print the header and the game name - fprintf(m_output, "\t<%s",XML_TOP); + fprintf(m_output, "\t<%s",emulator_info::get_xml_top()); fprintf(m_output, " name=\"%s\"", xml_normalize_string(driver.name)); // strip away any path information from the source_file and output it @@ -312,7 +308,7 @@ void info_xml_creator::output_one() output_ramoptions(); // close the topmost tag - fprintf(m_output, "\t</%s>\n",XML_TOP); + fprintf(m_output, "\t</%s>\n",emulator_info::get_xml_top()); } @@ -344,7 +340,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag) } // start to output info - fprintf(m_output, "\t<%s", XML_TOP); + fprintf(m_output, "\t<%s", emulator_info::get_xml_top()); fprintf(m_output, " name=\"%s\"", xml_normalize_string(device.shortname())); std::string src(device.source()); strreplace(src,"../", ""); @@ -371,7 +367,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag) output_adjusters(portlist); output_images(device, devtag); output_slots(device, devtag); - fprintf(m_output, "\t</%s>\n", XML_TOP); + fprintf(m_output, "\t</%s>\n", emulator_info::get_xml_top()); } |