FTS1_VHEAD

Validates a FITS header card and reconstitutes to the standard

Description:

This routines takes a buffer containing text similar to a FITS header card and attempts to produce a correctly formatted FITS header card. The validation process performs the following checks the input buffer: a) the length of the input buffer is no more than 80 characters, otherwise it is truncated; b) the keyword only contains uppercase Latin alphabetic characters, numbers, underscore, and hyphen (this is a fatal error except for lowercase letters); c) value cards have an equals sign in column 9 and a space in column 10; d) quotes enclose character values; e) single quotes inside string values are doubled; f) character values are left justified to column 11 (retaining leading blanks) and contain at least 8 characters (padding with spaces if necessary); g) non-character values are right justified to column 30 for mandatory keywords, or when the fixed format is requested (unless the value is double-precision requiring more than 20 digits); h) the comment delimiter is in column 32 for the mandatory keywords or when the fixed format is requested for non-character values, or is at least two characters following the value otherwise; i) an equals sign in column 9 of a commentary card is replaced by a space, issuing a warning message at normal reporting level; and j) comments begin at least two columns after the end of the comment delimiter.

Some non-fatal errors—a), b), c), d), and i)—produce warning messages at message level MSG__NORM.

Invocation

CALL FTS1_VHEAD( BUFFER, FIXED, CARD, STATUS )

Arguments

BUFFER = CHARACTER ( ) (Given)
The FITS header card to be validated.
FIXED = LOGICAL (Given)
If this is .TRUE., all values use the FITS fixed format with left-justified character strings starting two columns after
CARD = CHARACTER ( 80 ) (Returned)
The validated FITS header card .
STATUS = INTEGER (Given and Returned)
The global status.