From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2d1a49d186e069b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-28 11:19:01 PST Path: news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!rwcrnsc54.POSTED!not-for-mail From: "Jeff C," Newsgroups: comp.lang.ada References: Subject: Re: setjmp/longjmp? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: NNTP-Posting-Host: 66.31.4.164 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc54 1064773141 66.31.4.164 (Sun, 28 Sep 2003 18:19:01 GMT) NNTP-Posting-Date: Sun, 28 Sep 2003 18:19:01 GMT Organization: Comcast Online Date: Sun, 28 Sep 2003 18:19:01 GMT Xref: news1.google.com comp.lang.ada:81 Date: 2003-09-28T18:19:01+00:00 List-Id: "chris" 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.