[m-dev.] For review: new extras package - curses binding
David Overton
dmo at ender.cs.mu.oz.au
Fri Jan 14 16:32:57 AEDT 2000
On Fri, 14 Jan, 2000 at 03:40:54PM EST, Robert Ernst Johann JESCHOFNIK wrote:
> +%----------------------------------------------------------------------------%
> +% Copyright (C) 1994-2000 The University of Melbourne.
> +% This file may only be copied under the terms of the GNU General
> +% Public License - see the file COPYING in the Mercury Distribution.
> +%----------------------------------------------------------------------------%
Would the LGPL be more appropriate for this sort of package (that's
what we use for the standard library)?
Also, you should make the %-----% lines a few characters shorter so
they don't wrap when quoted in email/diffs like this.
> +% This module defines the low-level bindings to the C library for (n)curses.
> +%
> +% Please note that this is still a partial binding; it does not provide
> +% complete curses functionality.
Maybe you could list the main features that are missing.
> +
> + % Initilise curses. This is used by curse.m, and should not be called by the
> + % programmer.
What is curse.m? I don't see that mentioned anywhere else.
> +
> +:- pragma c_code(init(IO0::di, IO::uo), "
> +{
> + WINDOW *w;
> + w = initscr();
> + noecho();
> + cbreak();
> + keypad(w, TRUE);
> + IO = IO0;
> +}
> +").
You should add `[will_not_call_mercury]' to most of your `pragma c_code's.
Apart from that, this looks good.
David
--
David Overton Department of Computer Science & Software Engineering
PhD Student The University of Melbourne, Australia
+61 3 9344 9159 http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list