newterm( "vt220", fp, fp ) on Windows 2k

  • Anonymous

    Anonymous - 2002-09-17


    I'm having a problem creating a new SCREEN*.  I get NULL back everytime.  I've got a null modem cable running between 2 PCs, one running a VT220 emulator, both using COM1.


    FILE* fp = NULL;
    SCREEN* theTerminal = NULL;

    slk_init( TRUE );
    fp = fopen( "COM1", "rw+" );
    if ( fp != NULL ){

         theTerminal = newterm( "vt220", fp, fp );


    • William McBrine

      William McBrine - 2005-11-17

      Yeah, newterm() doesn't actually work in PDCurses. It's only declared for compatibility purposes. PDCurses doesn't understand terminal types like "vt220", either. It's hardwired for low-level access to a few particular console types -- in this case, the Win32 console.

      For your application, you'd need something more like ncurses. I believe you can build it under Cygwin. But I don't know if it will work as you've outlined.


Log in to post a comment.