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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,708a2cfb544659ff,start X-Google-Attributes: gid103376,public From: Richard Beare Subject: File descriptor interfacing Date: 1998/05/05 Message-ID: <354E9F79.C5E73940@cmis.csiro.au>#1/1 X-Deja-AN: 350338878 Content-Transfer-Encoding: 7bit Sender: news@news.nsw.CSIRO.AU Mime-Version: 1.0 X-Nntp-Posting-Host: dust.nsw.cmis.csiro.au Content-Type: text/plain; charset=us-ascii Organization: CSIRO CMIS Newsgroups: comp.lang.ada Date: 1998-05-05T00:00:00+00:00 List-Id: I am producing some bindings to image libraries, like libtiff. Some of the functions in these libraries take file descriptors as arguments. I definitely want to retain functions operating at this level (file_type rather than file names), but I am not sure about the most appropriate way to interface. The gnat os_lib package is one option, but that means the library user would have to start using file descriptors as well. I think it would be better if the user could pass a "file_type" from which the c file descriptor could be extracted. This information is in the system.file_control_block package, but I am unsure about the best way of extracting the "stream" information. The file control block is a private time, so I guess I should be using unchecked conversion. Is this the only way? -- Richard Beare Richard.Beare@cmis.csiro.au