home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * MAKEFD.C
- *
- * (c)Copyright 1990, Matthew Dillon, All Rights Reserved
- *
- * Used by routines that want to get into our low level io system. If exec
- * is NULL then handle is an AmigaDOS file handle. If exec is not NULL then
- * it is a function capable of executing ioctls.
- */
-
- #include <stdio.h>
- #include <fcntl.h>
-
- int
- MakeFd(handle, flags, exec)
- long handle;
- long flags;
- long (*exec)();
- {
- int fd;
- _IOFDS *d = _MakeFD(&fd);
-
- d->fd_Fh = handle;
- d->fd_Flags = flags | O_ISOPEN;
- d->fd_Exec = exec;
-
- return(fd);
- }
-
-
-
-