comp.lang.ada
 help / color / mirror / Atom feed
* setjmp/longjmp?
@ 2003-09-28 15:33 chris
  2003-09-28 17:12 ` setjmp/longjmp? Simon Wright
  2003-09-28 18:19 ` setjmp/longjmp? Jeff C,
  0 siblings, 2 replies; 11+ messages in thread
From: chris @ 2003-09-28 15:33 UTC (permalink / raw)


Hi,

I started a binding to libpng so I can load some images into OpenGL, but 
the library uses setjmp and longjmp for error handling.  This is very 
new to me but from what I understand it's some form of library "goto" 
which allows code to jump to predefined points on given events.  When 
dealing with such things is it best to wrap around the code with C and 
catch all these longjmps with setjmps, returning error flags if 
something fails?


Thanks,
Chris




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

* Re: setjmp/longjmp?
  2003-09-28 15:33 setjmp/longjmp? chris
@ 2003-09-28 17:12 ` Simon Wright
  2003-09-28 20:54   ` setjmp/longjmp? chris
  2003-09-28 18:19 ` setjmp/longjmp? Jeff C,
  1 sibling, 1 reply; 11+ messages in thread
From: Simon Wright @ 2003-09-28 17:12 UTC (permalink / raw)


chris <spamoff.danx@ntlworld.com> writes:

> I started a binding to libpng so I can load some images into OpenGL,
> but the library uses setjmp and longjmp for error handling.  This is
> very new to me but from what I understand it's some form of library
> "goto" which allows code to jump to predefined points on given
> events.  When dealing with such things is it best to wrap around the
> code with C and catch all these longjmps with setjmps, returning
> error flags if something fails?

setjmp/longjmp are like a block to catch an exception, and raising
that exception.

I would do as you suggest - your chance of setting up a jmpbuf in Ada
is close to zero.



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

* Re: setjmp/longjmp?
  2003-09-28 15:33 setjmp/longjmp? chris
  2003-09-28 17:12 ` setjmp/longjmp? Simon Wright
@ 2003-09-28 18:19 ` Jeff C,
  2003-09-28 18:49   ` setjmp/longjmp? chris
  1 sibling, 1 reply; 11+ messages in thread
From: Jeff C, @ 2003-09-28 18:19 UTC (permalink / raw)



"chris" <spamoff.danx@ntlworld.com> wrote in message
news:b6Ddb.1863$QH3.333@newsfep4-winn.server.ntli.net...
> Hi,
>
> I started a binding to libpng so I can load some images into OpenGL, but
> the library uses setjmp and longjmp for error handling.  This is very
> new to me but from what I understand it's some form of library "goto"
> which allows code to jump to predefined points on given events.  When
> dealing with such things is it best to wrap around the code with C and
> catch all these longjmps with setjmps, returning error flags if
> something fails?


A binding to libpng would be nice so don't let me stop you but have you
looked
into whether http://privatewww.essex.ac.uk/~sjs/png_io/png_io.html will work
for you.





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

* Re: setjmp/longjmp?
  2003-09-28 18:19 ` setjmp/longjmp? Jeff C,
@ 2003-09-28 18:49   ` chris
  2003-09-28 19:10     ` setjmp/longjmp? Jeff C,
  0 siblings, 1 reply; 11+ messages in thread
From: chris @ 2003-09-28 18:49 UTC (permalink / raw)


Jeff C, wrote:
> 
> A binding to libpng would be nice so don't let me stop you but have you 
 > looked
> into whether http://privatewww.essex.ac.uk/~sjs/png_io/png_io.html will work
> for you.

No I hadn't, thanks.  I think it'd be best just to go ahead and bind to 
libpng, since otherwise it probably won't ever get done.  I just hope it 
will get used.  If anyone wants a copy before it's finished let me know.

I'm a wee bit shaky on the license of LibPNG, and am not sure what 
license to release it under.  I'd like to release it either under the 
MIT license or GMGPL but don't know if these are compatible with LibPNG. 
  It looks like a MIT style license.



Chris




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

* Re: setjmp/longjmp?
  2003-09-28 18:49   ` setjmp/longjmp? chris
@ 2003-09-28 19:10     ` Jeff C,
  2003-09-28 19:14       ` setjmp/longjmp? Jeff C,
  0 siblings, 1 reply; 11+ messages in thread
From: Jeff C, @ 2003-09-28 19:10 UTC (permalink / raw)


