function READ_PACKET_FNAMES,files
;+
; NAME:
;	READ_PACKET_FNAMES
;
; PURPOSE:
;	This routine reads in all packets specified by the files
;
; CATEGORY:
;	LASCO PACKETS
;
; CALLING SEQUENCE:
;	Result = READ_PACKET_FNAMES ( Files )
;
; INPUTS:
;	Files:	A string or array of strings specifying the file names
;
; OUTPUTS:
;	This function returns the packet information as a 2D array
;	in which the packet information is the first dimension and time is
;	the second dimension.
;
; COMMON BLOCKS:
;	None
;
; PROCEDURE:
;	Calls the routine READ_TM_PACKET
;	Reformats the packet information from each file into a singly dimensioned
;	array.  Then the information from each file can be concatenated together.
;	When all files have been read in then the array can be reformatted into
;	the 2D array.
;
; EXAMPLE:
;	Read in the ECS housekeeping data for the files, files
;
;		hk = READ_PACKET_FNAMES (files)
;
; MODIFICATION HISTORY:
; 	Written by:	R.A. Howard, 1998
;	Sep, 1998	Taken from READALLSV1
;
; @(#)read_packet_fnames.pro	1.1 09/24/98 :LASCO IDL LIBRARY
;
;-
s=SIZE(files)
IF (s(0) EQ 1) THEN BEGIN
   PRINT,'Number of files to read in: ',s(1)
   for i=0,s(1)-1 DO BEGIN
       a = read_tm_packet(files(i),/no_hdr)
       sz_a = SIZE(a)
       len_a =sz_a(1)
       nrec_a = sz_a(2)
       IF (i EQ 0) THEN BEGIN
	  b = REFORM(a,len_a*nrec_a)
       ENDIF ELSE BEGIN
	  b = [b,REFORM(a,len_a*nrec_a)]
       ENDELSE
   ENDFOR
   b = REFORM(b, len_a , N_ELEMENTS(b)/len_a)
   RETURN,b
ENDIF
PRINT,'Error in READ_PACKET_FNAMES:  No files found matching date = '+date
RETURN,-1
END

