home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / program / c / plstsrc / tcstuff / ext.h next >
Encoding:
C/C++ Source or Header  |  1989-01-11  |  2.5 KB  |  96 lines

  1. /*      EXT.H
  2.  
  3.         Extended library definitions
  4.  
  5.         Copyright (c) Borland International 1988
  6.         All Rights Reserved.
  7. */
  8.  
  9.  
  10. #if !defined( __EXT )
  11. #define __EXT
  12.  
  13.  
  14. #define FA_UPDATE       0x00
  15. #define FA_RDONLY       0x01
  16. #define FA_HIDDEN       0x02
  17. #define FA_SYSTEM       0x04
  18. #define FA_LABEL        0x08
  19. #define FA_DIREC        0x10
  20. #define FA_ARCH         0x20
  21.  
  22.  
  23. struct ffblk   {
  24.     char ff_reserved[21];               /* Reserved by TOS */
  25.     char ff_attrib;                     /* Attribute found */
  26.     int  ff_ftime;                      /* File time */
  27.     int  ff_fdate;                      /* File date */
  28.     long ff_fsize;                      /* File size */
  29.     char ff_name[13];                   /* File name found */
  30. };
  31.  
  32. struct date
  33. {
  34.     int    da_year;                     /* Current year */
  35.     char   da_day;                      /* Day of the month */
  36.     char   da_mon;                      /* Month ( 1 = Jan ) */
  37. };
  38.  
  39. struct time
  40. {
  41.     unsigned char   ti_min;             /* Minutes */
  42.     unsigned char   ti_hour;            /* Hours */
  43.     unsigned char   ti_hund;            /* Hundredths of seconds */
  44.     unsigned char   ti_sec;             /* Seconds */
  45. };
  46.  
  47. struct ftime   {
  48.    struct   {
  49.       unsigned ft_hour:   5;
  50.       unsigned ft_min:    6;
  51.       unsigned ft_tsec:   5;
  52.       unsigned ft_year:   7;
  53.       unsigned ft_month:  4;
  54.       unsigned ft_day:    5;
  55.    }tbit;
  56.    long fltime;
  57. };
  58.  
  59. int             findfirst( char *filename, struct ffblk *ffblk,
  60.                            int attrib );
  61. int             findnext( struct ffblk *ffblk );
  62.  
  63. void            getdate( struct date *dateRec );
  64. void            gettime( struct time *timeRec );
  65. void            setdate( struct date *dateRec );
  66. void            settime( struct time *timeRec );
  67. int             getftime( int handle, struct ftime *ftimep );
  68. int             setftime( int handle, struct ftime *ftimep );
  69.  
  70. int             kbhit( void );
  71. int             getch( void );
  72. int             putch( int c);
  73. int             chdir( char *filename );
  74.  
  75. /* impl by glasi  */
  76.  
  77. int strnicmp(char *,char *,int);
  78. int stricmp(char *,char *);
  79. char *strdup(char *);
  80. int isatty(int);
  81. void tzset(void);
  82. long filelength(int);
  83. char *getscreen(void);
  84.  
  85. #if !defined(TIME_T)
  86. typedef long time_t;
  87. #endif
  88. time_t unixtime(unsigned int,unsigned int);
  89. unsigned int swapword(unsigned int);
  90. unsigned long swaplong(unsigned long);
  91. #endif
  92.  
  93.  
  94.  
  95. /***********************************************************************/
  96.