home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tvos200.zip / CPL / WATSTUB.H < prev   
C/C++ Source or Header  |  1995-04-12  |  2KB  |  87 lines

  1. /*
  2.  *    WatCOM to generic library stub
  3.  *    ==============================
  4.  *    (C)1995 by F. Jalvingh; All rights reserved.
  5.  *
  6.  *    This header file contains defines, function prototypes etc. to allow
  7.  *    the WatCOM 10.0a compiler to compile TurboC programs..
  8.  *
  9.  *    Update history:
  10.  *    ===============
  11.  *    $Log$
  12.  *
  13.  *
  14.  */
  15. #ifndef __watstub_h
  16. #define __watstub_h
  17.  
  18. /**** Defines ****/
  19.  
  20. #ifdef    __32BITS__
  21. //
  22. //    WatCOM beginthread call uses dummy 'stack'
  23. //
  24. #    define beginthread(a,b,c)        _beginthread((a), 0, (b), (c))
  25. #endif
  26.  
  27. /**** Translated constants: defined in dos.h (both compilers) ****/
  28. #define FA_RDONLY        _A_RDONLY
  29. #define FA_HIDDEN        _A_HIDDEN
  30. #define FA_SYSTEM        _A_SYSTEM
  31. #define FA_LABEL        _A_VOLID
  32. #define FA_DIREC        _A_SUBDIR
  33. #define FA_ARCH         _A_ARCH
  34.  
  35. /**** ftime structure ****/
  36. struct    ftime    {
  37.     unsigned    ft_tsec  : 5;    /* Two second interval */
  38.     unsigned    ft_min     : 6;    /* Minutes */
  39.     unsigned    ft_hour  : 5;    /* Hours */
  40.     unsigned    ft_day     : 5;    /* Days */
  41.     unsigned    ft_month : 4;    /* Months */
  42.     unsigned    ft_year  : 7;    /* Year */
  43. };
  44.  
  45. struct    ffblk
  46. {
  47.     char        ff_reserved[21];
  48.     char        ff_attrib;
  49.     unsigned    ff_ftime;
  50.     unsigned    ff_fdate;
  51.     long        ff_fsize;
  52.     char        ff_name[13];
  53. };
  54.  
  55.  
  56.  
  57. #ifdef    __cplusplus
  58. extern "C" {
  59. #endif
  60.  
  61. int  findfirst     (const char *path, struct ffblk *ffblk,
  62.                  int attrib);
  63. int  findnext     (struct ffblk *ffblk);
  64.  
  65. #define getftime(ha,ft)    _dos_getftime((ha), &((unsigned *)(ft))[1], ((unsigned *)(ft)))
  66. int setftime(int ha, struct ftime *ft);
  67.  
  68. #define WILDCARDS 0x01
  69. #define EXTENSION 0x02
  70. #define FILENAME  0x04
  71. #define DIRECTORY 0x08
  72. #define DRIVE      0x10
  73.  
  74.  
  75. int fnsplit(const char *pathp, char *drivep, char *dirp, char *namep, char *extp);
  76. void fnmerge(char *out, char const *drive, char const *dir, char const *name, char const *ext);
  77. int getdisk(void);
  78. int setdisk(int drive);
  79. int getcurdir(int drive, char *dir);
  80.  
  81. #ifdef    __cplusplus
  82. };
  83. #endif
  84.  
  85. #endif
  86.  
  87.