Looks like the easiest thing would be to just release it under the same
terms as libpng itself although
I don't see anthing about this license that would make it conflict with the
GMGPL.

Of course...the old standby...I am not a lawyer.

"chris" <spamoff.danx@ntlworld.com> wrote in message
news:C_Fdb.2031$QH3.1956@newsfep4-winn.server.ntli.net...
> Jeff C, wrote:
> >
> > A binding to libpng would be nice so don't let me stop you but have you
>  > looked
> > into whether http://privatewww.essex.ac.uk/~sjs/png_io/png_io.html will
work
> > for you.
>
> No I hadn't, thanks.  I think it'd be best just to go ahead and bind to
> libpng, since otherwise it probably won't ever get done.  I just hope it
> will get used.  If anyone wants a copy before it's finished let me know.
>
> I'm a wee bit shaky on the license of LibPNG, and am not sure what
> license to release it under.  I'd like to release it either under the
> MIT license or GMGPL but don't know if these are compatible with LibPNG.
>   It looks like a MIT style license.
>
>
>
> Chris
>





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

* Re: setjmp/longjmp?
  2003-09-28 19:10     ` setjmp/longjmp? Jeff C,
@ 2003-09-28 19:14       ` Jeff C,
  2003-09-28 21:01         ` setjmp/longjmp? chris
  2003-09-29 20:17         ` setjmp/longjmp? Randy Brukardt
  0 siblings, 2 replies; 11+ messages in thread
From: Jeff C, @ 2003-09-28 19:14 UTC (permalink / raw)


