Rename write_corpus_to_native_xml into write_corpus
authorDodji Seketeli <dodji@redhat.com>
Tue, 4 Apr 2017 18:37:43 +0000 (20:37 +0200)
committerDodji Seketeli <dodji@redhat.com>
Mon, 3 Jul 2017 15:45:39 +0000 (17:45 +0200)
Rename write_corpus_to_native_xml into write_corpus because it's a
better name.

* include/abg-writer.h (write_corpus): Rename
write_corpus_to_native_xml to this.
* src/abg-writer.cc (write_corpus): Rename
write_corpus_to_native_xml to this.
* tests/test-read-dwarf.cc (test_task::perform): Adjust.
* tests/test-read-write.cc: Remove a useless "using
abigail::xml_writer::write_corpus_to_native_xml".
* tools/abidw.cc (main): Adjust.
* tools/abilint.cc (main): Adjust.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-writer.h
src/abg-writer.cc
tests/test-read-dwarf.cc
tests/test-read-write.cc
tools/abidw.cc
tools/abilint.cc

index 75bd894a766fc1d1aff23aa91bf841ee1534df19..b393e285f16ff7f1238eaffa1bb1d00452e75b1e 100644 (file)
@@ -67,16 +67,16 @@ write_corpus_to_archive(const corpus_sptr corp,
                        const bool annotate = false);
 
 bool
-write_corpus_to_native_xml(const corpus_sptr   corpus,
-                          unsigned             indent,
-                          std::ostream&        out,
-                          const bool           annotate = false);
+write_corpus(const corpus_sptr corpus,
+            unsigned           indent,
+            std::ostream&      out,
+            const bool annotate = false);
 
 bool
-write_corpus_to_native_xml_file(const corpus_sptr      corpus,
-                               unsigned                indent,
-                               const string&           path,
-                               const bool              annotate = false);
+write_corpus(const corpus_sptr corpus,
+            unsigned           indent,
+            const string&      path,
+            const bool annotate = false);
 
 }// end namespace xml_writer
 }// end namespace abigail
index a463efc0f99542d10a798b55f69584aabb50f6bf..268d845529442e6e1fb85c6362b3a84a57e02b92 100644 (file)
@@ -3859,10 +3859,10 @@ write_corpus_to_archive(const corpus_sptr corp, const bool annotate)
 ///
 /// @return true upon successful completion, false otherwise.
 bool
