Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

ioctl

An interface to the ioctl(2) system call.

ioctl(2) provides an interface to the operating system terminal drivers (or more commonly these days to ptys (pseudo-terminals)). ioctl is very low-level - most aspects of the terminal can be controlled with the higher-level termios(4), available in Chicken as the even higher-level stty egg.

Procedures

[procedure] (ioctl-winsize [<port-or-fileno>])

Returns a list of the form (<num-rows> <num-columns>) for the given port or file descriptor, defaulting to current-output-port.

[procedure] (ioctl <port-or-fileno> <request> [<args> ...])

Makes the given ioctl request with any arguments provided. The following requests are available:

The struct winsize *ws arguments use the winsize record:

   make-winsize free-winsize
   winsize-row winsize-col
   winsize-row-set! winsize-col-set!

The struct termios *term arguments use the term-attrs record from the stty egg.

The integer pointer arguments can be handled with pointers from the lolevel extension.

Author

Alex Shinn

License

BSD

History

1.0
Initial release