mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-25 00:05:16 +00:00
More XC_ prefixes. Ugly, but the namespace is cleaner. Still more to do.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
RCSID("$Id: pdcclip.c,v 1.20 2006/07/30 23:03:33 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcclip.c,v 1.21 2006/07/30 23:57:04 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -57,13 +57,13 @@ int PDC_getclipboard(char **contents, long *length)
|
||||
|
||||
XCursesInstructAndWait(CURSES_GET_SELECTION);
|
||||
|
||||
if (XC_read_socket(display_sock, (char *)&result, sizeof(int)) < 0)
|
||||
if (XC_read_socket(XC_display_sock, (char *)&result, sizeof(int)) < 0)
|
||||
XCursesExitCursesProcess(5,
|
||||
"exiting from PDC_getclipboard");
|
||||
|
||||
if (result == PDC_CLIP_SUCCESS)
|
||||
{
|
||||
if (XC_read_socket(display_sock, (char *)&len, sizeof(int)) < 0)
|
||||
if (XC_read_socket(XC_display_sock, (char *)&len, sizeof(int)) < 0)
|
||||
XCursesExitCursesProcess(5,
|
||||
"exiting from PDC_getclipboard");
|
||||
|
||||
@@ -75,7 +75,7 @@ int PDC_getclipboard(char **contents, long *length)
|
||||
XCursesExitCursesProcess(6, "exiting from "
|
||||
"PDC_getclipboard - synchronization error");
|
||||
|
||||
if (XC_read_socket(display_sock, *contents, len) < 0)
|
||||
if (XC_read_socket(XC_display_sock, *contents, len) < 0)
|
||||
XCursesExitCursesProcess(5,
|
||||
"exiting from PDC_getclipboard");
|
||||
|
||||
@@ -117,9 +117,9 @@ int PDC_setclipboard(const char *contents, long length)
|
||||
|
||||
/* Write, then wait for X to do its stuff; expect return code. */
|
||||
|
||||
if (XC_write_socket(display_sock, (char *)&length, sizeof(long)) >= 0)
|
||||
if (XC_write_socket(display_sock, contents, length) >= 0)
|
||||
if (XC_read_socket(display_sock, (char *)&rc, sizeof(int)) >= 0)
|
||||
if (XC_write_socket(XC_display_sock, (char *)&length, sizeof(long)) >= 0)
|
||||
if (XC_write_socket(XC_display_sock, contents, length) >= 0)
|
||||
if (XC_read_socket(XC_display_sock, (char *)&rc, sizeof(int)) >= 0)
|
||||
return rc;
|
||||
|
||||
XCursesExitCursesProcess(5, "exiting from PDC_setclipboard");
|
||||
@@ -181,8 +181,8 @@ int PDC_clearclipboard(void)
|
||||
|
||||
/* Write, then wait for X to do its stuff; expect return code. */
|
||||
|
||||
if (XC_write_socket(display_sock, (char *)&len, sizeof(long)) >= 0)
|
||||
if (XC_read_socket(display_sock, (char *)&rc, sizeof(int)) >= 0)
|
||||
if (XC_write_socket(XC_display_sock, (char *)&len, sizeof(long)) >= 0)
|
||||
if (XC_read_socket(XC_display_sock, (char *)&rc, sizeof(int)) >= 0)
|
||||
return rc;
|
||||
|
||||
XCursesExitCursesProcess(5, "exiting from PDC_clearclipboard");
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcdisp.c,v 1.34 2006/07/30 23:03:33 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcdisp.c,v 1.35 2006/07/30 23:57:04 wmcbrine Exp $");
|
||||
|
||||
int PDC_display_cursor(int oldrow, int oldcol, int newrow, int newcol,
|
||||
int visibility)
|
||||
@@ -55,7 +55,7 @@ int PDC_display_cursor(int oldrow, int oldcol, int newrow, int newcol,
|
||||
idx += sizeof(int);
|
||||
}
|
||||
|
||||
if (XC_write_socket(display_sock, buf, idx) < 0)
|
||||
if (XC_write_socket(XC_display_sock, buf, idx) < 0)
|
||||
XCursesExitCursesProcess(1,
|
||||
"exiting from PDC_display_cursor");
|
||||
|
||||
|
||||
10
x11/pdckbd.c
10
x11/pdckbd.c
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "pdcx11.h"
|
||||
|
||||
RCSID("$Id: pdckbd.c,v 1.32 2006/07/30 23:03:33 wmcbrine Exp $");
|
||||
RCSID("$Id: pdckbd.c,v 1.33 2006/07/30 23:57:04 wmcbrine Exp $");
|
||||
|
||||
MOUSE_STATUS Trapped_Mouse_status;
|
||||
|
||||
@@ -34,7 +34,7 @@ static bool PDC_kbhit(void)
|
||||
/* Is something ready to be read on the socket ? Must be a key. */
|
||||
|
||||
FD_ZERO(&readfds);
|
||||
FD_SET(key_sock, &readfds);
|
||||
FD_SET(XC_key_sock, &readfds);
|
||||
|
||||
if ((s = select(FD_SETSIZE, (FD_SET_CAST)&readfds, NULL,
|
||||
NULL, &socket_timeout)) < 0)
|
||||
@@ -59,7 +59,7 @@ int PDC_get_bios_key(void)
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (XC_read_socket(key_sock, (char *)&newkey,
|
||||
if (XC_read_socket(XC_key_sock, (char *)&newkey,
|
||||
sizeof(unsigned long)) < 0)
|
||||
XCursesExitCursesProcess(2,
|
||||
"exiting from PDC_get_bios_key");
|
||||
@@ -69,7 +69,7 @@ int PDC_get_bios_key(void)
|
||||
|
||||
if (key == KEY_MOUSE)
|
||||
{
|
||||
if (XC_read_socket(key_sock, (char *)&Trapped_Mouse_status,
|
||||
if (XC_read_socket(XC_key_sock, (char *)&Trapped_Mouse_status,
|
||||
sizeof(MOUSE_STATUS)) < 0)
|
||||
XCursesExitCursesProcess(2,
|
||||
"exiting from PDC_get_bios_key");
|
||||
@@ -126,7 +126,7 @@ unsigned long PDC_get_input_fd(void)
|
||||
{
|
||||
PDC_LOG(("PDC_get_input_fd() - called\n"));
|
||||
|
||||
return key_sock;
|
||||
return XC_key_sock;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcsetsc.c,v 1.21 2006/07/30 23:03:33 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcsetsc.c,v 1.22 2006/07/30 23:57:04 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -95,7 +95,7 @@ void PDC_set_title(const char *title)
|
||||
XCursesInstruct(CURSES_TITLE);
|
||||
|
||||
if (XC_write_display_socket_int(len) >= 0)
|
||||
if (XC_write_socket(display_sock, title, len) >= 0)
|
||||
if (XC_write_socket(XC_display_sock, title, len) >= 0)
|
||||
return;
|
||||
|
||||
XCursesExitCursesProcess(1, "exiting from PDC_set_title");
|
||||
|
||||
32
x11/pdcx11.c
32
x11/pdcx11.c
@@ -19,7 +19,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
RCSID("$Id: pdcx11.c,v 1.79 2006/07/30 23:03:33 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcx11.c,v 1.80 2006/07/30 23:57:04 wmcbrine Exp $");
|
||||
|
||||
|
||||
/*** Functions that are called by both processes ***/
|
||||
@@ -34,11 +34,11 @@ int shmkey_Xcurscr;
|
||||
int otherpid;
|
||||
int XCursesLINES = 24;
|
||||
int XCursesCOLS = 80;
|
||||
int display_sock;
|
||||
int key_sock;
|
||||
int XC_display_sock;
|
||||
int XC_key_sock;
|
||||
int display_sockets[2];
|
||||
int key_sockets[2];
|
||||
int exit_sock;
|
||||
int XC_exit_sock;
|
||||
|
||||
fd_set readfds;
|
||||
fd_set writefds;
|
||||
@@ -73,7 +73,7 @@ int XC_write_socket(int sock_num, const char *buf, int len)
|
||||
XCLOGMSG, sock_num, len));
|
||||
|
||||
#ifdef MOUSE_DEBUG
|
||||
if (sock_num == key_sock)
|
||||
if (sock_num == XC_key_sock)
|
||||
printf("%s:XC_write_socket(key) len: %d\n", XCLOGMSG, len);
|
||||
#endif
|
||||
while (1)
|
||||
@@ -100,11 +100,11 @@ int XC_read_socket(int sock_num, char *buf, int len)
|
||||
rc = read(sock_num, buf + start, length);
|
||||
|
||||
#ifdef MOUSE_DEBUG
|
||||
if (sock_num == key_sock)
|
||||
if (sock_num == XC_key_sock)
|
||||
printf("%s:XC_read_socket(key) rc %d errno %d resized: %d\n",
|
||||
XCLOGMSG, rc, errno, SP->resized);
|
||||
#endif
|
||||
if (rc < 0 && sock_num == key_sock && errno == EINTR
|
||||
if (rc < 0 && sock_num == XC_key_sock && errno == EINTR
|
||||
&& SP->resized != FALSE)
|
||||
{
|
||||
MOUSE_LOG(("%s:continuing\n", XCLOGMSG));
|
||||
@@ -131,7 +131,7 @@ int XC_read_socket(int sock_num, char *buf, int len)
|
||||
|
||||
int XC_write_display_socket_int(int x)
|
||||
{
|
||||
return XC_write_socket(display_sock, (char *)&x, sizeof(int));
|
||||
return XC_write_socket(XC_display_sock, (char *)&x, sizeof(int));
|
||||
}
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ int XCursesInstructAndWait(int flag)
|
||||
|
||||
/* wait for X to say the refresh has occurred*/
|
||||
|
||||
if (XC_read_socket(display_sock, (char *)&result, sizeof(int)) < 0)
|
||||
if (XC_read_socket(XC_display_sock, (char *)&result, sizeof(int)) < 0)
|
||||
XCursesExitCursesProcess(5,
|
||||
"exiting from XCursesInstructAndWait");
|
||||
|
||||
@@ -181,13 +181,13 @@ static int XCursesSetupCurses(void)
|
||||
close(display_sockets[1]);
|
||||
close(key_sockets[1]);
|
||||
|
||||
display_sock = display_sockets[0];
|
||||
key_sock = key_sockets[0];
|
||||
XC_display_sock = display_sockets[0];
|
||||
XC_key_sock = key_sockets[0];
|
||||
|
||||
FD_ZERO(&readfds);
|
||||
FD_ZERO(&writefds);
|
||||
|
||||
XC_read_socket(display_sock, (char *)&wait_value, sizeof(int));
|
||||
XC_read_socket(XC_display_sock, (char *)&wait_value, sizeof(int));
|
||||
|
||||
if (wait_value != CURSES_CHILD)
|
||||
return ERR;
|
||||
@@ -312,11 +312,11 @@ static void XCursesCleanupCursesProcess(int rc)
|
||||
PDC_LOG(("%s:XCursesCleanupCursesProcess() - called: %d\n",
|
||||
XCLOGMSG, rc));
|
||||
|
||||
shutdown(display_sock, 2);
|
||||
close(display_sock);
|
||||
shutdown(XC_display_sock, 2);
|
||||
close(XC_display_sock);
|
||||
|
||||
shutdown(key_sock, 2);
|
||||
close(key_sock);
|
||||
shutdown(XC_key_sock, 2);
|
||||
close(XC_key_sock);
|
||||
|
||||
shmdt((char *)SP);
|
||||
shmdt((char *)Xcurscr);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* See the file maintain.er for details of the current maintainer. *
|
||||
************************************************************************/
|
||||
|
||||
/* $Id: pdcx11.h,v 1.46 2006/07/30 23:03:33 wmcbrine Exp $ */
|
||||
/* $Id: pdcx11.h,v 1.47 2006/07/30 23:57:04 wmcbrine Exp $ */
|
||||
|
||||
#define CURSES_LIBRARY 1
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@@ -180,11 +180,11 @@ extern int otherpid;
|
||||
extern int XCursesLINES;
|
||||
extern int XCursesCOLS;
|
||||
extern unsigned char *atrtab;
|
||||
extern int display_sock;
|
||||
extern int key_sock;
|
||||
extern int XC_display_sock;
|
||||
extern int XC_key_sock;
|
||||
extern int display_sockets[2];
|
||||
extern int key_sockets[2];
|
||||
extern int exit_sock;
|
||||
extern int XC_exit_sock;
|
||||
|
||||
typedef RETSIGTYPE (*signal_handler)();
|
||||
|
||||
|
||||
60
x11/x11.c
60
x11/x11.c
@@ -32,7 +32,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: x11.c,v 1.5 2006/07/30 23:03:33 wmcbrine Exp $");
|
||||
RCSID("$Id: x11.c,v 1.6 2006/07/30 23:57:04 wmcbrine Exp $");
|
||||
|
||||
#ifndef XPOINTER_TYPEDEFED
|
||||
typedef char * XPointer;
|
||||
@@ -111,7 +111,7 @@ struct XCursesKey
|
||||
|
||||
typedef struct XCursesKey XCURSESKEY;
|
||||
|
||||
XCURSESKEY XCursesKeys[] =
|
||||
static XCURSESKEY XCursesKeys[] =
|
||||
{
|
||||
/* keycode keypad normal shifted control alt*/
|
||||
{XK_Left, FALSE, KEY_LEFT, KEY_SLEFT, CTL_LEFT, ALT_LEFT},
|
||||
@@ -446,6 +446,7 @@ static const int compose_keys[MAX_COMPOSE_PRE][MAX_COMPOSE_CHARS] =
|
||||
#define BITMAPDEPTH 1
|
||||
|
||||
unsigned long pdc_key_modifiers = 0L;
|
||||
|
||||
static GC normal_gc, block_cursor_gc, rect_cursor_gc, italic_gc, border_gc;
|
||||
static int XCursesFontHeight, XCursesFontWidth,
|
||||
XCursesFontAscent, XCursesFontDescent,
|
||||
@@ -1317,8 +1318,8 @@ static void XCursesGetIcon(void)
|
||||
int size_count = 0;
|
||||
Status rc;
|
||||
unsigned char *bitmap_bits = NULL;
|
||||
unsigned int icon_bitmap_width = 0, icon_bitmap_height = 0;
|
||||
unsigned int file_bitmap_width = 0, file_bitmap_height = 0;
|
||||
unsigned int icon_bitmap_width = 0, icon_bitmap_height = 0,
|
||||
file_bitmap_width = 0, file_bitmap_height = 0;
|
||||
|
||||
PDC_LOG(("%s:XCursesGetIcon\n", XCLOGMSG));
|
||||
|
||||
@@ -1332,8 +1333,7 @@ static void XCursesGetIcon(void)
|
||||
|
||||
if (rc && size_count)
|
||||
{
|
||||
int i;
|
||||
int max_height = 0, max_width = 0;
|
||||
int i, max_height = 0, max_width = 0;
|
||||
|
||||
PDC_LOG(("%s:size_count: %d rc: %d\n",
|
||||
XCLOGMSG, size_count, rc));
|
||||
@@ -2466,7 +2466,7 @@ static void XCursesSendKeyToCurses(unsigned long key, MOUSE_STATUS *ms)
|
||||
PDC_LOG(("%s:XCursesSendKeyToCurses() - called: sending %d\n",
|
||||
XCLOGMSG, key));
|
||||
|
||||
if (XC_write_socket(key_sock, (char *)&key, sizeof(unsigned long)) < 0)
|
||||
if (XC_write_socket(XC_key_sock, (char *)&key, sizeof(unsigned long)) < 0)
|
||||
XCursesExitXCursesProcess(1, SIGKILL,
|
||||
"exiting from XCursesSendKeyToCurses");
|
||||
|
||||
@@ -2474,7 +2474,7 @@ static void XCursesSendKeyToCurses(unsigned long key, MOUSE_STATUS *ms)
|
||||
{
|
||||
MOUSE_LOG(("%s:writing mouse stuff\n", XCLOGMSG));
|
||||
|
||||
if (XC_write_socket(key_sock, (char *)&Mouse_status,
|
||||
if (XC_write_socket(XC_key_sock, (char *)&Mouse_status,
|
||||
sizeof(MOUSE_STATUS)) < 0)
|
||||
XCursesExitXCursesProcess(1, SIGKILL,
|
||||
"exiting from XCursesSendKeyToCurses");
|
||||
@@ -2519,7 +2519,7 @@ static void XCursesButton(Widget w, XEvent *event, String *params,
|
||||
static int last_button_no = 0;
|
||||
static Time last_button_press_time = 0;
|
||||
MOUSE_STATUS save_mouse_status;
|
||||
bool send_key=TRUE;
|
||||
bool send_key = TRUE;
|
||||
static bool remove_release;
|
||||
static bool handle_real_release;
|
||||
|
||||
@@ -2965,14 +2965,14 @@ static void XCursesExitXCursesProcess(int rc, int sig, char *msg)
|
||||
|
||||
XCursesEndwin();
|
||||
|
||||
shutdown(display_sock, 2);
|
||||
close(display_sock);
|
||||
shutdown(XC_display_sock, 2);
|
||||
close(XC_display_sock);
|
||||
|
||||
shutdown(exit_sock, 2);
|
||||
close(exit_sock);
|
||||
shutdown(XC_exit_sock, 2);
|
||||
close(XC_exit_sock);
|
||||
|
||||
shutdown(key_sock, 2);
|
||||
close(key_sock);
|
||||
shutdown(XC_key_sock, 2);
|
||||
close(XC_key_sock);
|
||||
|
||||
if (sig)
|
||||
kill(otherpid, sig); /* to kill parent process */
|
||||
@@ -3008,7 +3008,7 @@ static void XCursesProcessRequestsFromCurses(XtPointer client_data, int *fid,
|
||||
return;
|
||||
|
||||
FD_ZERO(&readfds);
|
||||
FD_SET(display_sock, &readfds);
|
||||
FD_SET(XC_display_sock, &readfds);
|
||||
|
||||
if ((s = select(FD_SETSIZE, (FD_SET_CAST)&readfds, NULL,
|
||||
NULL, &socket_timeout)) < 0)
|
||||
@@ -3018,7 +3018,7 @@ static void XCursesProcessRequestsFromCurses(XtPointer client_data, int *fid,
|
||||
if (s == 0) /* no requests pending - should never happen!*/
|
||||
return;
|
||||
|
||||
if (FD_ISSET(display_sock, &readfds))
|
||||
if (FD_ISSET(XC_display_sock, &readfds))
|
||||
{
|
||||
/* read first integer to determine total message has
|
||||
been received */
|
||||
@@ -3026,7 +3026,7 @@ static void XCursesProcessRequestsFromCurses(XtPointer client_data, int *fid,
|
||||
PDC_LOG(("%s:XCursesProcessRequestsFromCurses() - "
|
||||
"before XC_read_socket()\n", XCLOGMSG));
|
||||
|
||||
if (XC_read_socket(display_sock, (char *)&num_cols, sizeof(int)) < 0)
|
||||
if (XC_read_socket(XC_display_sock, (char *)&num_cols, sizeof(int)) < 0)
|
||||
XCursesExitXCursesProcess(3, SIGKILL, "exiting from "
|
||||
"XCursesProcessRequestsFromCurses - first read");
|
||||
|
||||
@@ -3062,7 +3062,7 @@ static void XCursesProcessRequestsFromCurses(XtPointer client_data, int *fid,
|
||||
|
||||
case CURSES_CURSOR:
|
||||
XC_LOG(("CURSES_CURSOR received from child\n"));
|
||||
if (XC_read_socket(display_sock, buf, sizeof(int) * 2) < 0)
|
||||
if (XC_read_socket(XC_display_sock, buf, sizeof(int) * 2) < 0)
|
||||
XCursesExitXCursesProcess(5, SIGKILL,
|
||||
"exiting from CURSES_CURSOR "
|
||||
"XCursesProcessRequestsFromCurses");
|
||||
@@ -3119,12 +3119,12 @@ static void XCursesProcessRequestsFromCurses(XtPointer client_data, int *fid,
|
||||
case CURSES_TITLE:
|
||||
XC_LOG(("CURSES_TITLE received from child\n"));
|
||||
|
||||
if (XC_read_socket(display_sock, (char *)&pos, sizeof(int)) < 0)
|
||||
if (XC_read_socket(XC_display_sock, (char *)&pos, sizeof(int)) < 0)
|
||||
XCursesExitXCursesProcess(5, SIGKILL,
|
||||
"exiting from CURSES_TITLE "
|
||||
"XCursesProcessRequestsFromCurses");
|
||||
|
||||
if (XC_read_socket(display_sock, title, pos) < 0)
|
||||
if (XC_read_socket(XC_display_sock, title, pos) < 0)
|
||||
XCursesExitXCursesProcess(5, SIGKILL,
|
||||
"exiting from CURSES_TITLE "
|
||||
"XCursesProcessRequestsFromCurses");
|
||||
@@ -3195,7 +3195,7 @@ static void XCursesProcessRequestsFromCurses(XtPointer client_data, int *fid,
|
||||
case CURSES_SET_SELECTION:
|
||||
XC_LOG(("CURSES_SET_SELECTION received from child\n"));
|
||||
|
||||
if (XC_read_socket(display_sock, (char *)&length,
|
||||
if (XC_read_socket(XC_display_sock, (char *)&length,
|
||||
sizeof(long)) < 0)
|
||||
XCursesExitXCursesProcess(5, SIGKILL,
|
||||
"exiting from CURSES_SET_SELECTION "
|
||||
@@ -3219,7 +3219,7 @@ static void XCursesProcessRequestsFromCurses(XtPointer client_data, int *fid,
|
||||
break;
|
||||
}
|
||||
|
||||
if (XC_read_socket(display_sock, (char *)tmpsel,
|
||||
if (XC_read_socket(XC_display_sock, (char *)tmpsel,
|
||||
length * sizeof(chtype)) < 0)
|
||||
XCursesExitXCursesProcess(5, SIGKILL,
|
||||
"exiting from CURSES_SET_SELECTION "
|
||||
@@ -3289,11 +3289,11 @@ int XCursesSetupX(int argc, char *argv[])
|
||||
process can send a CURSES_EXIT to itself from within the
|
||||
signal handler */
|
||||
|
||||
exit_sock = display_sockets[0];
|
||||
display_sock = display_sockets[1];
|
||||
XC_exit_sock = display_sockets[0];
|
||||
XC_display_sock = display_sockets[1];
|
||||
|
||||
close(key_sockets[0]);
|
||||
key_sock = key_sockets[1];
|
||||
XC_key_sock = key_sockets[1];
|
||||
|
||||
/* Trap all signals when XCurses is the child process, but only
|
||||
if they haven't already been ignored by the application. */
|
||||
@@ -3506,10 +3506,10 @@ int XCursesSetupX(int argc, char *argv[])
|
||||
|
||||
XtAddEventHandler(topLevel, 0, True, XCursesNonmaskable, NULL);
|
||||
|
||||
/* Add input handler from display_sock (requests from curses
|
||||
/* Add input handler from XC_display_sock (requests from curses
|
||||
program) */
|
||||
|
||||
XtAppAddInput(app_context, display_sock,
|
||||
XtAppAddInput(app_context, XC_display_sock,
|
||||
(XtPointer)XtInputReadMask,
|
||||
XCursesProcessRequestsFromCurses, NULL);
|
||||
|
||||
@@ -3715,7 +3715,7 @@ static RETSIGTYPE XCursesSignalHandler(int signo)
|
||||
|
||||
/* Send a CURSES_EXIT to myself */
|
||||
|
||||
if (XC_write_socket(exit_sock, (char *)&flag, sizeof(int)) < 0)
|
||||
if (XC_write_socket(XC_exit_sock, (char *)&flag, sizeof(int)) < 0)
|
||||
XCursesExitXCursesProcess(7, signo,
|
||||
"exiting from XCursesSignalHandler");
|
||||
}
|
||||
@@ -3741,7 +3741,7 @@ static void XCursesRequestorCallbackForGetSelection(Widget w, XtPointer data,
|
||||
|
||||
if (XC_write_display_socket_int(PDC_CLIP_SUCCESS) >= 0)
|
||||
if (XC_write_display_socket_int((int)(*length)) >= 0)
|
||||
if (XC_write_socket(display_sock, (char *)value, *length) >= 0)
|
||||
if (XC_write_socket(XC_display_sock, (char *)value, *length) >= 0)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user