Skip to content
Snippets Groups Projects
Commit bf01a083 authored by Robert Butora's avatar Robert Butora
Browse files

vlkb: prints header one card per line

parent d91e2f5d
No related branches found
No related tags found
No related merge requests found
...@@ -116,8 +116,14 @@ int header_backup(const string& pathname, bool backup) ...@@ -116,8 +116,14 @@ int header_backup(const string& pathname, bool backup)
if(backup) if(backup)
write_previous(hd.m_header, pathname +"hdr" + ((i>0) ? "#" + to_string(i+1) : "") ); write_previous(hd.m_header, pathname +"hdr" + ((i>0) ? "#" + to_string(i+1) : "") );
else 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& // FIXME remove all explicit cout cerr to main.cpp and here use ostream&
} }
......
...@@ -366,7 +366,7 @@ int cmd_header(int argc, char * argv[]) ...@@ -366,7 +366,7 @@ int cmd_header(int argc, char * argv[])
std::cerr std::cerr
<< "Usage: header [--backup] <pathname.fits>...\n" << "Usage: header [--backup] <pathname.fits>...\n"
<< "\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" << "Arguments:\n"
<< " --backup write current header from file 'pathname.fits' to 'pathname.fitshdr#n' where n is the HDU number.\n"; << " --backup write current header from file 'pathname.fits' to 'pathname.fitshdr#n' where n is the HDU number.\n";
rc = EXIT_FAILURE; rc = EXIT_FAILURE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment