aboutsummaryrefslogtreecommitdiff
path: root/pkg/tbtables/fitsio/fitssppb/fsphbn.x
blob: d9e8af02da85d1da760b6508d2bc4098d9493d05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
include "fitsio.h"

procedure fsphbn(ounit,nrows,nfield,ttype,tform,tunit,
                    extnam,pcount,status)

# write required standard header keywords for a binary table extension

int     ounit           # i output file pointer
int     nrows           # i number of rows
int     nfield          # i number of fields
char    ttype[SZ_FTTYPE,ARB]      # i column name
%       character*24 fttype(512)
char    tform[SZ_FTFORM,ARB]      # i column data format
%       character*16 ftform(512)
char    tunit[SZ_FTUNIT,ARB]      # i column units
%       character*24 ftunit(512)
char    extnam[SZ_FEXTNAME]     # i extension name
%       character fextna*24
int     pcount          # i size of 'heap'
int     status          # o error status
int	i

begin

do i = 1, nfield
  { call f77pak(ttype(1,i) ,fttype(i),SZ_FTTYPE)
    call f77pak(tform(1,i) ,ftform(i),SZ_FTFORM)
    call f77pak(tunit(1,i) ,ftunit(i),SZ_FTUNIT)
  }

call f77pak(extnam ,fextna,SZ_FEXTNAME)

call ftphbn(ounit,nrows,nfield,fttype,ftform,ftunit,
                    fextna,pcount,status)
end