home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s038 / 10.ddi / 017.LIF / _DOS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-02  |  1.7 KB  |  68 lines

  1. /* _dos.h - This file defines data structures for DOS access.
  2.  * $Version: 1.2 $
  3.  * Copyright (c) 1990,91 Intel Corporation, ALL RIGHTS RESERVED.
  4.  */
  5.  
  6. #ifndef __dosh
  7. #define __dosh
  8. /*lint -library */
  9.  
  10. #include <i86.h>
  11.  
  12. #pragma fixedparams("_dosf25", "_dosf35", "_dosf3f", "_dosf40",  "_dosf48")
  13. #pragma fixedparams("_dosf49", "_dosf4a", "_dosf4e", "abstoptr", "ptrtoabs")
  14.  
  15. #ifndef _FAR
  16. #define _FAR  far
  17. #define _HUGE huge
  18. #define _NEAR near
  19. #endif
  20.  
  21. #ifndef OK
  22. #define OK      0
  23. #define ERROR  -1
  24. #endif
  25.  
  26. #ifndef _mode_t
  27. #define _mode_t
  28. typedef unsigned long mode_t;
  29. #endif
  30.  
  31. extern int _chbuf;
  32. extern mode_t _umask;
  33.  
  34. #ifndef _find_t
  35. /*
  36.  * structure used by _dos_findfirst
  37.  */
  38. #pragma noalign (find_t)
  39. struct find_t {
  40.     char reserved[21];          /* reserved for dos */
  41.     char attrib;             /* returned attribute */
  42.     unsigned short wr_time;        /* time file last written */
  43.     unsigned short wr_date;        /* date file last written */
  44.     long  size;                /* size of file */
  45.     char name[13];              /* string containing the filename */
  46. };
  47. #define _find_t
  48. #endif
  49.  
  50. /*
  51.  * Function prototypes:
  52.  */
  53. int          _dosf25(int, void _FAR *);
  54. void _FAR   *_dosf35(int);
  55. int          _dosf3f(int, char *, unsigned int);
  56. int          _dosf40(int, char *, unsigned int);
  57. void        *_dosf48(unsigned int);
  58. int          _dosf49(void _FAR *);
  59. int          _dosf4a(unsigned int, unsigned int);
  60. int          _dosf4e(const char *, struct find_t *, unsigned int);
  61. void _FAR    *abstoptr(unsigned long);
  62. unsigned long ptrtoabs(void _FAR *);
  63.  
  64. #define abstoptr(a) \
  65.         (void _FAR *)((((unsigned long)a>>4)<<16)|(unsigned long)(a&0xF))
  66.  
  67. #endif /* __dosh */
  68.