--- v0.106.orig\src\info.h 2006-04-10 11:47:56.031023000 -0500 +++ v0.106\src\info.h 2006-06-23 08:49:53.429012700 -0500 @@ -17,6 +17,6 @@ #include "mamecore.h" /* Print the MAME database in XML format */ -void print_mame_xml(FILE* out, const game_driver* const games[]); +void print_mame_xml(FILE* out, const game_driver* const games[], const char *gamename); #endif /* __INFO_H__ */ --- v0.106.orig\src\info.c 2006-04-13 09:53:54.066583000 -0500 +++ v0.106\src\info.c 2006-06-23 09:00:26.555717200 -0500 @@ -884,8 +884,27 @@ #endif } -/* Print the MAME database in XML format */ -void print_mame_xml(FILE* out, const game_driver* const games[]) +static void print_mame_small_data(FILE* out, const game_driver* const games[],const char *game_name) +{ + int j; + + /* print only the games that match the game name */ + for(j=0;games[j];++j) + { + if (strcmp(games[j]->name,game_name)==0) + print_game_info(out, games[j]); + } +#if !defined(MESS) + /* print resources */ + for (j=0;games[j];++j) + { + if (strcmp(games[j]->name,game_name)==0) + print_resource_info(out, games[j]); + } +#endif +} + +void print_mame_xml_header(FILE *out) { fprintf(out, "\n" @@ -985,8 +1004,16 @@ "<" XML_ROOT " build=\"%s\">\n", normalize_string(build_version) ); +} - print_mame_data(out, games); - +/* Print the MAME database in XML format */ +void print_mame_xml(FILE* out, const game_driver* const games[], const char *gamename) +{ + print_mame_xml_header(out); + if (strcmp(gamename,"*")!=0) + print_mame_small_data(out,games,gamename); + else + print_mame_data(out, games); fprintf(out, "\n"); } + --- v0.106.orig\src\windows\fronthlp.c 2006-05-04 00:59:07.132621000 -0500 +++ v0.106\src\windows\fronthlp.c 2006-06-23 08:56:54.568781200 -0500 @@ -28,7 +28,7 @@ enum { LIST_XML = 1, LIST_FULL, LIST_ROMS, LIST_SAMPLES, LIST_CLONES, LIST_CRC, - LIST_CPU, LIST_CPUCLASS, LIST_SOURCEFILE, + LIST_CPU, LIST_CPUCLASS, LIST_SOURCEFILE, }; #else #include "infomess.h" @@ -36,7 +36,7 @@ LIST_CLONES, LIST_CRC, LIST_SOURCEFILE, - LIST_MESSDEVICES }; + LIST_MESSDEVICES }; #endif #define VERIFY_ROMS 0x00000001 @@ -80,6 +80,7 @@ static int silentident,knownstatus,identfiles,identmatches,identnonroms; +void print_mame_small_xml( FILE *, const game_driver * const [], const char *); /* compare string[8] using standard(?) DOS wildchars ('?' & '*') */ @@ -609,7 +610,7 @@ break; case LIST_XML: /* list all info */ - print_mame_xml( stdout, drivers ); + print_mame_xml( stdout, drivers, gamename ); return 0; }