diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/tbtables/fitsio/ftgnst.f | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/tbtables/fitsio/ftgnst.f')
-rw-r--r-- | pkg/tbtables/fitsio/ftgnst.f | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/pkg/tbtables/fitsio/ftgnst.f b/pkg/tbtables/fitsio/ftgnst.f new file mode 100644 index 00000000..0d9ed966 --- /dev/null +++ b/pkg/tbtables/fitsio/ftgnst.f @@ -0,0 +1,70 @@ +C-------------------------------------------------------------------------- + subroutine ftgnst(iunit,value,lenval,comm,status) + +C get the next string keyword. +C see if the next keyword in the header is the continuation +C of a long string keyword, and if so, return the value string, +C the number of characters in the string, and the associated comment +C string. + +C value c returned value of the string continuation +C lenval i number of non-blank characters in the continuation string +C comm C value of the comment string, if any, in this keyword. + + character*(*) value,comm + integer iunit,lenval,status + + integer i,length,tstat,nkeys,nextky + character record*80, strval*70 + + if (status .gt. 0)return + + tstat=status + value=' ' + comm=' ' + lenval=0 + +C get current header position + call ftghps(iunit,nkeys,nextky,status) + +C get the next keyword record + if (nextky .le. nkeys)then + call ftgrec(iunit,nextky,record,status) + else +C positioned at end of header, so there is no next keyword to read + return + end if + +C does this appear to be a continuation keyword (=blank keyword name +C or CONTINUE)? + if (record(1:10) .ne. ' ' .and. record(1:10) .ne. + & 'CONTINUE ')return + +C return if record is blank + if (record .eq. ' ')return + +C set a dummy keyword name + record(1:10)='DUMMYKEY= ' + +C parse the record to get the value string and comment + call ftpsvc(record,strval,comm,status) + +C convert character string to unquoted string + call ftc2s(strval,value,status) + if (status .gt. 0)then +C this must not be a continuation card; reset status and messages + status=tstat + call ftcmsg + value=' ' + comm=' ' + return + end if + + length=len(value) + do 10 i=length,1,-1 + if (value(i:i) .ne. ' ')then + lenval=i + return + end if +10 continue + end |