home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / prof_c / 08file / ls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-11  |  1.1 KB  |  35 lines

  1. /*
  2.  *    ls.h -- header file for ls program
  3.  */
  4.  
  5. /* structure definition for output buffer elements */
  6. struct OUTBUF {
  7.     unsigned short o_mode;    /* file mode (attributes) */
  8.     long o_size;        /* file size in bytes */
  9.     unsigned int o_date;    /* file modification date */
  10.     unsigned int o_time;    /* file modification time */
  11.     char *o_name;        /* DOS filespec */
  12. };
  13.  
  14. /* constants for DOS file-matching routines */
  15. #define FILESPEC    13    /* maximum filespec + NUL */
  16. #define RNBYTES        21    /* bytes reserved for next_fm() calls */
  17.  
  18. /* file modes (attributes) */
  19. #define READONLY    0x0001
  20. #define HIDDEN        0x0002
  21. #define SYSTEM        0x0004
  22. #define VOLUME        0x0008
  23. #define SUBDIR        0x0010
  24. #define ARCHIVE        0x0020
  25.  
  26. /* structure definition for DOS file-matching routines */
  27. struct DTA {
  28.     unsigned char d_reserved[RNBYTES];    /* buffer for next_fm */
  29.     unsigned char d_attr;        /* file attribute (type) byte */
  30.     unsigned d_mtime;        /* time of last modification */
  31.     unsigned d_mdate;        /* date of last modification */
  32.     long d_fsize;            /* file size in bytes */
  33.     char d_fname[FILESPEC];        /* file spec (filename.ext + NUL) */
  34. };
  35.