-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgucs.c
118 lines (101 loc) · 4.54 KB
/
gucs.c
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
#include "plotpg.h"
/*
* Sets a bunch of GUCs. Called at so load.
*
* Includes gucs for a subset of gnuplot's set commands.
*
*/
void _PG_init(void) {
/* Output mode for plots. svg or dumb. Review how to make the so load at server start. */
DefineCustomStringVariable("plotpg.terminal", "gnuplot terminals 'svg', 'dumb' supported",
NULL, &gnuplot_terminal, "dumb", PGC_USERSET, 0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.size", "The gnuplot size command",
NULL, &gnuplot_size, "", PGC_USERSET, 0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.title",
"Plot title",
NULL,
&gnuplot_title,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.xlabel",
"label for the xaxis",
NULL,
&gnuplot_xlabel,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.ylabel",
"label for the y axis",
NULL,
&gnuplot_ylabel,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.xrange",
"range for x-axis",
NULL,
&gnuplot_xrange,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.yrange",
"range for y axis",
NULL,
&gnuplot_yrange,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.xtics",
"gnuplot xtics setting",
NULL,
&gnuplot_xtics,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.ytics",
"gnuplot ytics setting",
NULL,
&gnuplot_ytics,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.key",
"gnuplot key setting",
NULL,
&gnuplot_key,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
DefineCustomStringVariable("plotpg.border",
"gnuplot border setting",
NULL,
&gnuplot_border,
"",
PGC_USERSET,
0,
NULL, NULL, NULL);
// A debug option
DefineCustomIntVariable("plotpg.persist",
"plotpg will leave gnuplot script and output files in /tmp when set to 1.",
NULL,
&plotpg_persist,
0,
0,
INT_MAX,
PGC_SIGHUP,
0,
NULL,
NULL,
NULL);
}