[plt-scheme] FFI and ports

From: David Van Horn (dvanhorn at cs.uvm.edu)
Date: Wed May 7 15:16:04 EDT 2003

Is there a way of making this printf statement print to the
current-output-port?  More generally, suppose the c-lambda is wrapping a C
function that makes several calls to printf.  Is there a way to make it play
nicely with Scheme ports?  TIA.

(module print mzscheme
  (require (lib "cffi.ss" "compiler"))
  (provide (all-defined))
  (define p (c-lambda () void "printf(\"Hello\\n\");")))

-d




Posted on the users mailing list.