C---------------------------------------------------------------------- subroutine ftgi4b(iunit,nvals,incre,i4vals,status) C Read an array of Integer*4 bytes from the input FITS file. C Does any required translation from FITS to internal machine format integer nvals,iunit,incre,status,offset integer i4vals(nvals) C iunit i fortran unit number C nvals i number of pixels to read C incre i byte increment between values C i4vals i output array of integer values C status i output error status integer ierr,ieg2cray,nloop,fpixel,ntodo,i integer compid common/ftcpid/compid if (incre .le. 4)then call ftgbyt(iunit,nvals*4,i4vals,status) else C offset is the number of bytes to move between each value offset=incre-4 call ftgbyo(iunit,4,nvals,offset,i4vals,status) end if if (compid .eq. 0 .or. compid .eq. -1)then C big endian machine (e.g., SUN) doesn't need byte swapping else if (compid .ge. 1)then C little endian machine (e.g. DEC, VAX, or PC) must be byte swapped call ftswi4(i4vals,nvals) else C must be a CRAY C convert from IEEE I*4 to cray I*8 C have to work backwards, so as to not overwrite the input data nloop=(nvals+1)/2 fpixel = (nloop*2)-1 ntodo=nvals-(nloop-1)*2 do 10 i=nloop,1,-1 ierr=ieg2cray(1,ntodo,i4vals(i),0,i4vals(fpixel),1,' ') fpixel=fpixel-2 ntodo=2 10 continue end if end