aboutsummaryrefslogtreecommitdiff
path: root/pkg/dataio/reblock/structure.hlp
blob: 1a7c5221146438c275e98da933a95befb2646150 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.help gcopy "Program Structure"
.sh
Program Structure
.nf
t_bincopy()
# Returns when file list is finished or EOT reached.

    read_file (in_fname, out_fname,  outparam)
    Returns when an EOF is encountered on read.

	skipover (fd, szb_outblock, nskip)
	# Returns the offset of the first data byte in the first char
	# to contain data of interest or EOF

	record_pad (szb_outblock, szb_outrecord, padchar, buffer, op, rem_out)

	block_pad (szb_outblock, szb_outrecord, padchar, buffer, op, rem_out,
		    outparam)
.fi
.sh
BINCOPY Structure Summary
.ls t_bincopy
The main program gets the input and output filenames, creates a list of
files to be processed and gets the program parameters.
For each file in the input list READFILE is called,
and the input and output file names, blocks read and written and records read
and written are printed.
The program terminates when the input file list is exhausted or EOT is reached.
.ls read_file
READ_FILE opens the input and output devices, allocates space for the input
and output buffers and copies the data optionally skipping data
and byteswapping and/or wordswapping the data.
The routine terminates when an EOF is encountered on a read.
READ_FILE calls SKIPOVER to find the first data byte of interest and
RECORD_PAD and BLOCK_PAD to pad records and blocks respectively.
.ls skipover
SKIPOVER seeks to the first char containing data of interest and calculates
the offset in that char of the first byte of interest. Returns the offset
or EOF if the requested position is past EOF.
.le
.ls record_pad
Record_pad pads input records of szb_inrecord bytes long to output records
szb_outrecord long.
.le
.ls block_pad
Pads short blocks to size szb_outblock.
.le
.le
.le
.endhelp