home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / sgi / 13498 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.3 KB  |  48 lines

  1. Newsgroups: comp.sys.sgi
  2. Path: sparky!uunet!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watmath!rblander
  3. From: rblander@math.uwaterloo.ca (Robyn Landers)
  4. Subject: sys/termio.h CTRL-c definition
  5. Message-ID: <BuDrtF.28H@math.uwaterloo.ca>
  6. Organization: University of Waterloo
  7. Distribution: na
  8. Date: Thu, 10 Sep 1992 21:03:14 GMT
  9. Lines: 37
  10.  
  11.  
  12. This observation is on an Indigo running 4.0.4.
  13. The file /usr/include/sys/termio.h contains this fragment:
  14.  
  15.     /* default control chars */
  16.     #define CTRL(c) ('c'&037)
  17.     #define CESC    '\\'            /* LDISC0 'literal next' default */
  18.     #define CINTR   0177            /* DEL */
  19.     #define CQUIT   034             /* FS, cntl-\ */
  20.     #define CBRK    0377            /* 4.3BSD compatibility */
  21.     #define CERASE  CTRL(H)
  22.     #define CKILL   CTRL(U)
  23.     #define CEOF    CTRL(d)
  24.     #define CEOT    CEOF            /* 4.3BSD compatibility */
  25.     #define CSTART  CTRL(q)
  26.     #define CSTOP   CTRL(s)
  27.     #define CSWTCH  CTRL(z)
  28.  
  29. Because of how CTRL(c) is defined, CERASE CKILL CEOF CSTART CSTOP CSWTCH
  30. all get set to control-c.
  31. For example:
  32.  
  33.     peacock 19# cat test2.c
  34.     #include <sys/termio.h>
  35.     ckill = CKILL
  36.     peacock 20# cc -E test2.c | tail -5
  37.     };
  38.     
  39.     # 1 "test2.c"
  40.     
  41.     ckill = ('c'&037)
  42.     
  43.  
  44. -----
  45. Robyn Landers    rblanders@math.uwaterloo.ca
  46. Math Faculty Computing Facility
  47. University of Waterloo, Ontario, Canada
  48.