aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/fitsio/fitssppb/fsgkns.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/tbtables/fitsio/fitssppb/fsgkns.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'pkg/tbtables/fitsio/fitssppb/fsgkns.x')
-rw-r--r--pkg/tbtables/fitsio/fitssppb/fsgkns.x49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkg/tbtables/fitsio/fitssppb/fsgkns.x b/pkg/tbtables/fitsio/fitssppb/fsgkns.x
new file mode 100644
index 00000000..b2ad098a
--- /dev/null
+++ b/pkg/tbtables/fitsio/fitssppb/fsgkns.x
@@ -0,0 +1,49 @@
+include "fitsio.h"
+
+procedure fsgkns(iunit,keywrd,nstart,nmax,strval,nfound,status)
+
+# read an array of character string values from header records
+
+int iunit # i input file pointer
+char keywrd[SZ_FKEYWORD] # i keyword name
+% character fkeywr*8
+int nstart # i first sequence number
+int nmax # i max. number of keyword
+char strval[SZ_FSTRVAL,ARB] # o string value
+% character*70 fstrva
+% character*48 comm
+% character*8 keynam
+
+int nfound # o no. of keywords found
+int status # o error status
+int i
+int j
+
+begin
+
+call f77pak(keywrd,fkeywr,SZ_FKEYWORD)
+
+nfound=0
+j=nstart
+
+do i=1,nmax {
+ call ftkeyn(fkeywr,j,keynam,status)
+ if (status > 0)
+ go to 10
+
+ call ftgkys(iunit,keynam,fstrva,comm,status)
+
+ if (status <= 0) {
+ nfound=i
+ call f77upk(fstrva,strval(1,i),SZ_FSTRVAL)
+
+ } else if (status == 202) {
+# ignore keyword not found error
+ status=0
+ }
+ j=j+1
+ }
+
+10
+ j=0
+end