file-getcontrol.lisp 378 B

12345678910111213141516
  1. (in-package :hurd)
  2. (defcfun ("file_getcontrol" %file-getcontrol)
  3. err
  4. (file port)
  5. (control port-pointer))
  6. (defun file-getcontrol (file)
  7. "Get a translator control port from 'file'."
  8. (declare (type fixnum file))
  9. (with-foreign-pointer (control (foreign-type-size 'port))
  10. (select-error (%file-getcontrol file control)
  11. (mem-ref control 'port))))