Print this page
1059 curses.h conflicts with stdbool.h


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 
  27 #pragma ident   "%Z%%M% %I%     %E% SMI"
  28 
  29 /*
  30  * curses.h
  31  *
  32  * XCurses Library
  33  *
  34  * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved.
  35  *
  36  */
  37 
  38 #ifndef __M_CURSES_H__
  39 #define __M_CURSES_H__
  40 
  41 #define _XOPEN_CURSES
  42 
  43 #include <stdio.h>
  44 #include <term.h>
  45 #include <unctrl.h>
  46 #include <wchar.h>
  47 
  48 #ifndef EOF
  49 #define EOF                     (-1)
  50 #endif
  51 
  52 #ifndef WEOF
  53 #define WEOF                    (-1)
  54 #endif
  55 
  56 /*
  57  * Not all <wchar.h> are created equal.
  58  */
  59 #ifndef _MBSTATE_T
  60 #define _MBSTATE_T
  61 typedef int mbstate_t;
  62 #endif
  63 
  64 #define ERR                     EOF
  65 #define OK                      0
  66 
  67 #if !(defined(__cplusplus) && defined(_BOOL))
  68 typedef short bool;
  69 #endif
  70 
  71 #define TRUE                    1
  72 #define FALSE                   0
  73 
  74 typedef unsigned short attr_t;
  75 
  76 /*
  77  * These attributes and masks can be applied to an attr_t.  
  78  * These are ordered according to the <no_color_video> mask,
  79  * which has been extended to include additional attributes.
  80  */
  81 #define WA_NORMAL       0x0
  82 #define WA_STANDOUT     0x0001
  83 #define WA_UNDERLINE    0x0002
  84 #define WA_REVERSE      0x0004
  85 #define WA_BLINK        0x0008
  86 #define WA_DIM          0x0010
  87 #define WA_BOLD         0x0020




   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  */
  26 


  27 /*
  28  * curses.h
  29  *
  30  * XCurses Library
  31  *
  32  * Copyright 1990, 1995 by Mortice Kern Systems Inc.  All rights reserved.
  33  *
  34  */
  35 
  36 #ifndef __M_CURSES_H__
  37 #define __M_CURSES_H__
  38 
  39 #define _XOPEN_CURSES
  40 
  41 #include <stdio.h>
  42 #include <term.h>
  43 #include <unctrl.h>
  44 #include <wchar.h>
  45 
  46 #ifndef EOF
  47 #define EOF                     (-1)
  48 #endif
  49 
  50 #ifndef WEOF
  51 #define WEOF                    (-1)
  52 #endif
  53 
  54 /*
  55  * Not all <wchar.h> are created equal.
  56  */
  57 #ifndef _MBSTATE_T
  58 #define _MBSTATE_T
  59 typedef int mbstate_t;
  60 #endif
  61 
  62 #define ERR                     EOF
  63 #define OK                      0
  64 
  65 #if !(defined(__cplusplus) && defined(bool))
  66 typedef short bool;
  67 #endif
  68 
  69 #define TRUE                    1
  70 #define FALSE                   0
  71 
  72 typedef unsigned short attr_t;
  73 
  74 /*
  75  * These attributes and masks can be applied to an attr_t.  
  76  * These are ordered according to the <no_color_video> mask,
  77  * which has been extended to include additional attributes.
  78  */
  79 #define WA_NORMAL       0x0
  80 #define WA_STANDOUT     0x0001
  81 #define WA_UNDERLINE    0x0002
  82 #define WA_REVERSE      0x0004
  83 #define WA_BLINK        0x0008
  84 #define WA_DIM          0x0010
  85 #define WA_BOLD         0x0020