/*************************************************************************/ /* 01/17/1990 AEE */ /* FITSUTIL.C contains menu of options for user selection in order to */ /* manipulate a fits file. */ /* */ /* updates */ /* AEE 01/22/90 changed code to use new functions. */ /*************************************************************************/ #include #include #include int error= 0; main() { int select= 10; char ch; while (select != 0 ) { system("cls"); printf("This is an utility program to manipulate fits images. Select one\n"); printf("of the following:\n\n"); printf("Enter 1 to create a *.HDR file with no line feeds\n"); printf("Enter 2 to create a *.TXT file with line feeds\n"); printf("Enter 3 to create a *.HDR file from a *.TXT file\n"); printf("Enter 4 to create a *.HDR, *.IMG or *.IBG file from a *.FIT file\n"); printf("Enter 5 to create a *.HDR, *.TAB or *.DAT file from a *.FIT file\n"); printf("Enter 6 to create a *.HDR and a *.IMQ file from a *.FIT file\n"); printf("Enter 7 to create a *.FIT file using *.HDR and *.IMG or *.IBG files\n"); printf("Enter 8 to create a *.FIT file using *.HDR and *.TAB or *.DAT files\n"); printf("Enter 9 to create a *.FIT file using the *.HDR and *.IMQ\n"); printf("Enter 0 to terminate the program\n\n"); printf("enter your choice: "); scanf("%d",&select); switch (select) { case 1: makehdr(); break; case 2: makehdcr(); break; case 3: txt2hdr(); break; case 4: mkhdimib(); break; case 5: mkhdtbda(); break; case 6: mkhdrimq(); break; case 7: imib2fit(); break; case 8: tbda2fit(); break; case 9: imq2fit(); break; } if (select > 0 && select < 10) { if (error == 0) printf("\nFile creation done."); else printf("\n Did not create file."); error= 0; printf(" Hit any key to continue...."); while(!kbhit()); getch(ch); } } /* end switch */ printf("\n\nNormal End of Job.\n"); }