    ! Name to Number mapping for EDWIN Version 5

    !############################################################################
    !#                                                                          #
    !#  This is a module from the EDWIN Graphics Package, which was developed   #
    !#  in the Department of Computer Science, at Edinburgh University, from    #
    !#  1978 to the present day, release 5 of EDWIN in October 1984.            #
    !#                                                                          #
    !#  The principal author of the EDWIN Graphics Package was J Gordon Hughes, #
    !#  while working for the Edinburgh University Computer Sceince Department. #
    !#  Parts of EDWIN have been produced by many different people, too many    #
    !#  too mention, working for different departments of Edinburgh and Leeds   #
    !#  Universities.                                                           #
    !#                                                                          #
    !#  This module is regarded as being in the public domain, and the authors  #
    !#  and accept no responsibility regarding the uses to which the software   #
    !#  will be put.                                                            #
    !#                                                                          #
    !############################################################################

    from Imp   include Lognames, Textutils
    from EDWIN include Specs

    external integer fn EDWIN Number alias "EDWIN_NUMBER" (string (255) DEV)
       const integer Max Dev = 76
       const string (11) array DEVICES (1:Max Dev) =
          { Terminals }
          "NULL", "T4002", "T4006", "T4010", "T4012", "T4014", "T4015", "T4016",
          "T4105", "T4106", "T4107", "T4109", "X5A", "XK1",
          "VI200", "VT100", "SUN", "APOLLO", "WINDOW", "PC", "X",
          { Hardcopy }
          "PRINTRONIX", "FX80", "FX80HR", "FX100", "FX100HR", "LASERJET", "GEM",
          "POSTSCRIPT", "PS",
          { Plotters }
          "HP7220", "HP72208", "HP7440", "HP7470", "HP7475",
          "HP7550", "HP7580",  "HP7585", "HP7586",
          { Versatec plotters }
          "V80", "V81", "V82",
          "V2552", "V2562", "V2558", "V2568", "V2756", "V2766",
          "V7222", "V7422", "V7224", "V7424", "V7225",
          "V7425", "V7236", "V7436", "V7244", "V7444",
          "V8122", "V8222", "V8124", "V8224", "V8136", "V8236", "V8142", "V8242",
          "V8244", "V8252", "V8259", "V8172", "V8272",
          "V8242", "V9242",
          "V3224", "V3236", "V3244"

       const integer array DEVICE NUM (1:Max Dev) =
          { Terminals }
          0, 4002, 4006, 4010, 4012, 4014, 4015, 4016,
          4105, 4106, 4107, 4109, 5555, 1,
          200, 131, 'W', 'A', 'W', 'D', 'X',
          { Hardcopy }
          300, 8060, 80120, 10060, 100120, 2686, 'G', 16_5053, 16_7073,
          { Plotters }
          7220, 72208, 7440, 7470, 7475, 7550, 7580, 7585, 7586,
          { Versatec plotters }
          80, 81, 82,
          2552, 2562, 2558, 2568, 2756, 2766,
          7222, 7422, 7224, 7424, 7225,
          7425, 7236, 7436, 7244, 7444,
          8122, 8222, 8124, 8224, 8136, 8236, 8142, 8242,
          8244, 8252, 8259, 8172, 8272,
          8242, 9242,
          3224, 3236, 3244

       integer I
       To Upper (Dev)
       if Dev = "SUN" start
          result = 'S' if Translate ("WINDOW_ME") = "WINDOW_ME"  { No Suntools }-
                        or Translate ("WINDOW_ME") = Translate ("WINDOW_GFX")
                          { Not running in a graphics window }
          result = 'W'
       finish
       for I = 1, 1, Max Dev cycle
            result = Device Num(I) if Dev = Devices(I)
       repeat
       result = -1
    end

    external routine INITIALISE EDWIN alias "EDWIN_SINI"  (string (255) DEV)
       Initialise for (EDWIN Number (Dev))
    end

    end of file