forked from pool/gnuplot
3920cf6456
- Update to 4.6.1 * Bug fixes. * Support tabulation of variable color column. * Support tabulation (set table) of pixel values from image plot styles - Remove now obsolete patches gnuplot-automake.diff and gnuplot-4.6.0-fix-format-errors.diff. OBS-URL: https://build.opensuse.org/request/show/140325 OBS-URL: https://build.opensuse.org/package/show/Publishing/gnuplot?expand=0&rev=47
36 lines
908 B
Plaintext
36 lines
908 B
Plaintext
--- src/gplt_x11.c.orig 2012-05-07 18:53:08.000000000 +0200
|
|
+++ src/gplt_x11.c 2012-11-06 10:24:58.000000000 +0100
|
|
@@ -900,6 +900,8 @@
|
|
nfds = cn + 1;
|
|
|
|
while (1) {
|
|
+ int ipc;
|
|
+
|
|
XFlush(dpy); /* see above */
|
|
|
|
FD_ZERO(&tset);
|
|
@@ -937,7 +939,11 @@
|
|
process_event(&xe);
|
|
}
|
|
}
|
|
- if ((X11_ipc = fopen(X11_ipcpath, "r"))) {
|
|
+
|
|
+ if ((ipc = open(X11_ipcpath, O_RDONLY|O_CREAT|O_CLOEXEC|O_EXCL)) < 0)
|
|
+ break;
|
|
+
|
|
+ if ((X11_ipc = dfopen(ipc, "r"))) {
|
|
unlink(X11_ipcpath);
|
|
record();
|
|
fclose(X11_ipc);
|
|
@@ -1160,8 +1166,8 @@
|
|
static int
|
|
read_input()
|
|
{
|
|
- static int rdbuf_size = 10 * X11_COMMAND_BUFFER_LENGTH;
|
|
- static char rdbuf[10 * X11_COMMAND_BUFFER_LENGTH];
|
|
+ const int rdbuf_size = 10 * X11_COMMAND_BUFFER_LENGTH;
|
|
+ static char rdbuf[(10 * X11_COMMAND_BUFFER_LENGTH)+1];
|
|
static int total_chars;
|
|
static int rdbuf_offset;
|
|
static int buf_offset;
|