File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,13 @@ rb_obj2chtype_inline(VALUE x)
98
98
99
99
static VALUE mCurses ;
100
100
static VALUE mKey ;
101
+ #ifdef HAVE_NEWTERM
101
102
static VALUE cScreen ;
103
+ #endif
102
104
static VALUE cWindow ;
105
+ #ifdef HAVE_NEWPAD
103
106
static VALUE cPad ;
107
+ #endif
104
108
#ifdef USE_MOUSE
105
109
static VALUE cMouseEvent ;
106
110
#endif
@@ -1688,6 +1692,8 @@ curses_reset_prog_mode(VALUE obj)
1688
1692
1689
1693
/*-------------------------- class Screen --------------------------*/
1690
1694
1695
+ #ifdef HAVE_NEWTERM
1696
+
1691
1697
struct screendata {
1692
1698
SCREEN * screen ;
1693
1699
VALUE stdscr ;
@@ -1797,6 +1803,8 @@ screen_set_term(VALUE obj)
1797
1803
return Qnil ;
1798
1804
}
1799
1805
1806
+ #endif /* HAVE_NEWTERM */
1807
+
1800
1808
/*-------------------------- class Window --------------------------*/
1801
1809
1802
1810
/* returns a Curses::Window object */
@@ -5112,6 +5120,7 @@ Init_curses(void)
5112
5120
rb_define_const (mCurses , "VERSION" , version );
5113
5121
}
5114
5122
5123
+ #ifdef HAVE_NEWTERM
5115
5124
/*
5116
5125
* Document-class: Curses::Screen
5117
5126
*
@@ -5137,6 +5146,7 @@ Init_curses(void)
5137
5146
rb_define_alloc_func (cScreen , screen_s_allocate );
5138
5147
rb_define_method (cScreen , "initialize" , screen_initialize , -1 );
5139
5148
rb_define_method (cScreen , "set_term" , screen_set_term , 0 );
5149
+ #endif
5140
5150
5141
5151
/*
5142
5152
* Document-class: Curses::Window
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def exec_command(cmd)
122
122
def_prog_mode reset_prog_mode timeout wtimeout nodelay
123
123
init_color wcolor_set use_default_colors assume_default_colors
124
124
newpad unget_wch get_wch wget_wch PDC_get_key_modifiers
125
- chgat wchgat )
125
+ chgat wchgat newterm )
126
126
have_func ( f ) || ( have_macro ( f , curses ) && $defs. push ( format ( "-DHAVE_%s" , f . upcase ) ) )
127
127
end
128
128
convertible_int ( 'chtype' , [ [ "#undef MOUSE_MOVED\n " ] ] +curses ) or abort
You can’t perform that action at this time.
0 commit comments