Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/editors/beav/files/patch-tcap.c
16461 views
1
--- tcap.c.orig 2013-12-12 17:16:34.000000000 +0100
2
+++ tcap.c 2013-12-12 17:17:40.000000000 +0100
3
@@ -41,11 +41,12 @@ char *UP, PC, *CM, *CE, *CL, *SO, *SE, *
4
5
#ifdef BSD
6
#include <sys/ioctl.h>
7
+#ifdef TIOCGWINSZ
8
struct winsize ttysize;
9
-#endif /* BSD */
10
-#ifdef ULTRIX
11
-struct winsize ttysize;
12
+#else
13
+struct ttysize ttysize;
14
#endif
15
+#endif /* BSD */
16
17
void
18
putpad (str)
19
@@ -62,9 +63,6 @@ tcapopen ()
20
char tcbuf[1024];
21
char *tv_stype;
22
char err_str[NCOL];
23
-#ifdef ULTRIX
24
- struct winsize ttysize;
25
-#endif
26
27
nrow = NROW;
28
29
@@ -89,7 +87,7 @@ tcapopen ()
30
31
32
#ifdef BSD
33
-#ifdef ULTRIX
34
+#ifdef TIOCGWINSZ
35
if (ioctl (0, TIOCGWINSZ, &ttysize) == 0
36
&& ttysize.ws_row > 0)
37
{
38
@@ -103,7 +101,7 @@ tcapopen ()
39
nrow = ttysize.ts_lines;
40
}
41
else
42
-#endif /* ULTRIX */
43
+#endif /* TIOCGWINSZ */
44
#endif /* BSD */
45
46
#ifndef OS2
47
48