#include <string.h>
#include <stdio.h>


#include <stdlib.h>

/*
  Every program which uses the CFITSIO interface must include the
  the fitsio.h header file.  This contains the prototypes for all
  the routines and defines the error status values and other symbolic
  constants used in the interface.  
*/
#include "fitsio.h"
int main( int argc, char *argv[]);
void readheader( char *hdunum );
void printerror( int status);


  fitsfile *fptr ;
 int status ;
int main(int argc, char *argv[])
{
/*************************************************************************
   This is a simple main program that calls the following routines:

   
    readheader    - read and print the header keywords in every extension
   

**************************************************************************/

 
  char filename[] = "/usr/local/fits/myfile.fits" ;
 
   if ( fits_open_file(&fptr, filename, READONLY, &status) ) 
         printerror( status );
}

void printerror( int status)
{
    /*****************************************************/
    /* Print out cfitsio error messages and exit program */
    /*****************************************************/


    if (status)
    {
       fits_report_error(stderr, status); /* print error report */

       exit( status );    /* terminate the program, returning error status */
    }
    return;
}
