Ejemplo n.º 1
0
 def runs_ctgetstr():
     p_errret = lltype.malloc(rffi.INTP.TO, 1, flavor='raw')
     with rffi.scoped_str2charp("xterm") as ll_term:
         errval = fficurses.setupterm(ll_term, 1, p_errret)
     with rffi.scoped_str2charp("cup") as ll_capname:
         ll = fficurses.rpy_curses_tigetstr(ll_capname)
         return rffi.charp2str(ll)
Ejemplo n.º 2
0
def tigetstr(space, capname):
    check_setup_invoked(space)
    with rffi.scoped_str2charp(capname) as ll_capname:
        ll_result = fficurses.rpy_curses_tigetstr(ll_capname)
        if ll_result:
            return space.newbytes(rffi.charp2str(ll_result))
        else:
            return space.w_None
Ejemplo n.º 3
0
 def runs_tparm():
     with rffi.scoped_str2charp("xterm") as ll_term:
         fficurses.rpy_curses_setupterm(ll_term, 1)
     with rffi.scoped_str2charp("cup") as ll_capname:
         cup = fficurses.rpy_curses_tigetstr(ll_capname)
         res = fficurses.rpy_curses_tparm(cup, 5, 3, 0, 0, 0, 0, 0, 0,
                                          0)
         return rffi.charp2str(res)
Ejemplo n.º 4
0
 def runs_ctgetstr():
     with rffi.scoped_str2charp("xterm") as ll_term:
         fficurses.rpy_curses_setupterm(ll_term, 1)
     with rffi.scoped_str2charp("cup") as ll_capname:
         ll = fficurses.rpy_curses_tigetstr(ll_capname)
         return rffi.charp2str(ll)