caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: frouaix@liquidmarket.com, Brian Rogoff <bpr@best.com>
Cc: caml-list@inria.fr
Subject: Re: Anyone ported OCamlTk to Tcl/Tk 8.0 on Windows?
Date: Thu, 12 Nov 1998 14:10:52 +0100	[thread overview]
Message-ID: <19981112141052.37218@pauillac.inria.fr> (raw)
In-Reply-To: <199811120006.QAA19057@fiji01.liquidmarket.com>; from Francois Rouaix on Wed, Nov 11, 1998 at 04:06:43PM -0800

> The proper fix would be to use
> Tcl_CreateChannelHandler (Tcl_MakeFileChannel (some_descriptor))
> where some_descriptor is the file descriptor under Unix, and a HANDLE under
> Windows.
> Unfortunately, I didn't have time to look into the Windows version of
> our libunix library to see what notion of file descriptor/handle we are 
> using there, and if it fits our purpose. You might want to check that
> with Xavier, who is the main perpetrator of this library.
                               ^^^^^^^^^^^
Well, Win32 programming is not a crime; a misdemeanor, perhaps...

At any rate, the Windows version of libunix uses Win32 native HANDLE
to represent the type Unix.file_descriptor.  (Initially, we used
Visual C++'s emulation of Unix file descriptors, but it was too buggy.)
So, it should work with Tcl_MakeFileChannel.

To extract the HANDLE from a Caml value of type Unix.file_descriptor,
just use the following handy macro (found in
otherlibs/win32unix/unixsupport.h):

        #define Handle_val(v) (*((HANDLE *)(v)))

If anyone gets Tk 8.0 to work under Windows, please send us the
patches.

Best regards,

- Xavier Leroy




      reply	other threads:[~1998-11-12 17:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-06 22:49 Brian Rogoff
1998-11-09 13:54 ` Francois Pessaux
1998-11-09 19:11   ` Brian Rogoff
1998-11-10  8:54     ` Francois Pessaux
1998-11-12  0:06     ` Francois Rouaix
1998-11-12 13:10       ` Xavier Leroy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19981112141052.37218@pauillac.inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=bpr@best.com \
    --cc=caml-list@inria.fr \
    --cc=frouaix@liquidmarket.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).