pro uthelp,long=long
!quiet=1
; NAME: UTHELP
; PURPOSE: print either a long or short explanation of UTPLOT package
;	on terminal
; CALLING SEQUENCE: UTHELP,/LONG
; INPUT PARAMETER: /LONG - if present prints complete explanation of
;	UTPLOT package.  Otherwise, brief desciption of routines.
;+
;-
COMMON UTCOMMON,UTBASE,UTSTART,UTEND
COMMON UTSTART_TIME, PRINT_START_TIME
;
line=''
get_lun,lu
if keyword_set(long) then begin
	openr,lu,'idl$utplot:utplot_long.txt'
endif else begin
	openr,lu,'idl$utplot:utplot_short.txt'
endelse
;
on_ioerror, error
read:
   readf,lu,line
   print,line
goto,read
error:  ; probably hit end-of-file, so done. 
free_lun,lu
;
;PRINT THE VALUES IN UTCOMMON
print,' '
print,'Current values of base, start, and end times:
utstring=['UTBASE  = ','UTSTART = ','UTEND   = ']
;************************************
for index=0,2 do begin 
;PRINT THE VALUE OF THE INDICATED UTXXX IN COMMON IN ASCII FORMAT
if index eq 0 then  s=size(utbase) 
if index eq 1 then  s=size(utstart) 
if index eq 2 then  s=size(utend) 
IF s(1) EQ 0 THEN utout=-1 ELSE BEGIN
CASE INDEX OF
	0: utout=utbase
	1: utout=utstart
	2: utout=utend
ENDCASE
ENDELSE
if utout eq -1 then utout='NOT DEFINED' else utout=atime(utout)
;
print,utstring(index)+' '+utout
endfor ;close loop over common variables
;************************************
;START TIME LABEL, PRINT IT?
CHECKVAR,PRINT_START_TIME,1
PRINT, ' '
CASE PRINT_START_TIME OF
0: PRINT,'Start time label will not be written on plot.'
1: PRINT,'Start time label will be written on plot.'
ENDCASE
RETURN
end

