        subttl  [DemCD.inc] Current directory list structure
        page

;
;   Revision history:
;
;   danno   09-Nov-1988     Modified for MVDM (from curdir.inc)
;                           depends on dosinc/curdir.inc
;********************************************************************** ;BN001;
; 12Jul91 - G.L.Fulk                                                    ;BN001;
; Increase the buffer for EXEC reading the .EXE relocation table to 2K. ;BN001;
;********************************************************************** ;BN001;
;
;**     CDS - Current Directory Structure
;
; CDS items are used by the internal routines to store cluster numbers and
; network identifiers for each logical name.  The ID field is used dually,
; both as net ID and for a cluster number for local devices.  In the case
; of local devices, the cluster number will be -1 if there is a potential
; of the disk being changed or if the path must be recracked.
;
;       Some pathnames have special preambles, such as
;
;               \\machane\sharename\...
;       For these pathnames we can't allow ".." processing to back us
;       up into the special front part of the name.  The CURDIR_END field
;       holds the address of the seperator character which marks
;       the split between the special preamble and the regular
;       path list; ".." processing isn't allowed to back us up past
;       (i.e., before) CURDIR_END
;       For the root, it points at the leading /.  For net
;       assignments it points at the end (nul) of the initial assignment:
;       A:/     \\foo\bar           \\foo\bar\blech\bozo
;         ^              ^                   ^
;
;----------------FROM DOSINC\CURDIR.INC--------------------------------
RMDIRSTRLEN     EQU     (64+3)  ; Max length in bytes of directory strings
CD_ISNET        EQU     80H             ;bit 7
CD_INUSE        EQU     40H             ;bit 6
CD_SPLICE       EQU     20H             ;bit 5
CD_LOCAL        EQU     10H             ;bit 4
CD_ISPSEUDOCHAR EQU     08H             ;bit 3
CD_ISUNC        EQU     04H             ;bit 2
;               EQU     02H             ;bit 1
CD_DEM          EQU     01H             ;bit 0
CD_JOIN         EQU     CD_SPLICE
;----------------------------------------------------------------------
;
;
;
;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
;            C  A  V  E  A  T     P  R  O  G  R  A  M  M  E  R             ;
;                                                                          ;
; CDS items are used bu the internal routines to store cluster numbers and ;
; network identifiers for each logical name.  The ID field is used dually, ;
; both as net ID and for a cluster number for local devices.  In the case  ;
; of local devices, the cluster number will be -1 if there is a potential  ;
; of the disk being changed or if the path must be recracked.  The END     ;
; field is the location of the end of the definition.  No .. is allowed    ;
; past this point                                                          ;

TEMPLEN         EQU     RMDIRSTRLEN*2

curdir_list     STRUC
curdir_text     db      RMDIRSTRLEN dup(?)
                                ;+00h text of assignment and curdir
curdir_flags    dw      ?       ;+43h various flags
                                ;     bit 15=network
                                ;     bit 14=physical drive
                                ;     bit 13=join
                                ;     bit 12=subst
curdir_devptr   dd      ?       ;+45h local pointer to DPB or net device
curdir_ID       dw      ?,?     ;+49h cluster of current dir (net ID)
curdir_user_word dw     ?       ;+4Dh
curdir_end      dw      ?       ;+4Fh end of assignment
                                ;     index to ".." backup limit - see above
curdir_type     db      ?       ;+51h IFS drive (2=ifs, 4=netuse)
curdir_ifs_hdr  dd      ?       ;+52h Ptr to File System Header
curdir_fsda     db      2 dup(?);+56h File System Dependent Data Area
curdir_list     ENDS            ;=58h

curdir_netID    EQU     DWORD PTR curdir_ID

;Flag word masks
CurDir_isifs    EQU     1000000000000000B       ; DOS 4.00  (bit 15)
CurDir_isnet    EQU     8000h   ;bit 15
CurDir_inuse    EQU     4000h   ;bit 14
CurDir_splice   EQU     2000h   ;bit 13
CurDir_local    EQU     1000h   ;bit 12
CurDir_ISPSEUDOCHAR EQU 0800h   ;bit 11
CurDir_ISUNC    EQU     0400h   ;bit 10
;               EQU     0200h   ;bit 9
CurDir_DEM      EQU     0100h   ;bit 8

CurDir_JOIN     EQU     CurDir_SPLICE
;                                                                          ;
;            C  A  V  E  A  T     P  R  O  G  R  A  M  M  E  R             ;
;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;

