home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / directry / mv / dta.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-05  |  3.2 KB  |  87 lines

  1. /*
  2. 8-Sep-86 16:13:34-PDT,3102;000000000000
  3. Return-Path: <pwu@unix.macc.wisc.edu>
  4. Received: FROM UNIX.MACC.WISC.EDU BY B.ISI.EDU WITH TCP ; 8 Sep 86 16:09:52 PDT
  5. Received: by unix.macc.wisc.edu;
  6.           id AA04934; 4.12/5; Mon, 8 Sep 86 17:30:54 cdt
  7. Date: Mon, 8 Sep 86 17:30:54 cdt
  8. From: Peter Wu <pwu@unix.macc.wisc.edu>
  9. Message-Id: <8609082230.AA04934@unix.macc.wisc.edu>
  10. To: info-ibmpc-request@mosis
  11. Subject: dta.h
  12. */
  13. #define A_FIL   0x40  /* Peter's addition: this mask searches for file */
  14. #define A_ARC   0x20  /* attributes bits of attribute byte in dta */
  15. #define A_DIR   0x10
  16. #define A_SYS   0x4
  17. #define A_HID   0x2
  18. #define A_MASK  (A_FIL | A_DIR | A_SYS | A_HID)  /* mask to find all files */
  19.  
  20. struct dtbuf3 {  /* structure returned by dos function 0x4e and 0x4f */
  21.   /* The first 21 bytes are undocumented; use them at your own risk.
  22.   ** Their use is guessed by Peter Wu. This applies only to DOS 3.xx
  23.   */
  24.  
  25.   unsigned char drv_no;      /* drive number; 1=A  2=B  3=C ... */
  26.   char template[11];         /* file template; no period */
  27.   unsigned char match_attr;  /* the search attribute */
  28.   unsigned char slotl;       /* directory slot number of the matching file */
  29.   unsigned char sloth;
  30.   unsigned char clusl, clush; /* cluster number of the directory being
  31.                                  searched */
  32.   unsigned char unknown[4];   /* haven't figured out what these are */
  33.   /* end of first 21 bytes */
  34.  
  35.   unsigned char attr;
  36.   unsigned short time;
  37.   unsigned short data;
  38.   unsigned long size;  /* 4 bytes */
  39.   char fn[13];  /* this is an asciiz */
  40.   unsigned char e_attr;  /* extended (by peter) search attribute */
  41. };
  42.  
  43. struct dtbuf2 {  /* structure returned by dos function 0x4e and 0x4f */
  44.   /* The first 21 bytes are undocumented; use them at your own risk.
  45.   ** Their use is guessed by Peter Wu. This applies only to DOS 2.xx
  46.   */
  47.  
  48.   unsigned char match_attr;  /* the search attribute */
  49.   unsigned char drv_no;      /* drive number; 1=A  2=B  3=C ... */
  50.   char template[11];         /* file template; no period */
  51.   unsigned char slotl;       /* directory slot number of the matching file */
  52.   unsigned char sloth;
  53.   unsigned char unknown[4];   /* haven't figured out what these are */
  54.   unsigned char clusl, clush; /* cluster number of the directory being
  55.                                  searched */
  56.   /* end of first 21 bytes */
  57.  
  58.   unsigned char attr;
  59.   unsigned short time;
  60.   unsigned short data;
  61.   unsigned long size;  /* 4 bytes */
  62.   char fn[13];  /* this is an asciiz */
  63.   unsigned char e_attr;  /* extended (by peter) search attribute */
  64. };
  65.  
  66. struct dtbufx {  /* generic version (works for any DOS version */
  67.   unsigned char unknown[21];
  68.   unsigned char attr;
  69.   unsigned short time;
  70.   unsigned short data;
  71.   unsigned long size;  /* 4 bytes */
  72.   char fn[13];  /* this is an asciiz */
  73.   unsigned char e_attr;  /* extended (by peter) search attribute */
  74.  
  75.   /* the following info has to be copied from dtbuf2 or dtbuf3 by
  76.   ** the ffmf and fnmf functions
  77.   */
  78.   unsigned char drv_no;
  79.   unsigned char slotl, sloth, clusl, clush;
  80. };
  81.  
  82. union dtbuf {
  83.   struct dtbuf3 dos3;
  84.   struct dtbuf2 dos2;
  85.   struct dtbufx dos;
  86. };
  87.