blob: 58eacba93650a430f8bf276d56391785b2b1b7ca (
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
|
include "../lib/mctable.h"
$for (csilrdxp)
# MCT_CLEAR - Clear all table values with given value. Do not reset any
# table counter.
procedure mct_clear$t (table, value)
pointer table # table descriptor
PIXEL value # value
begin
# Check pointer and magic number
if (table == NULL)
call error (0, "mct_clear: Null table pointer")
if (MCT_MAGIC (table) != MAGIC)
call error (0, "mct_clear: Bad magic number")
# Check table type
if (MCT_TYPE (table) != TY_PIXEL)
call error (0, "mct_clear: Wrong table type")
# Move value to data buffer
$if (datatype == p)
call amovki (value, Memi[MCT_DATA (table)],
MCT_MAXROW (table) * MCT_MAXCOL (table))
$else
call amovk$t (value, Mem$t[MCT_DATA (table)],
MCT_MAXROW (table) * MCT_MAXCOL (table))
$endif
end
$endfor
|