blob: b9df60eeebc681a04b6286e55ccf22e1486c5dfe (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
/* Last non-groff version: gprint.h 1.1 84/10/08
*
* This file contains standard definitions used by the gprint program.
*/
#include <stdio.h>
#include <math.h>
#define xorn(x,y) (x)
/* was 512 */
#define yorn(x,y) (511 - (y)) /* switch direction for */
/* y-coordinates */
#define STYLES 6
#define SIZES 4
#define FONTS 4
#define SOLID -1
#define DOTTED 004 /* 014 */
#define DASHED 020 /* 034 */
#define DOTDASHED 024 /* 054 */
#define LONGDASHED 074
#define DEFTHICK -1 /* default thicknes */
#define DEFSTYLE SOLID /* default line style */
#define TRUE 1
#define FALSE 0
#define nullelt -1
#define nullpt -1
#define nullun NULL
#define BOTLEFT 0
#define BOTRIGHT 1
#define CENTCENT 2
#define VECTOR 3
#define ARC 4
#define CURVE 5
#define POLYGON 6
#define BSPLINE 7
#define BEZIER 8
#define TOPLEFT 10
#define TOPCENT 11
#define TOPRIGHT 12
#define CENTLEFT 13
#define CENTRIGHT 14
#define BOTCENT 15
#define TEXT(t) ( (t <= CENTCENT) || (t >= TOPLEFT) )
/* WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING
* The above (TEXT) test is dependent on the relative values of the
* constants and will have to change if these values change or if new
* commands are added with value greater than BOTCENT
*/
#define NUSER 4
#define NFONTS 4
#define NBRUSHES 6
#define NSIZES 4
#define NJUSTS 9
#define NSTIPPLES 16
#define ADD 1
#define DELETE 2
#define MOD 3
typedef struct point {
float x, y;
struct point *nextpt;
} POINT;
typedef struct elmt {
int type, brushf, size, textlength;
char *textpt;
POINT *ptlist;
struct elmt *nextelt, *setnext;
} ELT;
#define DBNextElt(elt) (elt->nextelt)
#define DBNextofSet(elt) (elt->setnext)
#define DBNullelt(elt) (elt == NULL)
#define Nullpoint(pt) ((pt) == (POINT *) NULL)
#define PTNextPoint(pt) (pt->nextpt)
/* EOF */
|