home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / eucioctl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.2 KB  |  68 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_EUCIOCTL_H
  11. #define _SYS_EUCIOCTL_H
  12.  
  13. #ident    "@(#)/usr/include/sys/eucioctl.h.sl 1.1 4.0 12/08/90 45098 AT&T-USL"
  14.  
  15. /*
  16.  * /usr/include/sys/eucioctl.h:
  17.  *
  18.  *    Header for EUC width information to LD modules.
  19.  */
  20.  
  21. #ifndef EUC_IOC
  22. # define EUC_IOC        (('E' | 128) << 8)
  23. #endif
  24. #define EUC_WSET    (EUC_IOC | 1)
  25. #define EUC_WGET    (EUC_IOC | 2)
  26. #define EUC_MSAVE    (EUC_IOC | 3)
  27. #define EUC_MREST    (EUC_IOC | 4)
  28. #define EUC_IXLOFF    (EUC_IOC | 5)
  29. #define EUC_IXLON    (EUC_IOC | 6)
  30. #define EUC_OXLOFF    (EUC_IOC | 7)
  31. #define EUC_OXLON    (EUC_IOC | 8)
  32.  
  33. /*
  34.  * This structure should really be the same one as defined in "euc.h",
  35.  * but we want to minimize the number of bytes sent downstream to each
  36.  * module -- this should make it 8 bytes -- therefore, we take only the
  37.  * info we need.  The major assumptions here are that no EUC character
  38.  * set has a character width greater than 255 bytes, and that no EUC
  39.  * character consumes more than 255 screen columns.  Let me know if this
  40.  * is an unsafe assumption...
  41.  */
  42.  
  43. struct eucioc {
  44.     unsigned char eucw[4];
  45.     unsigned char scrw[4];
  46. };
  47. typedef struct eucioc    eucioc_t;
  48.  
  49. /*
  50.  * The following defines are for LD modules to broadcast the state of
  51.  * their "icanon" bit.
  52.  *
  53.  * The message type is M_CTL; message block 1 has a data block containing
  54.  * an "iocblk"; EUC_BCAST is put into the "ioc_cmd" field.  The "b_cont"
  55.  * of the first message block points to a second message block.  The second
  56.  * message block is type M_DATA; it contains 1 byte that is either EUC_B_RAW
  57.  * or EUC_B_CANON depending on the state of the "icanon" bit.  EUC line
  58.  * disciplines should take care to broadcast this information when they are
  59.  * in multibyte character mode.
  60.  */
  61.  
  62. #define EUC_BCAST    EUC_IOC|16
  63.  
  64. #define EUC_B_CANON    '\177'
  65. #define EUC_B_RAW    '\001'    /* MUST be non-zero! */
  66.  
  67. #endif    /* _SYS_EUCIOCTL_H */
  68.