     NOLIST
Seek        MACRO              ; 14 Mar 88
*------------------------------; Start of Seek macro.
                               ; Put the file handle in D1.
     MOVE.L \1,D1
     NOLIST
     IFEQ NARG-1               ; If only the file handle was given, then
     LIST
     CLR.L D2                  ; Make offset be zero from current.
     CLR.L D3
     NOLIST
     ENDC
     IFEQ NARG-2               ; If offset was given without argument #3,
     LIST
                               ; Make offset be from the beginning.
     MOVE.L #\2,D2
     MOVEQ.L #-1,D3
     NOLIST
     ENDC
     IFEQ NARG-3               ; If FromCurrent or BeforeEnd is specified,
     IFC '\3','FromCurrent'
     LIST
     CLR.L D3                  ; Make offset from current.
     MOVE.L #\2,D2
     NOLIST
     ENDC
     IFC '\3','BeforeEnd'
     LIST
     MOVE.L #1,D3              ; Make offset before end.
     MOVE.L #-\2,D2
     NOLIST
     ENDC
     ENDC
     LIST
     CallLib Seek,dos          ; Call Seek.
     CMPI.L #-1,D0             ; Make the zero flag indicate failure.
*------------------------------; End of Seek macro.
     ENDM
     LIST
