home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi
- Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!rblander
- From: rblander@math.uwaterloo.ca (Robyn Landers)
- Subject: sys/termio.h CTRL-c definition
- Message-ID: <BuDrtF.28H@math.uwaterloo.ca>
- Organization: University of Waterloo
- Distribution: na
- Date: Thu, 10 Sep 1992 21:03:14 GMT
- Lines: 37
-
-
- This observation is on an Indigo running 4.0.4.
- The file /usr/include/sys/termio.h contains this fragment:
-
- /* default control chars */
- #define CTRL(c) ('c'&037)
- #define CESC '\\' /* LDISC0 'literal next' default */
- #define CINTR 0177 /* DEL */
- #define CQUIT 034 /* FS, cntl-\ */
- #define CBRK 0377 /* 4.3BSD compatibility */
- #define CERASE CTRL(H)
- #define CKILL CTRL(U)
- #define CEOF CTRL(d)
- #define CEOT CEOF /* 4.3BSD compatibility */
- #define CSTART CTRL(q)
- #define CSTOP CTRL(s)
- #define CSWTCH CTRL(z)
-
- Because of how CTRL(c) is defined, CERASE CKILL CEOF CSTART CSTOP CSWTCH
- all get set to control-c.
- For example:
-
- peacock 19# cat test2.c
- #include <sys/termio.h>
- ckill = CKILL
- peacock 20# cc -E test2.c | tail -5
- };
-
- # 1 "test2.c"
-
- ckill = ('c'&037)
-
-
- -----
- Robyn Landers rblanders@math.uwaterloo.ca
- Math Faculty Computing Facility
- University of Waterloo, Ontario, Canada
-