FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gnuplot/src/gplt_x11.h at branch-4-2-stable · gnuplot/gnuplot · GitHub
gnuplot
gnuplot
Repository navigation
Code
Pull requests
2
(2)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
gnuplot
/
src
/
gplt_x11.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
99 lines (86 loc) · 3.62 KB
Breadcrumbs
gnuplot
/
src
/
gplt_x11.h
Copy path
File metadata and controls
99 lines (86 loc) · 3.62 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
/* GNUPLOT - gplt_x11.h */
/*[
* Copyright 2000 Thomas Williams, Colin Kelley
*
* 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.
]*/
#ifndef
GNUPLOT_GPLT_X11_H
#define
GNUPLOT_GPLT_X11_H
#if
defined(
HAVE_SYS_SELECT_H
)
&&
!defined(
VMS
)
# include
<sys/select.h>
#endif
#ifndef
FD_SET
# define
FD_SET
(
n
,
p
) ((p)->fds_bits[0] |= (1 << ((n) % 32)))
# define
FD_CLR
(
n
,
p
) ((p)->fds_bits[0] &= ~(1 << ((n) % 32)))
# define
FD_ISSET
(
n
,
p
) ((p)->fds_bits[0] & (1 << ((n) % 32)))
# define
FD_ZERO
(
p
) memset((char *)(p), '\0', sizeof(*(p)))
#endif
/* not FD_SET */
#define
X11_COMMAND_BUFFER_LENGTH
1024
#if
defined(
WITH_IMAGE
)
||
defined(
BINARY_X11_POLYGON
)
/* The endian value sent across the pipe can't have '\n' or '\0' within. */
#define
ENDIAN_VALUE
0x50515253
#define
X11_GR_CHECK_ENDIANESS
'B'
#endif
#define
X11_GR_MAKE_PALETTE
'p'
#define
X11_GR_RELEASE_PALETTE
'e'
#define
X11_GR_SET_COLOR
'c'
#define
X11_GR_SET_RGBCOLOR
'g'
#define
X11_GR_SET_LINECOLOR
'l'
#define
X11_GR_FILLED_POLYGON
'f'
#ifdef
WITH_IMAGE
#define
X11_GR_IMAGE
'i'
#endif
#if
defined(
WITH_IMAGE
)
||
defined(
BINARY_X11_POLYGON
)
/* One character for function code, and perhaps one or two for the core
* routine to do something strange with end of buffer. So shorten by a
* few by trial and error.
*/
#define
BINARY_MAX_CHAR_PER_TRANSFER
(X11_COMMAND_BUFFER_LENGTH-3)
/* Encoding character for removing '\n' and '\0' from data stream.
* The strategy is as follows, we pick a character half way between
* '\0' and '\n'. Then the encoded characters occupy a range
* of 10. Next, by observing statistics of the occurrances
* of the encoded characters in the binary data, the translation
* character is chosen so that these encoded characters are moved
* to locations having the least occurances of bytes.
*/
#define
SET_COLOR_CODE_CHAR
5
#define
FILLED_POLYGON_CODE_CHAR
5
#define
IMAGE_CODE_CHAR
1
/* Translation value for making '\0', '\n' and the CODE_CHAR
* less prevalent in the encoded data.
*/
#define
SET_COLOR_TRANSLATION_CHAR
3
#define
FILLED_POLYGON_TRANSLATION_CHAR
-13
#define
IMAGE_TRANSLATION_CHAR
45
#endif
#ifdef
WITH_IMAGE
/* Maximum image plane value of data transfer.
*/
#define
IMAGE_PALETTE_VALUE_MAX
USHRT_MAX
#endif
#endif
/* GNUPLOT_GPLT_X11_H */
Back
|
FazBrowse Home
|
New Git URL