comp.lang.ada
 help / color / mirror / Atom feed
* Re: RFD: comp.windows.curses (Ada)
  1997-06-12  0:00             ` RFD: comp.windows.curses (Ada) dg
@ 1997-06-12  0:00               ` Juergen Pfeifer
  0 siblings, 0 replies; 2+ messages in thread
From: Juergen Pfeifer @ 1997-06-12  0:00 UTC (permalink / raw)



dg@poboxes.com wrote:

> My understanding is that ncurses is a C library.
>
> My understanding is that what Russ Allbery is referring to is
> an "Ada binding", and that this is a set of headers and interface
> routines to allow the use of ncurses FROM an Ada application, but that
>
> ncurses is still a C library.
>
> 1) Could someone verify, clarify, or correct what an Ada binding is,
> by a posting to "news.groups" or "comp.lang.c"?  I have not personally
>
> used the Ada binding, just read about it.
>
> 2) If ncurses is not just a C library, what would Russ think about
> "comp.programming.libraries.curses"?

Ada has a standardized mechanism how to talk to routines that are
written
in another language. This mechanism allows you to formulate a prototype
of a function or a datastrcuture in Ada systax, but then you tell the
Ada
compiler that the function is implemented in another language. Let me
give an example:

function Sleep_A_Little_Bit( How_Long : Integer) returns Integer;
pragma Import (C, Sleep_A_Little_Bit, "sleep");

This little (not quite correct) sequence shows you how you write a
Ada prototype for the function Sleep_A_Little_Bit and how you
tell the compiler, that it is actually written in C and its real name is

"sleep".

In theory an Ada binding to a C library is nothing else than a set
of Ada "headers" that defines such prototypes and mappings. In
practice there exist tools that read C header files and generate
corresponding Ada "headers" for it. Thats what the Ada community
calls "thin bindings".

The ncurses binding is not quite thin in the sense that it implements
small wrapper routines around the C routines to do exception handling.
In addition it provides Ada like mechanisms to deal with constructs in
(n)curses that are to "C-ish", i.e. have constructs like vararg
functions
that are not easily portable across different language runtime models.

So there is some Ada code involved in the binding, but this code doesn't

implement any real ncurses functionality, it is only there to make the
interface more Ada friendly.

ncurses itself is of course implemented in C. But that doesn't mean that

it is only of use for C programmers (that would be a bad idea for a good

library).

Cheers
Juergen





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: RFD: comp.windows.curses (Ada)
       [not found]           ` <m3vi3lo03y.fsf@windlord.Stanford.EDU>
@ 1997-06-12  0:00             ` dg
  1997-06-12  0:00               ` Juergen Pfeifer
  0 siblings, 1 reply; 2+ messages in thread
From: dg @ 1997-06-12  0:00 UTC (permalink / raw)
  To: rra, dickey, juergen.pfeifer


My understanding is that ncurses is a C library.

My understanding is that what Russ Allbery is referring to is
an "Ada binding", and that this is a set of headers and interface
routines to allow the use of ncurses FROM an Ada application, but that
ncurses is still a C library.

1) Could someone verify, clarify, or correct what an Ada binding is,
by a posting to "news.groups" or "comp.lang.c"?  I have not personally
used the Ada binding, just read about it.

2) If ncurses is not just a C library, what would Russ think about
"comp.programming.libraries.curses"?

Daniel Goldman

In article <3vi3lo03y.fsf@windlord.Stanford.EDU>,
  Russ Allbery <rra@stanford.edu> wrote:
>
> Hans Steffani <hfst@hrz.tu-chemnitz.de> writes:
> > Kenneth P. Turvey <kturvey@pug1.SprocketShop.com> writes:
>
> >> How about something that indicates that curses is a library, like
> >> comp.windows.libcurses or something like that?
>
> > As this library used together with C most times (hopefully correct
> > assumption) then maybe comp.lang.c.curses or comp.lang.c.libs.curses may
> > be a good idea.
>
> Given that the ncurses distribution includes an Ada library, I don't think
> this is a good idea.
>
> --
> Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-06-12  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <864986194.12186@isc.org>
     [not found] ` <5mn26e$nfg$1@henson.cc.kzoo.edu>
     [not found]   ` <xonoh9smzs7.fsf@leo.mrc.uidaho.edu>
     [not found]     ` <m3wwog4o7s.fsf@windlord.Stanford.EDU>
     [not found]       ` <kmuom5.bcs.ln@pug1.sprocketshop.com>
     [not found]         ` <5nlui1$f97$1@narses.hrz.tu-chemnitz.de>
     [not found]           ` <m3vi3lo03y.fsf@windlord.Stanford.EDU>
1997-06-12  0:00             ` RFD: comp.windows.curses (Ada) dg
1997-06-12  0:00               ` Juergen Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox