From 49e157ecd1e5d38641f805e1e0a379c66b3dd27c Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 5 May 2011 11:31:30 +0000 Subject: [PATCH] report all extensions and stuff --- panda/src/pgraph/loaderFileTypeRegistry.cxx | 26 ++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/panda/src/pgraph/loaderFileTypeRegistry.cxx b/panda/src/pgraph/loaderFileTypeRegistry.cxx index 742cd20014..962effcafc 100644 --- a/panda/src/pgraph/loaderFileTypeRegistry.cxx +++ b/panda/src/pgraph/loaderFileTypeRegistry.cxx @@ -61,7 +61,9 @@ register_type(LoaderFileType *type) { _types.push_back(type); - record_extension(type->get_extension(), type); + if (!type->get_extension().empty()) { + record_extension(type->get_extension(), type); + } vector_string words; extract_words(type->get_additional_extensions(), words); @@ -208,8 +210,26 @@ write(ostream &out, int indent_level) const { LoaderFileType *type = (*ti); string name = type->get_name(); indent(out, indent_level) << name; - indent(out, max(30 - (int)name.length(), 0)) - << " ." << type->get_extension() << "\n"; + indent(out, max(30 - (int)name.length(), 0)) << " "; + + bool comma = false; + if (!type->get_extension().empty()) { + out << " ." << type->get_extension(); + comma = true; + } + + vector_string words; + extract_words(type->get_additional_extensions(), words); + vector_string::const_iterator wi; + for (wi = words.begin(); wi != words.end(); ++wi) { + if (comma) { + out << ","; + } else { + comma = true; + } + out << " ." << *wi; + } + out << "\n"; } }