home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / snews-20.zip / OS2DEFS.H < prev    next >
C/C++ Source or Header  |  1992-04-05  |  1KB  |  50 lines

  1. #define INCL_NOPM
  2. #define INCL_DOS
  3. #define INCL_VIO
  4. #include <os2.h>
  5.  
  6. #include "pwd.h"
  7.  
  8.  
  9. FILE *flockopen(char *name, char *mode);
  10.  
  11.  
  12. #define delay(x)            DosSleep(x)
  13.  
  14.  
  15. FILE *popen(char *, char*);
  16. int pclose(FILE *);
  17.  
  18.  
  19. USHORT _drive;
  20. ULONG _drivemap;
  21.  
  22. #define getdisk()           (DosQCurDisk(&_drive, &_drivemap), _drive - 1)
  23.  
  24.  
  25. #define getdfree(d, s)      DosQFSInfo(d, FSIL_ALLOC, (PBYTE) s, sizeof(*s))
  26. #define dfree               _FSALLOCATE
  27. #define df_avail            cUnitAvail
  28. #define df_bsec             cbSector
  29. #define df_sclus            cSectorUnit
  30.  
  31. HDIR _hdir;
  32. USHORT _count;
  33.  
  34.  
  35. #define findfirst(n, s, z)  (_hdir = HDIR_SYSTEM, _count = 1, DosFindFirst(n, &_hdir, FILE_NORMAL, s, sizeof(*s), &_count, 0))
  36. #define findnext(s)         (_count = 1, DosFindNext(_hdir, s, sizeof(*s), &_count))
  37. #define ffblk               _FILEFINDBUF
  38. #define ff_name             achName
  39.  
  40.  
  41. extern int _lines, _columns, _line, _col;
  42.  
  43. #define BLACK               0
  44. #define LIGHTGRAY           1
  45.  
  46. #define putch(c)            outchar(c)
  47. #define getch()             (tflush(), getch())
  48. #define system(c)           (tflush(), system(c))
  49.  
  50.