summaryrefslogtreecommitdiff
path: root/ipl/procs/writecpt.icn
blob: 0591612d3d3a3d6b912af7cf651f7e9d2afe6a3d (plain)
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
############################################################################
#
#	File:     writecpt.icn
#
#	Subject:  Procedure to write a "carpet" file
#
#	Author:   Ralph E. Griswold
#
#	Date:     August 7, 1997
#
############################################################################
#
#   This file is in the public domain.
#
############################################################################
#
#  write_cpt(output, carpet) writes the carpet with heading information to
#  the specified file.
#
############################################################################
#
#  Links:  matrix
#
############################################################################

link matrix

procedure write_cpt(output, carpet)	#: convert matrix to numerical carpet
   local min, max, i, j, width, height

   width := matrix_width(carpet)
   height := matrix_height(carpet)

   write(output, "width=", width, " height=", height)

   write_matrix(output, carpet)

   return

end