Oh one last thing..Also take a look at  the AGP library (you can find it
here http://www.gnuada.org/alt.html)

It has what appears to be libjpeg and libpng bindings....may only be partial
bindings but it should give you
some ideas and or make your life easier.


I still think we need a better way of finding Ada libraries than what we
have so far with adapower, freshmeat or
adaworld.



"Jeff C," <nolongersafeto@userealemailsniff.com> wrote in message
news:2nGdb.612655$Ho3.119351@sccrnsc03...
> Looks like the easiest thing would be to just release it under the same
> terms as libpng itself although
> I don't see anthing about this license that would make it conflict with
the
> GMGPL.
>
> Of course...the old standby...I am not a lawyer.
>
> "chris" <spamoff.danx@ntlworld.com> wrote in message
> news:C_Fdb.2031$QH3.1956@newsfep4-winn.server.ntli.net...
> > Jeff C, wrote:
> > >
> > > A binding to libpng would be nice so don't let me stop you but have
you
> >  > looked
> > > into whether http://privatewww.essex.ac.uk/~sjs/png_io/png_io.html
will
> work
> > > for you.
> >
> > No I hadn't, thanks.  I think it'd be best just to go ahead and bind to
> > libpng, since otherwise it probably won't ever get done.  I just hope it
> > will get used.  If anyone wants a copy before it's finished let me know.
> >
> > I'm a wee bit shaky on the license of LibPNG, and am not sure what
> > license to release it under.  I'd like to release it either under the
> > MIT license or GMGPL but don't know if these are compatible with LibPNG.
> >   It looks like a MIT style license.
> >
> >
> >
> > Chris
> >
>
>





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

* Re: setjmp/longjmp?
  2003-09-28 17:12 ` setjmp/longjmp? Simon Wright
@ 2003-09-28 20:54   ` chris
  0 siblings, 0 replies; 11+ messages in thread
From: chris @ 2003-09-28 20:54 UTC (permalink / raw)


Simon Wright wrote:

> I would do as you suggest - your chance of setting up a jmpbuf in Ada
> is close to zero.

:(  Taking bloody ages!

The lib doesn't specify in png.h what can generate an error! :(




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

* Re: setjmp/longjmp?
  2003-09-28 19:14       ` setjmp/longjmp? Jeff C,
@ 2003-09-28 21:01         ` chris
  2003-09-29 20:17         ` setjmp/longjmp? Randy Brukardt
  1 sibling, 0 replies; 11+ messages in thread
From: chris @ 2003-09-28 21:01 UTC (permalink / raw)


Jeff C, wrote:
> Oh one last thing..Also take a look at  the AGP library (you can find it
> here http://www.gnuada.org/alt.html)

Thanks, I will later look later, lest I lose heart and will in binding 
to C... it is very trying and I need focus!

> I still think we need a better way of finding Ada libraries than what we
> have so far with adapower, freshmeat or adaworld.

We need a wiki.

For example the wiki at http://lua-users.org/wiki

Whenever someone has creates a lib, they add it to the wiki.  If the 
links change or die, they change it or remove it.  Alternatively a Ada 
specific Savannah or SF.net, though that might be a bit much considering 
most people use either use savannah or sf.net, or host the libs on their 
own space.


Chris




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

* Re: setjmp/longjmp?
  2003-09-28 19:14       ` setjmp/longjmp? Jeff C,
  2003-09-28 21:01         ` setjmp/longjmp? chris
@ 2003-09-29 20:17         ` Randy Brukardt
  2003-09-29 23:04           ` setjmp/longjmp? Matthew Heaney
  1 sibling, 1 reply; 11+ messages in thread
From: Randy Brukardt @ 2003-09-29 20:17 UTC (permalink / raw)


"Jeff C," <nolongersafeto@userealemailsniff.com> wrote in message
news:7qGdb.611520$YN5.449064@sccrnsc01...
> I still think we need a better way of finding Ada libraries than what we
> have so far with adapower, freshmeat or adaworld.

Have your tried the Ada-wide search engine at www.adaic.com? One of the
primary purposes of it was to be able to find libraries (which is why it
indexes the Ada source code found on line).

          http://www.adaic.com/site/wide-search.html

The only problem with it is that a lot of people never have nominated their
sites for inclusion. (In which case, of course, they're not indexed at all.)

                Randy.






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

* Re: setjmp/longjmp?
  2003-09-29 20:17         ` setjmp/longjmp? Randy Brukardt
@ 2003-09-29 23:04           ` Matthew Heaney
  2003-10-16  1:49             ` setjmp/longjmp? Randy Brukardt
  0 siblings, 1 reply; 11+ messages in thread
From: Matthew Heaney @ 2003-09-29 23:04 UTC (permalink / raw)


"Randy Brukardt" <randy@rrsoftware.com> writes:

> Have your tried the Ada-wide search engine at www.adaic.com? One of the
> primary purposes of it was to be able to find libraries (which is why it
> indexes the Ada source code found on line).
> 
>           http://www.adaic.com/site/wide-search.html
> 
> The only problem with it is that a lot of people never have nominated their
> sites for inclusion. (In which case, of course, they're not indexed at all.)

What do I need to do to nominate the site for the Charles library?

<http://home.earthlink.net/~matthewjheaney/charles/index.html>






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

* Re: setjmp/longjmp?
  2003-09-29 23:04           ` setjmp/longjmp? Matthew Heaney
@ 2003-10-16  1:49             ` Randy Brukardt
  0 siblings, 0 replies; 11+ messages in thread
From: Randy Brukardt @ 2003-10-16  1:49 UTC (permalink / raw)


"Matthew Heaney" <matthewjheaney@earthlink.net> wrote in message
news:uu16vfb4v.fsf@earthlink.net...
> "Randy Brukardt" <randy@rrsoftware.com> writes:
>
> > Have your tried the Ada-wide search engine at www.adaic.com? One of the
> > primary purposes of it was to be able to find libraries (which is why it
> > indexes the Ada source code found on line).
> >
> >           http://www.adaic.com/site/wide-search.html
> >
> > The only problem with it is that a lot of people never have nominated
their
> > sites for inclusion. (In which case, of course, they're not indexed at
all.)
>
> What do I need to do to nominate the site for the Charles library?
>
> <http://home.earthlink.net/~matthewjheaney/charles/index.html>

Send an e-mail to webmaster@adaic.com to nominate a site. If your site is
not mentioned in the Ada links lists, it probably isn't indexed either. (We
try to put them in both places.)

                 Randy.






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

end of thread, other threads:[~2003-10-16  1:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-28 15:33 setjmp/longjmp? chris
2003-09-28 17:12 ` setjmp/longjmp? Simon Wright
2003-09-28 20:54   ` setjmp/longjmp? chris
2003-09-28 18:19 ` setjmp/longjmp? Jeff C,
2003-09-28 18:49   ` setjmp/longjmp? chris
2003-09-28 19:10     ` setjmp/longjmp? Jeff C,
2003-09-28 19:14       ` setjmp/longjmp? Jeff C,
2003-09-28 21:01         ` setjmp/longjmp? chris
2003-09-29 20:17         ` setjmp/longjmp? Randy Brukardt
2003-09-29 23:04           ` setjmp/longjmp? Matthew Heaney
2003-10-16  1:49             ` setjmp/longjmp? Randy Brukardt

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