Talk for Sys V
Nigel Holder Marconi
nwh at hrc63.UUCP
Fri Jun 6 21:37:04 AEST 1986
Oops - I made the age old mistake of signed and unsigned chars. On
my machine there is no problem (GEC 63 (what I here you ask) running 5.2).
A few of you are having such problems so here is the fix in diff
format which I hope works since I can't test them properly on my machine
(talk still works though).
-------- Cut Here -------------- Cut Here ---------------- Cut Here --------
60,72c60,66
<
< /*******************
< * Top bits of char are stripped on input to enable some of
< * these unique representations for internal communications.
< *******************/
< #define CONNECT ( (unsigned char) 0xF0 )
< #define DISCONNECT ( (unsigned char) 0xF3 )
< #define DELETE ( (unsigned char) 0xFC )
< #define END_OF_FILE ( (unsigned char) 0x04 )
< #define REFRESH ( (unsigned char) 0x0C )
< #define SPACE ( (unsigned char) 0x20 )
< #define BELL ( (unsigned char) 0x07 )
<
---
> #define CONNECT ( 0xF0 )
> #define DISCONNECT ( 0xF3 )
> #define DELETE ( 0xFC )
> #define END_OF_FILE ( 0x04 )
> #define REFRESH ( 0x0C )
> #define SPACE ( 0x20 )
> #define BELL ( 0x07 )
108c102
< unsigned char delchar; /* favourite delete char */
---
> int delchar; /* favourite delete char */
237,238c231
< char *retry_message, *dialtty;
< unsigned char c;
---
> char *retry_message, *dialtty, c;
355c348
< unsigned char status;
---
> int status;
433c426
< delchar = (unsigned char) erasechar();
---
> delchar = erasechar();
498d490
< unsigned char c;
503,505c495
< x &= 0x7F; /* strip off top bit of char */
< c = (unsigned char) x; /* make it a char */
< switch(c) {
---
> switch(x) {
522c512
< if (c != delchar) {
---
> if (x != delchar) {
528c518
< waddch(inwin, c);
---
> waddch(inwin, x);
533c523
< c = DELETE;
---
> x = DELETE;
550c540
< unsigned char c;
---
> char c;
-------- Cut Here -------------- Cut Here ---------------- Cut Here --------
Nigel Holder UK JANET: yf21 at uk.co.gec-mrc.u
Marconi Research, ARPA: yf21%u.gec-mrc.co.uk at ucl-cs
Chelmsford,
Essex. CM2 8HN.
+44 245 73331 ext. 3219 / 3214
More information about the Comp.unix
mailing list