1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License").  You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
23 * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28/*	  All Rights Reserved  	*/
29
30#ifndef	_POSTMD_H
31#define	_POSTMD_H
32
33#pragma ident	"%Z%%M%	%I%	%E% SMI"
34
35#ifdef	__cplusplus
36extern "C" {
37#endif
38
39/*
40 *
41 * Definitions used by the matrix display program.
42 *
43 * An interval list used to map matrix elements into integers in the range 0 to
44 * 254 representing shades of gray on a PostScript printer. The list can be given
45 * using the -i option or can be set in the optional header that can preceed each
46 * matrix. The list should be a comma or space separated list that looks like,
47 *
48 *		num1,num2, ... ,numn
49 *
50 * where each num is a floating point number. The list must be given in increasing
51 * numerical order. The n numbers in the list partion the real line into 2n+1
52 * regions given by,
53 *
54 *		region1		element < num1
55 *		region2		element = num1
56 *		region3		element < num2
57 *		region4		element = num3
58 *		   .		     .
59 *		   .		     .
60 *		   .		     .
61 *		region2n	element = numn
62 *		region2n+1	element > numn
63 *
64 * Every number in a given region is mapped into an integer in the range 0 to 254
65 * and that number, when displayed on a PostScript printer using the image operator,
66 * prints as a square filled with a gray scale that reflects the integer that was
67 * chosen. 0 maps to black and 255 white (that's why 255 is normally omitted).
68 *
69 * The shades of gray chosen by the program are normally generated automatically,
70 * but can be reassigned using the -g option or by including a grayscale line in
71 * the optional header. The grayscale list is comma or space separated list of
72 * integers between 0 and 255 that's used to map individual regions into arbitray
73 * shade of gray, thus overriding the default choice made in the program. The list
74 * should look like,
75 *
76 *		color1,color2, ... ,color2n+1
77 *
78 * where color1 applies to region1 and color2n+1 applies to region2n+1. If less
79 * than 2n+1 numbers are given the default assignments will be used for the missing
80 * regions. Each color must be an integer in the range 0 to 255.
81 *
82 * The default interval list is given below. The default grayscale maps 254 (almost
83 * white) into the first region and 0 (black) into the last.
84 *
85 */
86
87#define DFLTILIST	"-1,0,1"
88
89/*
90 *
91 * The active interval list is built from an interval string and stored in an array
92 * whose elements are of type Ilist.
93 *
94 */
95
96typedef struct  {
97
98	double	val;			/* only valid in kind is ENDPOINT */
99	int	color;			/* gray scale color */
100	long	count;			/* statistics for each region */
101
102} Ilist;
103
104#ifdef	__cplusplus
105}
106#endif
107
108#endif	/* _POSTMD_H */
109