#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"

main(int argc, char *argv[])
{
  fitsfile *fp ;
  int status=0 ;
  long naxis=0 ;
  long naxes[2] = {0, 0};
  short array[] = {0} ;

  if (argc < 2)
    {
      printf("Error in execution of 'createblankimg.c'. Either Filename or hdu number is missing..") ;
      exit(0) ;  
    }  

   if (argc > 2)
    {
      printf("Error in execution of 'createblankimg.c'. Extra Arguments found.") ;
      exit(0) ;  
    }    

  

  fits_create_file(&fp, argv[1], &status) ;
  if(status)
      {
        printf("report_error_status:%d\n", status) ;
        exit(0) ; 
       }    

  fits_create_img(fp,SHORT_IMG,naxis,0, &status) ;
  if(status)
      {
        printf("report_error_status:%d\n", status) ;
        exit(0) ; 
	} 
  /* fits_write_img(fp, TSHORT, 1, 1, array, &status);
   if(status)
      {
        printf("report_error_status:%d\n", status) ;
        exit(0) ; 
	} */
   fits_close_file(fp, &status); 
   if(status)
      {
        printf("report_error_status:%d\n", status) ;
        exit(0) ; 
       }        
}
