summaryrefslogtreecommitdiff
path: root/x11/hanterm/patches/patch-ab
blob: 6579b72877d8e505b8ac3d1f70659a750f78ad4f (plain)
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
$NetBSD: patch-ab,v 1.1 2001/05/03 18:37:48 fredb Exp $

--- charproc.c.orig	Tue Nov 28 04:44:05 2000
+++ charproc.c
@@ -46,6 +46,8 @@
 #include <setjmp.h>
 #include <ctype.h>
 #include <X11/keysym.h>
+#include <sys/types.h>
+
 #include "hangul.h"
 #include "hstrdefs.h"
 
@@ -1755,7 +1757,7 @@
 static char *v_bufstr = NULL;	/* beginning of area to write */
 static char *v_bufptr;		/* end of area to write */
 static char *v_bufend;		/* end of physical buffer */
-#if !defined(linux) && !defined(SVR4)	/* dkim@surecom.com */
+#ifdef VMS
 #define	ptymask()	(v_bufptr > v_bufstr ? pty_mask : 0)
 #endif
 
@@ -1783,7 +1785,7 @@
 	fprintf(stderr, "\n");
 #endif
 
-#if defined(linux) || defined(SVR4)
+#ifndef VMS
 	if (f != pty_mask)
 #else
 	if ((1 << f) != pty_mask)
@@ -1908,7 +1910,7 @@
 	return(c);
 }
 
-#if (defined(linux)||defined(SVR4))||(defined(hpux) && OSMAJORVERSION >= 10)
+#ifndef VMS
 static fd_set select_mask;
 static fd_set write_mask;
 #else
@@ -1924,7 +1926,7 @@
     static struct timeval select_timeout;
 
     for( ; ; ) {
-#if defined(linux)||defined(SVR4)||(defined(hpux) && OSMAJORVERSION >= 10)
+#ifndef VMS
 	if (FD_ISSET(pty_mask, &select_mask) && eventMode == NORMAL) {
 #else
 	if (select_mask & pty_mask && eventMode == NORMAL) {
@@ -1984,7 +1986,7 @@
 		/* stop speed reading at some point to look for X stuff */
 		/* (4096 is just a random large number.) */
 		if (pty_read_bytes > 4096) {
-#if defined(linux)||defined(SVR4)||(defined(hpux) && OSMAJORVERSION >= 10)
+#ifndef VMS
 		    FD_CLR(pty_mask, &select_mask);
 #else
 		    select_mask &= ~pty_mask;
@@ -2014,7 +2016,7 @@
 	/* Update the masks and, unless X events are already in the queue,
 	   wait for I/O to be possible. */
 	select_mask = Select_mask;
-#if defined(linux) || defined(SVR4) ||(defined(hpux) && OSMAJORVERSION >= 10)
+#ifndef VMS
 	if (v_bufptr > v_bufstr)
 	  FD_SET(pty_mask, &write_mask);
        else
@@ -2028,7 +2030,7 @@
 /* by sangil's report */
 /* #if defined(linux)||defined(SVR4)
     ||(defined(hpux) && OSMAJORVERSION >= 10) */
-#if defined(linux)||defined(SVR4)
+#ifndef VMS
 	if (QLength (screen->display))
 	{
 	    i = select(max_plus1, (fd_set*) &select_mask, (fd_set*) &write_mask, (fd_set *)NULL, (struct timeval *) &select_timeout);
@@ -2054,7 +2056,7 @@
 	} 
 
 	/* if there is room to write more data to the pty, go write more */
-#if defined(linux)||defined(SVR4)||(defined(hpux) && OSMAJORVERSION >= 10)
+#ifndef VMS
 	if ((v_bufptr > v_bufstr) && FD_ISSET(pty_mask, &write_mask)) {
 #else
 	if (write_mask & ptymask()) {
@@ -2064,7 +2066,7 @@
 
 	/* if there are X events already in our queue, it
 	   counts as being readable */
-#if defined(linux)||defined(SVR4)||(defined(hpux) && OSMAJORVERSION >= 10)
+#ifndef VMS
 	if (QLength(screen->display) || (FD_ISSET(X_mask, &select_mask))) {
 #else
 	if (QLength(screen->display) || (select_mask & X_mask)) {