     !    File:            Tech$Disk:[ICPaul.Work]ScanLib.Def

    %NOLIST

     !
     !     Author:          P. Lind
     !
     !     Latest Change:   4/12/84   10:00
     !
     
     
     ! Dev_Assign-- This Sub-Routine assigns a channel number to a dedicated
     !     device line. DevName is a character string of up to 64 characters. 
     !     The Sub-Routine calls Sys$Assign and returns an integer channel 
     !     number, and SYS_Status.
     !
     !    SUB Dev_Assign(STRING Term$_ID,               &
     !                   INTEGER TT_Chan,               &
     !                   LONG SYS_STATUS)
     !

     EXTERNAL SUB Dev_Assign (STRING, INTEGER, LONG)

     ! Dev_Assign-- This Sub-Routine deassigns a channel number from a 
     !     dedicated device line. The Sub-Routine calls Sys$DeAssign and 
     !     deassigns TT_Chan, and returns SYS_Status.
     !
     !    SUB Dev_DeAssign(INTEGER TT_Chan,               &
     !                     LONG SYS_STATUS)

     EXTERNAL SUB Dev_DeAssign(INTEGER, LONG)


     !
     ! Dev_Scan-- This Procedure uses the SYS$QIO and SYS$QIOW functions to
     !  poll a device and read the device's output one character at a time.
     !  Scan$_Type is a string of 4 characters; the only character of any 
     !  importance is the first one.  DevScan interprets this first character 
     !  as follows:  
     !     's', 'S': scan the device with a specified timeout
     !     'w', 'W': wait for a character no timeout
     !     'f', 'F': same as scan but with no interpretation of DEL, ^U, or ^R
     !     'p', 'P': QIO Read with Timed, Typeahead purge, and temporary
     !                  pass all.
     !     'c', 'C': Scan with Type Ahead purge.
     !         OTHERWISE
     !          It enables SCAN
     !     
     !     KbdTime is the number of seconds to wait for timeout if applicable. 
     !  
     !     KbdChan is the channel number of the device to be read. 
     !
     !     Output$_S is the Character read during a succesful read operation. 
     !
     !     SYS_STATUS is the status of the read, a 1 indicates a succesful 
     !        read.
     !
     !   SUB Dev_Scan(STRING Scan$_Type,        &
     !                INTEGER KbdTime,          &
     !                INTEGER TT_Chan,          &
     !                STRING Output$_S,         &
     !                LONG SYS_STATUS)
     !
     
     EXTERNAL SUB Dev_Scan(STRING, INTEGER, INTEGER, STRING, LONG)

     ! Dev_Line_Scan-- This Procedure uses the SYS$QIO and SYS$QIOW functions 
     !  to poll a device and read the device's output one Line at a time.
     !  EchoVal determines weather to print lines as they are read. 
     !     1=Yes. 0=No.
     !  Scan$_Type is a string of 4 characters; the only character of any 
     !  importance is the first one.  DevScan interprets this first character 
     !  as follows:  
     !     's', 'S': scan the device with a specified timeout
     !     'w', 'W': wait for a character no timeout
     !     'f', 'F': same as scan but with no interpretation of DEL, ^U, or ^R
     !     'p', 'P': QIO Read with Timed, Typeahead purge, and temporary
     !                 pass all.
     !     'c', 'C': Scan with Type Ahead purge.
     !         OTHERWISE
     !          It enables SCAN
     !     
     !     KbdTime is the number of seconds to wait for timeout if applicable. 
     !  
     !     KbdChan is the channel number of the device to be read. 
     !
     !     Output$_S is the Line read during a succesful read operation. 
     !
     !     SYS_STATUS is the status of the read, a 1 indicates a succesful 
     !          read.
     !
     !     SUB Dev_Line_Scan(INTEGER EchoVal,     &
     !                  STRING Scan$_Type,        &
     !                  INTEGER KbdTime,          &
     !                  INTEGER TT_Chan,          &
     !                  STRING Output$_S,         &
     !                  INTEGER Buff_Len,         &
     !                  LONG SYS_STATUS)

     EXTERNAL SUB Dev_Line_Scan(INTEGER,STRING, INTEGER, INTEGER,      &
          STRING, INTEGER, LONG)

     

  %LIST