-write_corpus_to_native_xml(const corpus_sptr   corpus,
-                          unsigned             indent,
-                          std::ostream&        out,
-                          const bool           annotate)
+write_corpus(const corpus_sptr corpus,
+            unsigned           indent,
+            std::ostream&      out,
+            const bool annotate)
 {
   if (!corpus)
     return false;
@@ -3951,10 +3951,10 @@ write_corpus_to_native_xml(const corpus_sptr    corpus,
 ///
 /// @return true upon successful completion, false otherwise.
 bool
-write_corpus_to_native_xml_file(const corpus_sptr      corpus,
-                               unsigned                indent,
-                               const string&           path,
-                                const bool             annotate)
+write_corpus(const corpus_sptr corpus,
+            unsigned           indent,
+            const string&      path,
+            const bool annotate)
 {
     bool result = true;
 
@@ -3967,7 +3967,7 @@ write_corpus_to_native_xml_file(const corpus_sptr corpus,
          return false;
        }
 
-      if (!write_corpus_to_native_xml(corpus, indent, of, annotate))
+      if (!write_corpus(corpus, indent, of, annotate))
        {
          cerr << "failed to access " << path << "\n";
          result = false;
index 349b1a5c1119419f591f1b27552774df67425722..60a2ec388859055cf45ed6a2d391496b4cfd5b44 100644 (file)
@@ -315,7 +315,7 @@ struct test_task : public abigail::workers::task
        return;
       }
     is_ok =
-      abigail::xml_writer::write_corpus_to_native_xml(corp, /*indent=*/0, of);
+      abigail::xml_writer::write_corpus(corp, /*indent=*/0, of);
     of.close();
 
     string abidw = string(get_build_dir()) + "/tools/abidw";
index 0347573fe2d74f22a30f92425896d1efdb0f57a6..8a312af5b68fcb6b53adbb597142904d695a4d93 100644 (file)
@@ -53,7 +53,7 @@ using abigail::corpus_sptr;
 using abigail::xml_reader::read_translation_unit_from_file;
 using abigail::xml_reader::read_corpus_from_native_xml_file;
 using abigail::xml_writer::write_translation_unit;
-using abigail::xml_writer::write_corpus_to_native_xml;
+using abigail::xml_writer::write_corpus;
 
 using abigail::workers::queue;
 using abigail::workers::task;
index 863c7c0de6583c6fa7e6a0e27cafc13649c8ce36..12119d12cc8e6af345a77f6923568d06aa218460 100644 (file)
@@ -68,7 +68,7 @@ using abigail::comparison::corpus_diff_sptr;
 using abigail::comparison::compute_diff;
 using abigail::comparison::diff_context_sptr;
 using abigail::comparison::diff_context;
-using abigail::xml_writer::write_corpus_to_native_xml;
+using abigail::xml_writer::write_corpus;
 using abigail::xml_reader::read_corpus_from_native_xml_file;
 using abigail::dwarf_reader::read_context;
 using abigail::dwarf_reader::read_context_sptr;
@@ -472,7 +472,7 @@ main(int argc, char* argv[])
          // it back, and compare the ABI of what we've read back
          // against the ABI of the input ELF file.
          temp_file_sptr tmp_file = temp_file::create();
-         write_corpus_to_native_xml(corp, 0, tmp_file->get_stream(), opts.annotate);
+         write_corpus(corp, 0, tmp_file->get_stream(), opts.annotate);
          tmp_file->get_stream().flush();
          corpus_sptr corp2 =
            read_corpus_from_native_xml_file(tmp_file->get_path(),
@@ -515,12 +515,12 @@ main(int argc, char* argv[])
                << opts.out_file_path << "'\n";
              return 1;
            }
-         abigail::xml_writer::write_corpus_to_native_xml(corp, 0, of, opts.annotate);
+         abigail::xml_writer::write_corpus(corp, 0, of, opts.annotate);
          of.close();
          return 0;
        }
       else
-       abigail::xml_writer::write_corpus_to_native_xml(corp, 0, cout, opts.annotate);
+       abigail::xml_writer::write_corpus(corp, 0, cout, opts.annotate);
     }
 
   return 0;
index e715acdfef268cc0c1dbec3e584855c09bdb95c8..50c135022699498f53ecf756f4b57748acfadd4f 100644 (file)
@@ -67,7 +67,7 @@ using abigail::xml_reader::read_corpus_from_native_xml;
 using abigail::xml_reader::read_corpus_from_native_xml_file;
 using abigail::dwarf_reader::read_corpus_from_elf;
 using abigail::xml_writer::write_translation_unit;
-using abigail::xml_writer::write_corpus_to_native_xml;
+using abigail::xml_writer::write_corpus;
 using abigail::xml_writer::write_corpus_to_archive;
 
 struct options
@@ -300,7 +300,7 @@ main(int argc, char* argv[])
          set_suppressions(*ctxt, opts);
          corpus_sptr corp = abigail::xml_reader::read_corpus_from_input(*ctxt);
          if (!opts.noout)
-           write_corpus_to_native_xml(corp, /*indent=*/0, cout);
+           write_corpus(corp, /*indent=*/0, cout);
          return false;
        }
     }
@@ -420,10 +420,10 @@ main(int argc, char* argv[])
          if (type == abigail::tools_utils::FILE_TYPE_XML_CORPUS)
            {
              if (opts.diff)
-               r = write_corpus_to_native_xml(corp, /*indent=*/0, of);
+               r = write_corpus(corp, /*indent=*/0, of);
 
              if (!opts.noout && !opts.diff)
-               r &= write_corpus_to_native_xml(corp, /*indent=*/0, cout);
+               r &= write_corpus(corp, /*indent=*/0, cout);
            }
          else if (type == abigail::tools_utils::FILE_TYPE_ZIP_CORPUS)
            {
@@ -435,7 +435,7 @@ main(int argc, char* argv[])
          else if (type == abigail::tools_utils::FILE_TYPE_ELF)
            {
              if (!opts.noout)
-               r = write_corpus_to_native_xml(corp, /*indent=*/0, cout);
+               r = write_corpus(corp, /*indent=*/0, cout);
            }
        }