home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / CIncludes / ioctl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  1.7 KB  |  69 lines  |  [TEXT/MPS ]

  1. /*
  2.     IOCtl.h -- Device-handler-specific requests
  3.  
  4.     Warning:  This interface is NOT a part of the ANSI C standard.
  5.              We do NOT claim to be POSIX compliant.
  6.              If you want your code to be portable, don't use this interface.
  7.  
  8.     Copyright, Apple Computer Inc. 1985-1991, 1994
  9.     All rights reserved.
  10. */
  11.  
  12. # ifndef __IOCTL__
  13. # define __IOCTL__
  14.  
  15. /*
  16.  *        ioctl() function prototype
  17.  */
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. #ifdef __CFM68K__
  24.     #ifdef UsingSharedLibs
  25.         #pragma lib_export on
  26.     #endif
  27. #endif
  28.  
  29. int ioctl(int fildes, unsigned int cmd, long *arg);
  30.  
  31. #ifdef __CFM68K__
  32.     #ifdef UsingSharedLibs
  33.         #pragma lib_export off
  34.     #endif
  35. #endif
  36.  
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40.  
  41. /*
  42.  *   IO Control commands.
  43.  *
  44.  *   IOCTLs which begin with "FIO" are controls which are general
  45.  *          (device driver) control requests.  They may be executed by 
  46.  *         the top-level ioctl() procedure, or previewed by it before 
  47.  *         passing it on to the driver xxIoctl()s.
  48.  */
  49.  
  50. # define FIOLSEEK         (('f'<<8)|0x00)     /* Apple internal use only */
  51. # define FIODUPFD         (('f'<<8)|0x01)     /* Apple internal use only */
  52.  
  53. # define FIOINTERACTIVE (('f'<<8)|0x02)     /* If device is interactive */
  54. # define FIOBUFSIZE        (('f'<<8)|0x03)     /* Return optimal buffer size */
  55. # define FIOFNAME         (('f'<<8)|0x04)     /* Return filename */
  56. # define FIOREFNUM        (('f'<<8)|0x05)     /* Return fs refnum */
  57. # define FIOSETEOF        (('f'<<8)|0x06)     /* Set file length */
  58.  
  59. /*
  60.  *   IOCTLs which begin with "TIO" are for TTY (i.e., console or 
  61.  *         terminal-related) device control requests.
  62.  */
  63.  
  64. # define TIOFLUSH   (('t'<<8)|0x00)        /* discard unread input.  arg is ignored */
  65. # define TIOSPORT   (('t'<<8)|0x01)        /* Obsolete -- do not use */
  66. # define TIOGPORT   (('t'<<8)|0x02)        /* Obsolete -- do not use */
  67.  
  68. # endif /*__IOCTL__*/
  69.