[plt-scheme] MzScheme: extending vs. embedding to build a text editor

From: Peter Michaux (petermichaux at gmail.com)
Date: Tue Jul 15 13:25:29 EDT 2008

On Tue, Jul 15, 2008 at 8:15 AM, Ben Goetter <goetter at mazama.net> wrote:


> Yes, no need for an extension.  ncurses is quite straightforward to use with
> the PLT FFI.  The following uses the v360/372-era FFI syntax.
> ---this is curses.scm---
> (module curses mzscheme
> (require (lib "foreign.ss"))
> (unsafe!)
> (provide
> initscr cbreak noecho move addch addstr refresh wgetch getch endwin
> get-cols get-lines)
> (define libcurses (ffi-lib (if (eq? (system-type) 'windows) "pdcurses"
> "libncurses")))


Ben thanks for this example. I just tried it with MzScheme 4.0.2 and
it seemed to work. This example will give me a great jump start
learning about ncurses integration for text user interfaces.

Thanks again,

Posted on the users mailing list.