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
|
--- mike.c.orig Mon Aug 19 17:20:52 2002
+++ mike.c Thu Dec 12 02:46:38 2002
@@ -130,8 +130,8 @@
#endif /* UNIX420 */
#ifdef UNIX5
-#include <termio.h>
-static struct termio old_term_params;
+#include <termios.h>
+static struct termios old_term_params;
#endif /* UNIX5 */
/* Set raw mode on terminal file. Basically, get the terminal into a
@@ -150,16 +150,16 @@
#endif /* UNIX420 */
#ifdef UNIX5
- struct termio term_params;
+ struct termios term_params;
- ioctl(fileno(stdin), TCGETA, &old_term_params);
+ tcgetattr(fileno(stdin), &old_term_params);
term_params = old_term_params;
term_params.c_iflag &= ~(ICRNL|IXON|IXOFF); /* no cr translation */
term_params.c_iflag &= ~(ISTRIP); /* no stripping of high order bit */
term_params.c_oflag &= ~(OPOST); /* no output processing */
term_params.c_lflag &= ~(ISIG|ICANON|ECHO); /* raw mode */
term_params.c_cc[4] = 1; /* satisfy read after 1 char */
- ioctl(fileno(stdin), TCSETAF, &term_params);
+ tcsetattr(fileno(stdin), TCSAFLUSH, &term_params);
#endif /* UNIX5 */
/*printf("\n(raw)\n");*/
}
@@ -178,7 +178,7 @@
#endif /* UNIX420 */
#ifdef UNIX5
- ioctl(fileno(stdin), TCSETAF, &old_term_params);
+ tcsetattr(fileno(stdin), TCSAFLUSH, &old_term_params);
#endif /* UNIX5 */
/*printf("\n(cooked)\n");*/
}
@@ -1135,7 +1135,7 @@
/* SENDFILE -- Send a file or, if the file name is NULL or a
single period, send real-time sound input. */
-static int sendfile(char *f)
+static int sfsendfile(char *f)
{
soundbuf netbuf;
#define buf netbuf.buffer.buffer_val
@@ -2306,7 +2306,7 @@
return 1;
}
} else {
- int ok = sendfile(op);
+ int ok = sfsendfile(op);
if (ok != 0)
return ok;
sentfile++;
@@ -2318,7 +2318,7 @@
usage();
} else {
if (sentfile == 0) {
- return sendfile(NULL);
+ return sfsendfile(NULL);
}
}
|