pro table_header, lun, fil, tim_str, qff, itab, headline
;
;+
;NAME:
;	table_header
;PURPOSE:
;	To put a standard header at the top of each page of an SXT 
;	sequence table dump
;INPUT:
;	lun	- logical unit of output file
;	fil	- Raw telemetry input file
;	tim_str	- Time of dump
;	qff	- Write a form feed at the beginning of the page?
;	itab	- SXT Sequence table serial number
;	headline- The comments for the table load
;HISTORY:
;11-Aug-89  Version 1.2       Corrected ROI st/width
; 4-Apr-90  Version 1.3       Added FIX(BARR... for ARS/AEC ULT,LLT,UAT,LAT
;12-Apr-90  Version 1.4       Fixed ARS AEC UAT,LAT - was grabing wrong bytes
;12-Apr-90  Version 1.5       Corrected QT and FL ARS interval
;12-Jun-90  Version 1.6       Check for bad data (look at hard reset) before
;			      processing
;24-Sep-91  Version 2.0       Updated to run with IDL V2.0 and on Ultrix
;21-Nov-91  Version 2.1       Added "itab" capability
;18-Dec-91  Version 2.2       Fixed troubl where only one of 4 PFI/FFI
;			      sequence tables were being dumped
;25-Mar-92  Version 2.3       If "ifil" is undefined, do not print that string
; 8-Jul-92  Version 2.4       Added the 2 comment lines to the dump
;
strver = 'TABLE_DUMP.PRO  8-Jul-92  Version 2.4
;
ff=''
if (qff) then ff=string(byte(12))
;
itab_str = ''
ifil_str = ''
icom_str = strarr(2) + '    COMMENTS: '
if (n_elements(itab) ne 0) then itab_str = '   SXT Table #' + strtrim(itab,2)
if (n_elements(fil) ne 0) then ifil_str = '                                        Input File:  '+ fil
if (n_elements(headline) ne 0) then icom_str = icom_str + strmid(headline(1:2), 7, 80)
;
printf, lun, ff,ifil_str
printf, lun, '                                        Program Run: ', !stime
printf, lun, '                                        ', strver
printf, lun, 'Table Dump Data for: ', tim_str, itab_str
printf, lun, icom_str(0)
printf, lun, icom_str(1)
printf, lun, '  '
;
end
