aboutsummaryrefslogtreecommitdiff
path: root/sys/imio/iki/stf/stfmkpfn.x
blob: 4568efd88072beb3d90433c75f42628d425ba355 (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
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	"stf.h"

# STF_MKPIXFNAME -- Given the root and extn fields of the image header filename,
# construct the pixel file name.  The pixel file has the same root name as
# the header and the first two characters of the extension are the same as for
# the header, if a header extension was given.

procedure stf_mkpixfname (hdr_root, hdr_extn, pixfname, maxch)

char	hdr_root[ARB]		# root name of header file
char	hdr_extn[ARB]		# extension of header file
char	pixfname[maxch]		# receives pixel filename
int	maxch

int	i
char	pix_extn[MAX_LENEXTN]

begin
	call strcpy (STF_DEFPIXEXTN, pix_extn, MAX_LENEXTN)
	if (hdr_extn[1] != EOS) {
	    for (i=1;  i < MAX_LENEXTN;  i=i+1)
		pix_extn[i] = hdr_extn[i]
	}

	call iki_mkfname (hdr_root, pix_extn, pixfname, maxch)
end