     NOLIST
CurrentDir  MACRO              ; 10 Jan 88
*------------------------------; Start of CurrentDir macro.
                               ; Set up D1 for the _LVOCurrentDir function.
     MOVE.L \1,D1
     CallLib CurrentDir,dos    ; Call CurrentDir.
     NOLIST
     IFEQ NARG-2               ; If <OldDirLockName> is specified,
     LIST
                               ; Save the old dir lock under the specified
                               ;  name.
     MOVE.L D0,\2
     NOLIST
     IFND \2
     LIST
     SECTION   BSS_Section,BSS
     CNOP 0,2
\2:
     DS.L 1
     SECTION   "",CODE
     NOLIST
     ENDC
     ENDC
     IFEQ NARG-1
                               ; If <OldDirLockName> is not specified, then
     LIST
     MOVE.L D0,OldDirLock      ; Save the old directory lock at "OldDirLock".
     NOLIST
     IFND OldDirLock
     LIST
     SECTION BSS_Section,BSS
     CNOP 0,2
OldDirLock:
     DS.L 1
     SECTION   "",CODE
     NOLIST
     ENDC
     ENDC
     LIST
     TST.L D0                  ; Make the zero flag indicate if old was root.
*------------------------------; End of CurrentDir macro.
     ENDM
     LIST
