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
51
52
53
54
|
# TM_CP1 -- Fill pixel buffer and copy into table.
#
#
#
#
# Revision history:
# ----------------
# 30-Jan-97 - Task created (I.Busko)
procedure tm_cp1$t (im, tp, cp, row, lena, leni)
pointer im # imio pointer
pointer tp # table pointer
pointer cp # column pointer
int row # row where to begin insertion
int lena # array length
int leni # image length
#--
pointer buf
double undefd
real undefr
int undefi, i, len
short undefs
pointer imgl1$t()
begin
# Read pixels into buffer.
buf = imgl1$t (im)
# Choose the minimum between image and table array
# lengths as the array size to be written to table.
len = min (lena, leni)
# Write buffer into array cell element.
call tbapt$t (tp, cp, row, Mem$t[buf], 1, len)
# If image is smaller than array, set
# remaining elements to INDEF.
if (leni < lena) {
undefd = INDEFD
undefr = INDEFR
undefi = INDEFI
undefs = INDEFS
do i = len+1, lena
call tbapt$t (tp, cp, row, undef$t, i, 1)
}
end
|