FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gnuplot/term/excl.trm at master · gnuplot/gnuplot · GitHub
gnuplot
gnuplot
Repository navigation
Code
Pull requests
2
(2)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
gnuplot
/
term
/
excl.trm
Copy path
More file actions
More file actions
Latest commit
History
History
History
284 lines (244 loc) · 8.67 KB
Breadcrumbs
gnuplot
/
term
/
excl.trm
Copy path
File metadata and controls
284 lines (244 loc) · 8.67 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
/* Hello, Emacs, this is -*-C-*- */
/* GNUPLOT - excl.trm */
/* Copyright 1992, 1998, 2004 by P. Klosowski at NIST. All Rights Reserved
*
* Permission to use, copy, and distribute this software and its
* documentation for any purpose with or without fee is hereby granted,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
*
* Permission to modify the software is granted, but not the right to
* distribute the complete modified source code. Modifications are to
* be distributed as patches to the released version. Permission to
* distribute binaries produced by compiling modified sources is granted,
* provided you
* 1. distribute the corresponding source modifications from the
* released version in the form of a patch file along with the binaries,
* 2. add special version identification to distinguish your version
* in addition to the base release version number,
* 3. provide your name and address as the primary contact for the
* support of your modified version, and
* 4. retain our contact information in regard to use of the base
* software.
* Permission to distribute the released version of the source code along
* with corresponding source modifications in the form of a patch file is
* granted with same provisions 2 through 4 for binary distributions.
*
* This software is provided "as is" without express or implied warranty
* to the extent permitted by applicable law.
*
* This file is included by ../term.c.
*
*
* send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
*
*/
/***
NAME
quic
PURPOSE
QUIC driver for GNUPLOT
NOTES
HISTORY
przemek - Aug 16, 1992: Created.
lars - Nov 30, 1998: Updated to new gnuplot copyright by
permission from Przemek
***/
/*
c *****************************************
c *****************************************
c ****** *****
c ****** EXCL command definitions *****
c ****** *****
c *****************************************
c *****************************************
*/
/*
* adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
*/
#include
"driver.h"
#ifdef
TERM_REGISTER
register_term
(
excl
)
#endif
#ifdef
TERM_PROTO
TERM_PUBLIC
void
EXCL_init
(
void
);
TERM_PUBLIC
void
EXCL_graphics
(
void
);
TERM_PUBLIC
void
EXCL_text
(
void
);
TERM_PUBLIC
void
EXCL_linetype
(
int
linetype
);
TERM_PUBLIC
void
EXCL_move
(
unsigned
int
x
,
unsigned
int
y
);
TERM_PUBLIC
void
EXCL_vector
(
unsigned
int
x2
,
unsigned
int
y2
);
TERM_PUBLIC
void
EXCL_put_text
(
unsigned
int
x
,
unsigned
int
y
,
const
char
str
[]);
TERM_PUBLIC
void
EXCL_reset
(
void
);
#define
EXCL_XMAX
9000
#define
EXCL_YMAX
6500
#define
EXCL_XLAST
(EXCL_XMAX - 1)
#define
EXCL_YLAST
(EXCL_YMAX - 1)
#define
EXCL_VCHAR
120
#define
EXCL_HCHAR
70
#define
EXCL_VTIC
70
#define
EXCL_HTIC
70
#endif
/* TERM_PROTO */
#ifndef
TERM_PROTO_ONLY
#ifdef
TERM_BODY
/* Define ansi command headers, NUL character */
#define
ESC
"\033"
#define
GS
"\035"
#define
CSI
"\033["
#define
DCS
"\033P"
#define
ST
"\033\\"
/*
page numbers are given per "Talaris EXCL programmer's reference manual" M292 rev.2
NOTE: EXCL coordinate system places (0,0) at upper left corner of the page
c EXCL commands for initialization
c TALAMS: set ANSI (p. 162)
c TALMOD: set emulation *** EXCL (p. 164)
c TALPGO: set page orient *** landscape (p. 81)
c TALFCTL: set paper format *** 8.5x11 (p. 85)
c TALTBM: set top/bot margins ** in land mode to full pg (p. 73)
c TALLRM: set left/right margins (p. 75)
c PUM: set units ** units of measure set by TALPRM (p. 67)
c TALASF: Absorb cr/ff/lf/vt ** ON (p. 182)
c TALPOP: pop controller params (p. 168)
c TALPSH: push controller params (p. 167)
c TALPRM: set units of measure ** to 1/1000 inch (p. 64)
c TALGLT: set line type ** solid (p. 211)
c TALORG: set page absolute origin ** (0,0) UL corner (p. 78)
c TALPCW: set page clip window *** for landsc/full page (p. 84)
c TALGLP: line: **pen7x7mil*draw*smear*glyph112*font5279* (p. 208)
c TALGLPE: ending for TALGLP command, forcing DRAW mode
c TALGBB: bounding box; used only by qdrive (p. 207)
c TALFPO: Force page out ** clear bitmap (p. 95)
c TALGDW: graphical draw to hor,vert ** abs coords (p. 212)
c TALGMV: graphical move to hor,vert ** abs coords (p. 213)
*/
#define
TALAMS
"\033[0*s"
#define
TALMOD
"\033[1;0r"
#define
TALPGO
"\033[1;0p"
#define
TALFCTL
"\033[0;3x"
#define
TALTBM
"\033[0;8500 v"
#define
TALLRM
"\033[0;11000v"
#define
PUM
"\033[11h"
#define
TALASF
"\033[1 z"
#define
TALPOP
"\033[*]"
#define
TALPSH
"\033[*["
#define
TALPRM
"\033[3y"
#define
TALGLT
"\033[%s*t"
#define
TALORG
"\033[0;0o"
#define
TALCCNT
"\033[1;0u"
#define
TALPCW
"\033[0;8500;11000;0*c"
#define
TALGLP_init
"\033[7;7;8;1;112;5279*w"
#define
TALGLP
"\033[%d;%d;8*w"
#define
TALFPO
"\033[0*F"
#define
TALGDW
"\033[0;%d;%d*d"
#define
TALGMV
"\033[0;%d;%d*m"
/* TALPYL: polyline (p. 222)
** 5;0} list of 16-bit signed integers, encoded, mostly relative
** 5,1} list of ASCII absolute coords (if w/o +- signs)(e.g. 315:1222;)
*/
#define
TALPYL
"\033P5;1}"
TERM_PUBLIC
void
EXCL_init
()
{
fprintf
(
gpoutfile
,
"%s%s%s%s%s%s"
,
TALPSH
,
TALAMS
,
TALMOD
,
TALCCNT
,
TALFCTL
,
TALASF
);
/* ^save state ^setEXCL ^PaperSize8.5x11 */
/* ^setANSI ^copyCount1 ^absorbCtlChar */
fprintf
(
gpoutfile
,
"%s%s%s%s%s%s"
,
PUM
,
TALPRM
,
TALPGO
,
TALPCW
,
TALORG
,
TALGLP_init
);
fprintf
(
gpoutfile
,
TALGLT
,
""
);
/* ^setUnits ^landscape ^OriginZero ^SolidLine */
/* ^Units1/1000" ^pageClip ^SetLine */
}
TERM_PUBLIC
void
EXCL_graphics
()
{
}
TERM_PUBLIC
void
EXCL_text
()
{
fputs
(
TALFPO
,
gpoutfile
);
/* ^pageout */
}
TERM_PUBLIC
void
EXCL_linetype
(
int
linetype
)
{
/* excl line widths in mils: 4 is minimum, but too thin; then
7,10,14,17,20,24,27...
exclpen=MOD(NPEN,8)*7
CSI exclpen; exclpen; TALGLPE
*/
static
char
*
type
[
2
+
9
]
=
{
""
,
"40;40"
,
""
,
"42;42"
,
"14;21"
,
/* .... ---- -- -- -- . . . */
""
,
"49;30"
,
"14;21"
,
""
,
"49;30"
,
"14;21"
/* same pattern, but thicker.. and thicker */
};
static
int
width
[
2
+
9
]
=
{
14
,
7
,
7
,
7
,
7
,
10
,
10
,
10
,
17
,
17
,
17
};
if
(
linetype
>=
9
)
linetype
%=
9
;
if
(
linetype
<
-2
)
linetype
=
LT_BLACK
;
fprintf
(
gpoutfile
,
TALGLP
,
width
[
linetype
+
2
],
width
[
linetype
+
2
]);
/* ^width in dots */
fprintf
(
gpoutfile
,
TALGLT
,
type
[
linetype
+
2
]);
/* ^line type */
}
TERM_PUBLIC
void
EXCL_move
(
unsigned
int
x
,
unsigned
int
y
)
{
fprintf
(
gpoutfile
,
TALGMV
,
1000
+
x
,
EXCL_YLAST
+
1000
-
y
);
/* ^pen up vector */
}
TERM_PUBLIC
void
EXCL_vector
(
unsigned
int
x2
,
unsigned
int
y2
)
{
fprintf
(
gpoutfile
,
TALGDW
,
1000
+
x2
,
EXCL_YLAST
+
1000
-
y2
);
/* ^pen down vector */
}
TERM_PUBLIC
void
EXCL_put_text
(
unsigned
int
x
,
unsigned
int
y
,
const
char
str
[])
{
char
ch
;
EXCL_move
(
x
,
y
-
EXCL_VCHAR
/
3
);
ch
=
*
str
++
;
while
(
ch
!=
NUL
) {
putc
(
ch
,
gpoutfile
);
ch
=
*
str
++
;
}
}
TERM_PUBLIC
void
EXCL_reset
()
{
fprintf
(
gpoutfile
,
"%s%s"
,
TALFPO
,
TALPOP
);
/* ^pageout ^pop */
}
#endif
/* TERM_BODY */
#ifdef
TERM_TABLE
TERM_TABLE_START
(
excl_driver
)
"excl"
,
"Talaris EXCL Laser printer (also Talaris 1590 and others)"
,
EXCL_XMAX
,
EXCL_YMAX
,
EXCL_VCHAR
,
EXCL_HCHAR
,
EXCL_VTIC
,
EXCL_HTIC
,
options_null
,
EXCL_init
,
EXCL_reset
,
EXCL_text
,
null_scale
,
EXCL_graphics
,
EXCL_move
,
EXCL_vector
,
EXCL_linetype
,
EXCL_put_text
,
null_text_angle
,
null_justify_text
,
line_and_point
,
do_arrow
,
set_font_null
TERM_TABLE_END
(
excl_driver
)
#undef
LAST_TERM
#define
LAST_TERM
excl_driver
#endif
/* TERM_TABLE */
#endif
/* TERM_PROTO_ONLY */
#ifdef
TERM_HELP
START_HELP
(
excl
)
"1 excl"
,
"?commands set terminal excl"
,
"?set terminal excl"
,
"?set term excl"
,
"?terminal excl"
,
"?term excl"
,
"?excl"
,
" Note: legacy terminal. "
,
" The `excl` terminal driver supports Talaris printers such as the EXCL Laser"
,
" printer and the 1590. It has no options."
END_HELP
(
excl
)
#endif
Back
|
FazBrowse Home
|
New Git URL