Commit bf01a083 authored by Robert Butora's avatar Robert Butora
Browse files

vlkb: prints header one card per line

parent d91e2f5d
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -116,8 +116,14 @@ int header_backup(const string& pathname, bool backup)
      if(backup)
         write_previous(hd.m_header, pathname +"hdr" + ((i>0) ? "#" + to_string(i+1)  : "") );
      else
         cout << hd.m_header << endl;

      {
         unsigned long i = 0;
         unsigned long hdr_len = hd.m_header.length();
         while((i*80+80) <= hdr_len)
         {
            cout << hd.m_header.substr(80*i++, 80) << endl;
         }
      }
      // FIXME remove all explicit cout cerr to main.cpp and here use ostream&

   }
+1 −1
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ int cmd_header(int argc, char * argv[])
      std::cerr
         << "Usage:  header [--backup] <pathname.fits>...\n"
         << "\n"
         << "Prints current header or writes the header into a file with the same pathname but 'fitshdr' extension.\n"
         << "Prints current header (one card per line) or writes the header into a file with the same pathname but 'fitshdr' extension.\n"
         << "Arguments:\n"
         << "   --backup  write current header from file 'pathname.fits' to 'pathname.fitshdr#n' where n is the HDU number.\n";
      rc = EXIT_FAILURE;