home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / fcntl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-01  |  1.4 KB  |  75 lines

  1.  
  2. /*
  3.  * $VER: fcntl.h 1.0 (17.4.93)
  4.  *
  5.  * (c)Copyright 1992 Obvious Implementations Corp, All Rights Reserved
  6.  */
  7.  
  8. #ifndef FCNTL_H
  9. #define FCNTL_H
  10.  
  11. #define O_RDONLY    0
  12. #define O_WRONLY    1
  13. #define O_RDWR        2
  14. #define O_NDELAY    4
  15. #define O_APPEND    8
  16. #define O_CREAT     0x0100
  17. #define O_TRUNC     0x0200
  18. #define O_EXCL        0x0400
  19. #define O_BINARY    0x0800
  20.  
  21. /*
  22.  *  Internal, never specify
  23.  */
  24.  
  25. #define O_INTERNAL  0xF000
  26. #define O_ISOPEN    0x1000
  27. #define O_NOCLOSE   0x2000  /*    not a closable file */
  28. #define O_CEXEC     0x4000  /*    close on exec        */
  29.  
  30. /*
  31.  *  UNIX support
  32.  */
  33.  
  34. #define F_DUPFD     1
  35. #define F_GETFD     2
  36. #define F_SETFD     3
  37. #define F_GETFL     4
  38. #define F_SETFL     5
  39. #define FNDELAY     0x00010000
  40.  
  41. #define L_SET        0
  42. #define L_CUR        1
  43. #define L_END        2
  44.  
  45.  
  46. extern int write(int, const void *, unsigned int);
  47. extern int read(int, void *, unsigned int);
  48. extern int close(int);
  49. extern int open(const char *, int, ...);
  50. extern int creat(const char *, int);
  51. extern long lseek(int, long, int);
  52.  
  53. extern void *fdtofh(int);
  54.  
  55. #ifdef STDIO_H
  56. //extern _IOFDS *__getfh(short);        /*    for system use only */
  57. extern _IOFDS *__getfh(int);        /*    for system use only */
  58. extern _IOFDS *_MakeFD(int *);        /*    for system use only */
  59. #endif
  60.  
  61. /*
  62.  *  UNIX
  63.  */
  64.  
  65. extern int fcntl(int, int, int);
  66. extern int isatty(int);
  67. extern int access(const char *, int);
  68.  
  69. #define F_OK    0
  70. #define X_OK    1
  71. #define W_OK    2
  72. #define R_OK    4
  73.  
  74. #endif
  75.