***** File PCDECLSP.TXT This program reads in a compressed FITS image, decompresses it and writes it out as a legitimate FITS byte stream. It reads and writes the FITS records as streams of 2880 bytes. NOTE: The FITS header and associated data are assumed to be in SEPARATE files. If no file name is specified on the command line, the program will prompt for one. If only one name is given on the command line, it is assumed to be the input file, and the output file will be given the same file name except that the extension will be set to '$$$'. If two names are given on the command line, the first is taken as the input file, the second as the output file. The data file is assumed to have the extension .IMQ, but this can be changed by specifying a third file name on the command line. EXAMPLES: >pcdeclsp - asks for header file name, reads data from *.IMQ, makes *.$$$ as output >pcdeclsp lspn0094.hdr - reads data from LSPN0094.IMQ, makes LSPN0094.$$$ as output >pcdeclsp lspn0094.hdr d:lspn0094.fit - reads data from LSPN0094.IMQ, makes LSPN0094.FIT on drive D: >pcdeclsp lspn0094.hdr d:lspn0094.fit lspn0094.dat - reads data from LSPN0094.DAT, makes LSPN0094.FIT on drive D: Version 1.0 written 1/90 by A. Warnock ST Systems Corp. NASA/Goddard Space Flight Center Code 681 Greenbelt, MD 20771 (301)286-3965 SPAN - STARS::WARNOCK 6168::WARNOCK Internet - warnock@stars.gsfc.nasa.gov warnock@[128.183.84.7] Version 1.1, 3/90 by AW3 - saves correct input buffer length in do_data to fix a bug in carrying a new 16-bit value from the end of one input buffer to the beginning of the next. Written for Turbo C v2.0 from Borland Int'l. Will compile and link under the tiny model to generate a .COM file. See MAKEFILE for details. The string routines strsetsz and strsrep are from the CXL library, version 5.1. The templates are given below. For non-PC systems, these routines will have to be written from scratch. The CXL library is available for PC-based compilers on fine bulletin boards everywhere. For more information on CXL, contact Mike Smedley P. O. Box 33603 San Antonio, TX 78265-3603 **** CXL Function Templates char *strsetsz( char *str, int newsize) ; Adjusts the length of str, either by truncation or padding with blanks. char *strsrep( char *str, char *search, char *replace) ; Searches for, and replaces one string within another. Case sensitive. Source code files for PCDECLSP.COM DECOMP.C DO_DATA.C DO_DFILE.C DO_IFILE.C DO_OFILE.C HEADER.C PCDECLSP.C PUTKEY.C XTENSION.C Files for building PCDECLSP.COM with TurboC v2.0 MAKEFILE PCDECLSP.PRJ PCDECLSP.RSP The file MAKEFILE is included here as an example of how to rebuild PCDECLSP. It may not work as presented here for two reasons. First, it refers to specific paths for the libraries needed to link the program, which will vary from machine to machine. Second, the file has been padded out to 80-byte records, and so the line continuation character (\) is not at the end of the line. The trailing blanks should be removed before the file will work correctly.