Title:	WIServer library documentation
Summary:	This document is supplied (in EPS form) with the WIServer application.
Ref.:	25.01.93.01.mjm
Author:	mjm
Version:	2.03
Date:	


Introduction
With the release of each version of WIServer, this file should be printed (excluding this page) in EPS format to a file called LIBDOC.EPS.
The only font used in this document is 'Courier'.
Page numbering is a bit strange. Page xx of yy. xx is OK as long as there are two contents pages (otherwise need to play around with the page numbering again). yy is just text (NumPages does not work because it counts this page as well).
WIServer occam I/O library documentation
Author: M. Morgan 

Contents1.    Overview 	Page 3 
2.    WIServer occam I/O library header 	Page 3 
3.    WIServer occam I/O library procedure headings 	Page 7 
3.1.   Packet preparation PROCs 	Page 7 
3.2.   Basic output for text windows or files 	Page 7 
3.3.   Basic output for text windows 	Page 8 
3.4.   Interactive text input 	Page 8 
3.5.   File operations 	Page 9 
3.6.   General server utilities 	Page 10 
3.7.   Get information procedures 	Page 10 
3.8.   Manipulate window procedures 	Page 10 
3.9.   DLL procedures 	Page 10 
3.10.   Module procedures 	Page 10 
3.11.   General utilities 	Page 11 
4.    WIServer occam I/O library procedure headings with documentation 	Page 12 
4.1.   PROC push.bool 	Page 12 
4.2.   PROC push.byte 	Page 12 
4.3.   PROC push.int16 	Page 13 
4.4.   PROC push.int32 	Page 13 
4.5.   PROC push.string 	Page 14 
4.6.   PROC push.small.string 	Page 15 
4.7.   PROC push.null.string 	Page 15 
4.8.   PROC push.null.small.string 	Page 16 
4.9.   PROC pop.bool 	Page 17 
4.10.   PROC pop.byte 	Page 17 
4.11.   PROC pop.int16 	Page 18 
4.12.   PROC pop.int32 	Page 18 
4.13.   PROC pop.string 	Page 19 
4.14.   PROC pop.small.string 	Page 20 
4.15.   PROC adjust.packet 	Page 20 
4.16.   PROC write.small.string 	Page 21 
4.17.   PROC write.char 	Page 22 
4.18.   PROC write.string 	Page 23 
4.19.   PROC write.nl 	Page 24 
4.20.   PROC write.string.nl 	Page 25 
4.21.   PROC write.bstring 	Page 26 
4.22.   PROC write.bstring.nl 	Page 27 
4.23.   PROC write.bool 	Page 27 
4.24.   PROC write.int 	Page 28 
4.25.   PROC write.int64 	Page 29 
4.26.   PROC write.hex.byte 	Page 30 
4.27.   PROC write.hex.int16 	Page 31 
4.28.   PROC write.hex.int32 	Page 32 
4.29.   PROC write.hex.int64 	Page 33 
4.30.   PROC write.real32 	Page 33 
4.31.   PROC write.real64 	Page 35 
4.32.   PROC get.tab 	Page 36 
4.33.   PROC write.tab.char 	Page 37 
4.34.   PROC write.tab 	Page 38 
4.35.   PROC goto.xy 	Page 38 
4.36.   PROC cursor.up 	Page 39 
4.37.   PROC cursor.down 	Page 40 
4.38.   PROC cursor.left 	Page 41 
4.39.   PROC cursor.right 	Page 42 
4.40.   PROC insert.line 	Page 43 
4.41.   PROC delete.line 	Page 43 
4.42.   PROC insert.char 	Page 44 
4.43.   PROC delete.char 	Page 45 
4.44.   PROC beep 	Page 46 
4.45.   PROC clear.window 	Page 47 
4.46.   PROC clear.to.end.of.line 	Page 48 
4.47.   PROC clear.to.end.of.screen 	Page 48 
4.48.   PROC get.event 	Page 49 
4.49.   PROC wait.event 	Page 51 
4.50.   PROC flush.input.buffer 	Page 52 
4.51.   PROC wait.any.event 	Page 53 
4.52.   PROC get.key 	Page 54 
4.53.   PROC wait.key 	Page 55 
4.54.   PROC get.option 	Page 56 
4.55.   PROC enter.ansi.string.with.escape 	Page 57 
4.56.   PROC enter.ansi.string 	Page 58 
4.57.   PROC enter.real32 	Page 60 
4.58.   PROC enter.real64 	Page 61 
4.59.   PROC enter.int 	Page 62 
4.60.   PROC open.file 	Page 64 
4.61.   PROC close.stream 	Page 65 
4.62.   PROC flush.stream 	Page 66 
4.63.   PROC end.of.file 	Page 67 
4.64.   PROC remove.file 	Page 68 
4.65.   PROC read.binary 	Page 69 
4.66.   PROC read.text.line 	Page 70 
4.67.   PROC exit.server 	Page 71 
4.68.   PROC get.free.resources 	Page 72 
4.69.   PROC get.system.information 	Page 73 
4.70.   PROC get.system.mertic 	Page 74 
4.71.   PROC get.application.information 	Page 75 
4.72.   PROC get.window.handle 	Page 76 
4.73.   PROC get.window.text 	Page 77 
4.74.   PROC get.window.state 	Page 78 
4.75.   PROC get.cursor.pos 	Page 79 
4.76.   PROC open.text.window 	Page 80 
4.77.   PROC set.window.text 	Page 82 
4.78.   PROC show.window 	Page 83 
4.79.   PROC load.dll 	Page 84 
4.80.   PROC unload.dll 	Page 85 
4.81.   PROC exec.dll 	Page 86 
4.82.   PROC win.exec 	Page 87 
4.83.   PROC get.module.usage 	Page 88 
4.84.   PROC sp.multiplex 	Page 89 
4.85.   PROC option.list 	Page 90 
4.86.   PROC message.box 	Page 92 
4.87.   PROC cancel.cancel 	Page 93 
5.  Graphic window library header 	Page 94 
6.  Graphic window library procedure headings 	Page 94 
7.  Graphic window library procedure headings with documentation 	Page 94 
7.1.   Introduction 	Page 94 
7.2.   PROC clip.graphic.line 	Page 94 
7.3.   PROC open.graphic.window 	Page 95 
7.4.   PROC close.graphic.window 	Page 96 
7.5.   PROC add.graphic.lines 	Page 97 
7.6.   PROC clear.all.graphic.lines 	Page 98 
7.7.   PROC graphic.lines.free 	Page 98 
7.8.   PROC graphic.line.buffer.process 	Page 99 

   Overview
The WIServer occam libraries were written to allow new users to use the new facilities of WIServer as soon as possible. The library is desinged to be similar to the TDS3 splib library. Two libraries are supplied for specific use with WIServer. The library 'wiserver.hdr' is a header library always used with the more important 'wiserver' library. The procedures in the library expect text windows to interpret WIServer screen codes. 

This documentation covers version 2.03 of the Server release version.

The dicumentation provided here includes
- A listing of all the constants in 'wiserver.hdr' with some comments.
- A listing of all the procedure headers defined in 'wiserver'.
- A listing of all the procedure headers with code documentation in 'wiserver'.

   WIServer occam I/O library header
Version 2.03	3/9/93
For TDS3 	'wiserver.hdr'
For Occam toolset	'wiserver.inc'

  SP protocol
-- The maximum size of link packets (in bytes)  in either direction. --
-- NOTE: WIServer can handle packet sizes of 2048 bytes but the TDS  --
-- kernel can only handle 512. MAX.PACKET.SIZE can be increased to   --
-- 2048 if stand alone programs are developed.                       --
VAL INT MAX.PACKET.SIZE IS 512:

PROTOCOL SP IS INT16::[]BYTE:   -- The IServer protocol. --

  SP. codes
VAL BYTE SP.OPEN      IS 10 (BYTE): -- These are standard IServer command  --
VAL BYTE SP.CLOSE     IS 11 (BYTE): -- tags. See the IServer documentation --
VAL BYTE SP.READ      IS 12 (BYTE): -- for details of their use.           --
VAL BYTE SP.WRITE     IS 13 (BYTE):
VAL BYTE SP.GETS      IS 14 (BYTE):
VAL BYTE SP.PUTS      IS 15 (BYTE):
VAL BYTE SP.FLUSH     IS 16 (BYTE):
VAL BYTE SP.SEEK      IS 17 (BYTE):
VAL BYTE SP.TELL      IS 18 (BYTE):
VAL BYTE SP.EOF       IS 19 (BYTE):
VAL BYTE SP.ERROR     IS 20 (BYTE):
VAL BYTE SP.REMOVE    IS 21 (BYTE):
VAL BYTE SP.RENAME    IS 22 (BYTE):
VAL BYTE SP.GETBLOCK  IS 23 (BYTE):
VAL BYTE SP.PUTBLOCK  IS 24 (BYTE):
VAL BYTE SP.GETKEY    IS 30 (BYTE):
VAL BYTE SP.POLLKEY   IS 31 (BYTE):
VAL BYTE SP.GETENV    IS 32 (BYTE):
VAL BYTE SP.TIME      IS 33 (BYTE):
VAL BYTE SP.SYSTEM    IS 34 (BYTE):
VAL BYTE SP.EXIT      IS 35 (BYTE):
VAL BYTE SP.CMDLINE   IS 40 (BYTE):
VAL BYTE SP.CORE      IS 41 (BYTE):
VAL BYTE SP.VERSION   IS 42 (BYTE):

VAL BYTE SP.OPEN.TEXT.WINDOW   IS 128 (BYTE): -- These are the extra WIServer   --
VAL BYTE SP.GET.FREE.RESOURCES IS 129 (BYTE): -- command tags. See the WIServer --
VAL BYTE SP.GET.INFO           IS 130 (BYTE): -- user manual for details of     --
VAL BYTE SP.GET.SYSTEM.INFO    IS 131 (BYTE): -- their use.                     --
VAL BYTE SP.GET.SYSTEM.METRIC  IS 132 (BYTE):
VAL BYTE SP.GET.APP.INFO       IS 133 (BYTE):
VAL BYTE SP.GET.WINDOW.HANDLE  IS 134 (BYTE):
VAL BYTE SP.GET.WINDOW.TEXT    IS 135 (BYTE):
VAL BYTE SP.SET.WINDOW.TEXT    IS 136 (BYTE):
VAL BYTE SP.GET.WINDOW.STATE   IS 137 (BYTE):
VAL BYTE SP.SHOW.WINDOW        IS 138 (BYTE):
VAL BYTE SP.GET.EVENT          IS 139 (BYTE):
VAL BYTE SP.LOAD.DLL           IS 140 (BYTE):
VAL BYTE SP.UNLOAD.DLL         IS 141 (BYTE):
VAL BYTE SP.EXEC.DLL           IS 142 (BYTE):
VAL BYTE SP.TAB                IS 143 (BYTE):
VAL BYTE SP.WIN.EXEC           IS 144 (BYTE):
VAL BYTE SP.GET.MODULE.USAGE   IS 145 (BYTE):
VAL BYTE SP.GET.CURSOR.POS     IS 146 (BYTE):

  SPT. and SPM. Open file codes
-- These code are for use with SP.OPEN and PROC open.file. --

VAL BYTE SPT.BINARY IS 1 (BYTE):           -- File is binary. --
VAL BYTE SPT.TEXT   IS 2 (BYTE):           -- File is host text file. --

VAL BYTE SPM.INPUT           IS 1 (BYTE):  -- File is read only. --
VAL BYTE SPM.OUTPUT          IS 2 (BYTE):  -- File is write only. --
VAL BYTE SPM.APPEND          IS 3 (BYTE):  -- File is append write. --
VAL BYTE SPM.EXISTING.UPDATE IS 4 (BYTE):  -- File is read/write. --
VAL BYTE SPM.NEW.UPDATE      IS 5 (BYTE):  -- File is created and read/write. --
VAL BYTE SPM.APPEND.UPDATE   IS 6 (BYTE):  -- File is read/write. --


  SPO. Seek codes
-- These code are for use with SP.SEEK. --

VAL INT32 SPO.START   IS 1 (INT32):
VAL INT32 SPO.CURRENT IS 2 (INT32):
VAL INT32 SPO.END     IS 3 (INT32):

  INFO.SYSTEM. codes
-- These codes are for use with SP.GET.SYSTEM.INFO and PROC get.system.information. --

VAL INT16 INFO.SYSTEM.DESKTOP        IS 0 (INT16):
VAL INT16 INFO.SYSTEM.ACTIVE.WINDOW  IS 1 (INT16):
VAL INT16 INFO.SYSTEM.CAPTURE.WINDOW IS 2 (INT16):
VAL INT16 INFO.SYSTEM.MODAL.WINDOW   IS 3 (INT16):
VAL INT16 INFO.SYSTEM.VERSION        IS 4 (INT16):

  SM. system metric codes
-- These codes are for use with SP.GET.SYSTEM.METRIC and PROC get.system.metric. --

VAL INT16 SM.CXBORDER      IS 5  (INT16): -- Non-sizeable window frame width. --
VAL INT16 SM.CYBORDER      IS 6  (INT16): -- Non-sizeable window frame height. --
VAL INT16 SM.CXCURSOR      IS 13 (INT16): -- Cursor width. --
VAL INT16 SM.CYCURSOR      IS 14 (INT16): -- Cursor height. --
VAL INT16 SM.CXDLGFRAME    IS 7  (INT16): -- ws_DlgFrame style window frame width. --
VAL INT16 SM.CYDLGFRAME    IS 8  (INT16): -- ws_DlgFrame style window frame height. --
VAL INT16 SM.CXFRAME       IS 32 (INT16): -- Sizeable window frame width. --
VAL INT16 SM.CYFRAME       IS 33 (INT16): -- Sizeable window frame height. --
VAL INT16 SM.CXFULLSCREEN  IS 16 (INT16): -- Maximized windows client area width. --
VAL INT16 SM.CYFULLSCREEN  IS 17 (INT16): -- Maximized windows client area height. --
VAL INT16 SM.CXHSCROLL     IS 21 (INT16): -- Horizontal scroll bar arrow width. --
VAL INT16 SM.CYHSCROLL     IS 3  (INT16): -- Horizontal scroll bar arrow height. --
VAL INT16 SM.CXVSCROLL     IS 2  (INT16): -- Vertical scroll bar arrow width. --
VAL INT16 SM.CYVSCROLL     IS 20 (INT16): -- Vertical scroll bar arrow height. --
VAL INT16 SM.CXHTHUMB      IS 10 (INT16): -- Horizontal scroll bar thumb width. --
VAL INT16 SM.CYVTHUMB      IS 9  (INT16): -- Horizontal scroll bar thumb height. --
VAL INT16 SM.CXICON        IS 11 (INT16): -- Icon width. --
VAL INT16 SM.CYICON        IS 12 (INT16): -- Icon height. --
VAL INT16 SM.CXMIN         IS 28 (INT16): -- Minimum window width. --
VAL INT16 SM.CYMIN         IS 29 (INT16): -- Minimum window height. --
VAL INT16 SM.CXMINTRACK    IS 34 (INT16): -- Minimum window tracking width. --
VAL INT16 SM.CYMINTRACK    IS 35 (INT16): -- Minimum window tracking height. --
VAL INT16 SM.CXSCREEN      IS 0  (INT16): -- Screen width. --
VAL INT16 SM.CYSCREEN      IS 1  (INT16): -- Screen height. --
VAL INT16 SM.CXSIZE        IS 30 (INT16): -- Title bar bitmap width. --
VAL INT16 SM.CYSIZE        IS 31 (INT16): -- Title bar bitmap height. --
VAL INT16 SM.DEBUG         IS 22 (INT16): -- Non-zero for windows debugging version. --
VAL INT16 SM.MOUSEPRESENT  IS 19 (INT16): -- Non-zero for mouse present. --
VAL INT16 SM.SWAPBUTTON    IS 23 (INT16): -- Non-zero for mouse buttons swapped. --
VAL INT16 SM.CYKANJIWINDOW IS 18 (INT16): -- Kanji window height. --

  SW. show window codes
-- These codes are for use with SP.SHOW.WINDOW and PROC show.window. --

VAL INT16 SW.HIDE              IS 0 (INT16): -- Hidden. --
VAL INT16 SW.MINIMIZE          IS 6 (INT16): -- Minimize window and deactivate. --
VAL INT16 SW.SHOW              IS 5 (INT16): -- Windows current size and position. --
VAL INT16 SW.SHOW.MAXIMIZED    IS 3 (INT16): -- Maximized and active. --
VAL INT16 SW.SHOW.MINIMIZED    IS 2 (INT16): -- Minimized and active. --
VAL INT16 SW.SHOW.MIN.NOACTIVE IS 7 (INT16): -- Minimized, no change to activation. --
VAL INT16 SW.SHOW.NORMAL       IS 1 (INT16): -- Restored and active. --
VAL INT16 SW.SHOW.NA           IS 4 (INT16): -- Current state, no activation. --

-- These codes are not part of the Window ShowWindow finction and are --
-- interpreted by SP_SHOW_WINDOW. SP_SHOW_WINDOW assumes that all     --
-- display codes without bit 15 set are standard windows codes.       --
VAL INT16 SW.SET.FOCUS           IS -1 (INT16): -- Give window the focus. --
VAL INT16 SW.RESTORE.NO.ACTIVATE IS -2 (INT16): -- Restores window but no focus. --
VAL INT16 SW.BRING.TO.TOP        IS -3 (INT16): -- Put window on top of all others. --

  SPR return codes
-- These are the error codes returned from WISERVER for almost every control --
-- tag. Nearly every procedure returns a WISERVER result which will be one   --
-- of these.                                                                 --

VAL BYTE SPR.OK                IS 0 (BYTE): -- Operation Ok. --
VAL BYTE SPR.NOT.IMPLEMENTED   IS 1 (BYTE): -- Operation not implemented. --
VAL BYTE SPR.BAD.NAME          IS 2 (BYTE):
VAL BYTE SPR.BAD.TYPE          IS 3 (BYTE): -- Bad file type with SP.OPEN. --
VAL BYTE SPR.BAD.MODE          IS 4 (BYTE): -- Bad file mode with SP.OPEN. --
VAL BYTE SPR.INVALID.STREAM.ID IS 5 (BYTE): -- Bad stream ID with file or text window. --
VAL BYTE SPR.BAD.STREAM.USE    IS 6 (BYTE):
VAL BYTE SPR.BUFFER.OVERFLOW   IS 7 (BYTE):
VAL BYTE SPR.BAD.PACKET.SIZE   IS 8 (BYTE):
VAL BYTE SPR.BAD.ORIGIN        IS 9 (BYTE): -- Bad origin with SP.SEEK. --

VAL BYTE SPR.NOTOK             IS 127 (BYTE):
VAL BYTE SPR.OPERATION.FAILED  IS 128 (BYTE):
VAL BYTE SPR.ERROR             IS 129 (BYTE): -- Generic error. --
VAL BYTE SPR.CANCEL            IS 130 (BYTE):

  Open Text window constants
-- These codes are for use with SP.OPEN.TEXT.WINDOW or PROC open.text.window. --
-- The values should be ORed with each other and placed in the window style   --
-- field.                                                                     --

VAL INT MIN.BOX.TEXT.WIN.STYLE        IS #0001: -- Include the minimize box. --
VAL INT CARET.TEXT.WIN.STYLE          IS #0002: -- Include the caret (cursor). --
VAL INT CENTRAL.TEXT.WIN.STYLE        IS #0004: -- Create the window in the centre of the desktop. --
VAL INT NO.TITLE.TEXT.WIN.STYLE       IS #0008: -- Hide the title bar. --
VAL INT HIDDEN.TEXT.WIN.STYLE         IS #0010: -- Do not display straight away. --
VAL INT NO.ACTIVATE.TEXT.WIN.STYLE    IS #0020: -- Do not change focus on create. --
VAL INT ANSI.CODES.TEXT.WIN.STYLE     IS #0040: -- Window will interpret ANSI screen codes. --
VAL INT WISERVER.CODES.TEXT.WIN.STYLE IS #0000: -- Window will interpret WISERVER screen codes. --

-- These constants are used for complex placing of the text window on creation. --
VAL INT WIN.POS.LEFT.TEXT.WIN.STYLE        IS #0000:
VAL INT WIN.POS.RIGHT.TEXT.WIN.STYLE       IS #0100:
VAL INT WIN.POS.X.CENTRE.TEXT.WIN.STYLE    IS #0200:
VAL INT SCREEN.POS.LEFT.TEXT.WIN.STYLE     IS #0000:
VAL INT SCREEN.POS.RIGHT.TEXT.WIN.STYLE    IS #0400:
VAL INT SCREEN.POS.X.CENTRE.TEXT.WIN.STYLE IS #0800:
VAL INT WIN.POS.TOP.TEXT.WIN.STYLE         IS #0000:
VAL INT WIN.POS.BOTTOM.TEXT.WIN.STYLE      IS #1000:
VAL INT WIN.POS.Y.CENTRE.TEXT.WIN.STYLE    IS #2000:
VAL INT SCREEN.POS.TOP.TEXT.WIN.STYLE      IS #0000:
VAL INT SCREEN.POS.BOTTOM.TEXT.WIN.STYLE   IS #4000:
VAL INT SCREEN.POS.Y.CENTRE.TEXT.WIN.STYLE IS #8000:

  SPS. exit constants
-- These codes are for use with SP.EXIT or PROC exit.server. --

VAL INT32 SPS.SUCCESS IS  999999999 (INT32): -- Program was a success. --
VAL INT32 SPS.FAILURE IS -999999999 (INT32): -- Program failed. --

  SPID. Default window stream ids
-- These are the stream ids for the default window. The default window   --
-- should not normally be used. The standard streams represent the       --
-- standard inputs and outputs in Unix systems, 'standard input (stdin), --
-- standard output (stdout) and standard error (stderr).                 --

VAL INT32 SPID.STDIN  IS 0 (INT32): -- Standard input. --
VAL INT32 SPID.STDOUT IS 1 (INT32): -- Standard output. --
VAL INT32 SPID.STDERR IS 2 (INT32): -- Standard error. --

  DLL constants
VAL INT DLL.DATA.SIZE IS 7: -- Bytes used to store loaded dll info. --

  KEY. Event masks
-- These codes are for use with SP.GET.EVENT and PROC get.event.             --
-- The values represent bits in a data field given for every event in a text --
-- window. If the corresponding bit is set then the condition is TRUE.       --

VAL INT16 KEY.SHIFT.PRESSED   IS #01 (INT16): -- Bit 0 set means Shift was pressed during event. --
VAL INT16 KEY.CONTROL.PRESSED IS #02 (INT16): -- Bit 1 set means Control was pressed during event. --
VAL INT16 KEY.ALT.PRESSED     IS #04 (INT16): -- Bit 2 set means Alt was pressed during event. --
VAL INT16 KEY.AUTO.REPEAT     IS #08 (INT16): -- Bit 3 set means event was generated due to key auto repeat. --
VAL INT16 KEY.IS.ANSI         IS #10 (INT16): -- Bit 4 set means key pressed has ANSI value. (See the relevant field. ) --
VAL INT16 KEY.IS.DOS.EXTENDED IS #20 (INT16): -- Bit 5 set means key is eqiv. to an extended DOS key which is preceded by a zero byte. --

  Timings
VAL INT POLL.PERIOD IS 1500: -- This is the suggested poll period for    --
                             -- the procedures                           --
                             -- PROC wait.event                          --
                             -- PROC wait.key                            --
                             -- PROC wait.any.event.                     --
                             -- The value should be multiplied by 64 if  --
                             -- the procs are executed in high priority. --

  ITERM. codes
-- These are control bytes for performing text operations in WIServer text --
-- windows. They replace the DOS BANSI codes of IServer.                   --

VAL BYTE ITERM.GOTO.CODE       IS  1 (BYTE): -- Goto X, Y. Places cursor at x, y. See PROC goto.xy. --
VAL BYTE ITERM.CLR.SCREEN.CODE IS  2 (BYTE): -- Clear screen, Place cursor at top left. --
VAL BYTE ITERM.CLR.EOS.CODE    IS  3 (BYTE): -- Clear screen from cursor to end of screen. --
VAL BYTE ITERM.CLR.EOL.CODE    IS  4 (BYTE): -- Clear from cursor to end of line. --
VAL BYTE ITERM.INS.LINE.CODE   IS  5 (BYTE): -- Insert a blank line at cursor (and scroll screen down). --
VAL BYTE ITERM.DEL.LINE.CODE   IS  6 (BYTE): -- Delete the line at cursor (and scroll screen up). --
VAL BYTE ITERM.BEEP.CODE       IS  7 (BYTE): -- Produce a bleep. --
VAL BYTE ITERM.INS.CHAR.CODE   IS  8 (BYTE): -- Insert a character at cursor. --
VAL BYTE ITERM.DEL.CHAR.CODE   IS  9 (BYTE): -- Delete the character at the cursor. --
VAL BYTE ITERM.DOWN.CODE       IS 10 (BYTE): -- Move cursor down. --
VAL BYTE ITERM.UP.CODE         IS 11 (BYTE): -- Move cursor up. --
VAL BYTE ITERM.LEFT.CODE       IS 12 (BYTE): -- Move cursor left. --
VAL BYTE ITERM.RIGHT.CODE      IS 14 (BYTE): -- Move cursor right. --
VAL BYTE ITERM.SHOW.CARET.CODE IS 15 (BYTE): -- Displays the caret. --
VAL BYTE ITERM.HIDE.CARET.CODE IS 16 (BYTE): -- Hides the caret. --

-- Byte 13 is used as Carriage Return. --

   VK. virtual key codes
-- These are the Virtual Key codes returned by windows for events. --
-- VK_A to VK_Z and VK_0 to VK_9 are the same as value as the ASCII values --
  Number pad

VAL INT16 VK.MULTIPLY         IS 106 (INT16): -- Num Pad. --
VAL INT16 VK.ADD              IS 107 (INT16): -- Num Pad. --
VAL INT16 VK.SUBTRACT         IS 109 (INT16): -- Num Pad. --
VAL INT16 VK.DECIMAL          IS 110 (INT16): -- Num Pad. --
VAL INT16 VK.DIVIDE           IS 111 (INT16): -- Num Pad. --
VAL INT16 VK.NUMLOCK          IS 144 (INT16): -- Num Pad. --

VAL INT16 VK.NUMPAD0          IS 96  (INT16): -- Num Pad 0. -- 
VAL INT16 VK.NUMPAD1          IS 97  (INT16): -- Num Pad 1. -- 
VAL INT16 VK.NUMPAD2          IS 98  (INT16): -- Num Pad 2. -- 
VAL INT16 VK.NUMPAD3          IS 99  (INT16): -- Num Pad 3. -- 
VAL INT16 VK.NUMPAD4          IS 100 (INT16): -- Num Pad 4. -- 
VAL INT16 VK.NUMPAD5          IS 101 (INT16): -- Num Pad 5. -- 
VAL INT16 VK.NUMPAD6          IS 102 (INT16): -- Num Pad 6. -- 
VAL INT16 VK.NUMPAD7          IS 103 (INT16): -- Num Pad 7. -- 
VAL INT16 VK.NUMPAD8          IS 104 (INT16): -- Num Pad 8. -- 
VAL INT16 VK.NUMPAD9          IS 105 (INT16): -- Num Pad 9. -- 

  Function keys
VAL INT16 VK.F1               IS 112 (INT16): -- 
VAL INT16 VK.F2               IS 113 (INT16): -- 
VAL INT16 VK.F3               IS 114 (INT16): -- 
VAL INT16 VK.F4               IS 115 (INT16): -- 
VAL INT16 VK.F5               IS 116 (INT16): -- 
VAL INT16 VK.F6               IS 117 (INT16): -- 
VAL INT16 VK.F7               IS 118 (INT16): -- 
VAL INT16 VK.F8               IS 119 (INT16): -- 
VAL INT16 VK.F9               IS 120 (INT16): -- 
VAL INT16 VK.F10              IS 121 (INT16): -- 
VAL INT16 VK.F11              IS 122 (INT16): -- 
VAL INT16 VK.F12              IS 123 (INT16): -- 
VAL INT16 VK.F13              IS 124 (INT16): -- 
VAL INT16 VK.F14              IS 125 (INT16): -- 
VAL INT16 VK.F15              IS 126 (INT16): -- 
VAL INT16 VK.F16              IS 127 (INT16): -- 

VAL INT16 VK.LBUTTON          IS 1   (INT16): -- Left mouse button. --
VAL INT16 VK.RBUTTON          IS 2   (INT16): -- Right mouse button. --
VAL INT16 VK.MBUTTON          IS 4   (INT16): -- Middle mouse button. --
VAL INT16 VK.INSERT           IS 45  (INT16): -- 
VAL INT16 VK.DELETE           IS 46  (INT16): -- 
VAL INT16 VK.LEFT             IS 37  (INT16): -- 
VAL INT16 VK.RIGHT            IS 39  (INT16): -- 
VAL INT16 VK.UP               IS 38  (INT16): -- 
VAL INT16 VK.DOWN             IS 40  (INT16): -- 
VAL INT16 VK.ESCAPE           IS 27  (INT16): -- 
VAL INT16 VK.SPACE            IS 32  (INT16): -- 
VAL INT16 VK.PRIOR            IS 33  (INT16): -- Page up. --
VAL INT16 VK.NEXT             IS 34  (INT16): -- Page down. --
VAL INT16 VK.END              IS 35  (INT16): -- 
VAL INT16 VK.HOME             IS 36  (INT16): -- 
VAL INT16 VK.SHIFT            IS 16  (INT16): -- 
VAL INT16 VK.CONTROL          IS 17  (INT16): -- 
VAL INT16 VK.CANCEL           IS 3   (INT16): -- For control-break processing. --
VAL INT16 VK.BACK             IS 8   (INT16): -- Backspace. --
VAL INT16 VK.TAB              IS 9   (INT16): -- 
VAL INT16 VK.CLEAR            IS 12  (INT16): -- 
VAL INT16 VK.RETURN           IS 13  (INT16): -- 
VAL INT16 VK.MENU             IS 18  (INT16): -- Alt key. --
VAL INT16 VK.PAUSE            IS 19  (INT16): -- 
VAL INT16 VK.CAPITAL          IS 20  (INT16): -- Caps Lock. --
VAL INT16 VK.SELECT           IS 41  (INT16): -- 
VAL INT16 VK.PRINT            IS 42  (INT16): -- OEM Specific. --
VAL INT16 VK.EXECUTE          IS 43  (INT16): -- 
VAL INT16 VK.SNAPSHOT         IS 44  (INT16): -- 
VAL INT16 VK.HELP             IS 47  (INT16): -- 
VAL INT16 VK.SEPARATOR        IS 108 (INT16): -- 


   WIServer occam I/O library procedure headings
Version 2.03	3/9/93
For TDS3 	'wiserver'
For Occam toolset	'wiserver.lib'

  Packet preparation PROCs
PROC push.bool ([]BYTE buffer, INT pos, VAL BOOL value)
PROC push.byte ([]BYTE buffer, INT pos, VAL BYTE value)
PROC push.int16 ([]BYTE buffer, INT pos, VAL INT16 value)
PROC push.int32 ([]BYTE buffer, INT pos, VAL INT32 value)
PROC push.string ([]BYTE buffer, INT pos, VAL []BYTE value)
PROC push.small.string ([]BYTE buffer, INT pos, VAL []BYTE value)
PROC push.null.string ([]BYTE buffer, INT pos)
PROC push.null.small.string ([]BYTE buffer, INT pos)
PROC pop.bool ([]BYTE buffer, INT pos, BOOL value)
PROC pop.byte ([]BYTE buffer, INT pos, BYTE value)
PROC pop.int16 ([]BYTE buffer, INT pos, INT16 value)
PROC pop.int32 ([]BYTE buffer, INT pos, INT32 value)
PROC pop.string ([]BYTE buffer, INT pos, []BYTE value, INT value.len)
PROC pop.small.string ([]BYTE buffer, INT pos, []BYTE value, INT value.len)
PROC adjust.packet ([]BYTE buffer, INT pos)
  Basic output for text windows or files
PROC write.small.string (CHAN OF SP from.isv, to.isv,
                         VAL INT32  stream.id,
                         BYTE       isv.result,
                         VAL []BYTE string)
PROC write.char (CHAN OF SP from.isv, to.isv,
                 VAL INT32  stream.id,
                 BYTE       isv.result,
                 VAL BYTE   char,
                 VAL INT    number.of.times)
PROC write.string (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL []BYTE string)
PROC write.nl (CHAN OF SP from.isv, to.isv,
               VAL INT32  stream.id,
               BYTE       isv.result)
PROC write.string.nl (CHAN OF SP from.isv, to.isv,
                      VAL INT32  stream.id,
                      BYTE       isv.result,
                      VAL []BYTE string)
PROC write.bstring (CHAN OF SP from.isv, to.isv,
                    VAL INT32  stream.id,
                    BYTE       isv.result,
                    VAL []BYTE bstring)
PROC write.bstring.nl (CHAN OF SP from.isv, to.isv,
                       VAL INT32  stream.id,
                       BYTE       isv.result,
                       VAL []BYTE bstring)
PROC write.bool (CHAN OF SP from.isv, to.isv,
                 VAL INT32  stream.id,
                 BYTE       isv.result,
                 VAL BOOL   bool.value)
PROC write.int (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                BYTE       isv.result,
                VAL INT    int.value, field)
PROC write.int64 (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result,
                  VAL INT64  int.value,
                  VAL INT    field)
PROC write.hex.byte (CHAN OF SP from.isv, to.isv,
                     VAL INT32  stream.id,
                     BYTE       isv.result,
                     VAL BYTE   int.value)
PROC write.hex.int16 (CHAN OF SP from.isv, to.isv,
                      VAL INT32  stream.id,
                      BYTE       isv.result,
                      VAL INT16  int.value)
PROC write.hex.int32 (CHAN OF SP from.isv, to.isv,
                      VAL INT32  stream.id,
                      BYTE       isv.result,
                      VAL INT32  int.value)
PROC write.hex.int64 (CHAN OF SP from.isv, to.isv,
                      VAL INT32  stream.id,
                      BYTE       isv.result,
                      VAL INT64  int.value)
PROC write.real32 (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL REAL32 real.value,
                   VAL INT    Ip, Id)
PROC write.real64 (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL REAL64 real.value,
                   VAL INT    Ip, Id)
PROC get.tab (CHAN OF SP from.isv, to.isv,
              VAL INT32  stream.id,
              BYTE       isv.result,
              INT        tab.position)
PROC write.tab.char (CHAN OF SP from.isv, to.isv,
                     VAL INT32  stream.id,
                     BYTE       isv.result,
                     VAL INT    desired.tab.position,
                     VAL BYTE   tab.character)
PROC write.tab (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                BYTE       isv.result,
                VAL INT    desired.tab.position)
  Basic output for text windows
PROC goto.xy (CHAN OF SP from.isv, to.isv,
              VAL INT32  stream.id,
              BYTE       isv.result,
              VAL INT    x, y)
PROC cursor.up (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                BYTE       isv.result)
PROC cursor.down (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
PROC cursor.left (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
PROC cursor.right (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result)
PROC insert.line (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
PROC delete.line (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
PROC insert.char (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result,
                  VAL BYTE   char)
PROC delete.char (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
PROC beep (CHAN OF SP from.isv, to.isv,
           VAL INT32  stream.id,
           BYTE       isv.result)
PROC clear.window (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result)
PROC clear.to.end.of.line (CHAN OF SP from.isv, to.isv,
                           VAL INT32  stream.id,
                           BYTE       isv.result)
PROC clear.to.end.of.screen (CHAN OF SP from.isv, to.isv,
                             VAL INT32  stream.id,
                             BYTE       isv.result)
  Interactive text input
PROC get.event (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                INT        items.left.in.buffer,
                INT16      virtual.key.code, system.key.flags,
                BYTE       ascii.key.code,
                [2]INT     pointer.pos,
                INT32      system.tick.value,
                BYTE       isv.result)
PROC wait.event (CHAN OF SP from.isv, to.isv,
                 VAL INT32  stream.id,
                 INT16      virtual.key.code, system.key.flags,
                 BYTE       ascii.key.code,
                 [2]INT     pointer.pos,
                 INT32      system.tick.value,
                 VAL INT    poll.period,
                 BYTE       isv.result)
PROC flush.input.buffer (CHAN OF SP from.isv, to.isv,
                         VAL INT32  stream.id,
                         BYTE       isv.result)
PROC wait.any.event (CHAN OF SP from.isv, to.isv,
                     VAL INT32  stream.id,
                     BYTE       isv.result)
PROC get.key (CHAN OF SP from.isv, to.isv,
              VAL INT32  stream.id,
              INT        items.left.in.buffer,
              BYTE       ascii.key.code,
              BYTE       isv.result)
PROC wait.key (CHAN OF SP from.isv, to.isv,
               VAL INT32  stream.id,
               BYTE       ascii.key.code,
               VAL INT    poll.period,
               BYTE       isv.result)
PROC get.option (CHAN OF SP from.isv, to.isv,
                 VAL INT32  stream.id,
                 VAL []BYTE option.keys,
                 INT        option,
                 VAL INT    poll.period,
                 VAL BOOL   escape.ok,
                 VAL BOOL   uppercase.only,
                 BYTE       isv.result)
PROC enter.ansi.string.with.escape (CHAN OF SP from.isv, to.isv,
                                    VAL INT32  stream.id,
                                    BYTE       isv.result,
                                    VAL INT    poll.period,
                                    INT        cur.pos, len,
                                    []BYTE     string,
                                    [2]INT     pointer.pos,
                                    VAL BOOL   convert.to.upper,
                                    INT16      virt.key.code)
PROC enter.ansi.string (CHAN OF SP from.isv, to.isv,
                        VAL INT32  stream.id,
                        BYTE       isv.result,
                        VAL INT    poll.period,
                        INT        len,
                        []BYTE     string,
                        VAL BOOL   escape.ok,
                        VAL BOOL   convert.to.upper)
PROC enter.real32 (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL BOOL   default,
                              caret,
                              escape.ok,
                   BOOL       error,
                   REAL32     value,
                   VAL INT    Ip, Id)
PROC enter.real64 (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL BOOL   default,
                              caret,
                              escape.ok,
                   BOOL       error,
                   REAL64     value,
                   VAL INT    Ip, Id)
PROC enter.int (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                BYTE       isv.result,
                VAL BOOL   default,
                           caret,
                           escape.ok,
                           hex,
                BOOL       error,
                INT        value,
                VAL INT    field)
  File operations
PROC open.file (CHAN OF SP from.isv, to.isv,
                INT32      stream.id,
                VAL []BYTE filename,
                VAL BYTE   file.type, file.mode,
                BYTE       isv.result)
PROC close.stream (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result)
PROC flush.stream (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result)
PROC end.of.file (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       file.result, isv.result)
PROC remove.file (CHAN OF SP from.isv, to.isv,
                  VAL []BYTE filename,
                  BYTE       isv.result)
PROC read.binary (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  []BYTE     data,
                  INT        bytes.read,
                  BYTE       isv.result)
PROC read.text.line (CHAN OF SP from.isv, to.isv,
                     VAL INT32  stream.id,
                     []BYTE     line,
                     INT        line.length,
                     BYTE       isv.result)
  General server utilities
PROC exit.server (CHAN OF SP from.isv, to.isv, VAL INT32 exit.code)
PROC get.free.resources (CHAN OF SP from.isv, to.isv,
                         INT        max.packet.size.to.server,
                                    max.packet.size.from.server,
                                    no.of.free.file.handles,
                                    no.of.free.text.windows,
                         BYTE       isv.result)
  Get information procedures
PROC get.system.information (CHAN OF SP from.isv, to.isv,
                             VAL INT16  system.info.id,
                             INT16      system.info.result,
                             BYTE       isv.result)
PROC get.system.metric (CHAN OF SP from.isv, to.isv,
                        VAL INT16  system.metric.id,
                        INT16      system.metric.result,
                        BYTE       isv.result)
PROC get.application.information (CHAN OF SP from.isv, to.isv,
                                  INT32      main.window.pointer,
                                  INT16      main.window.handle,
                                  INT16      server.task.identifier,
                                  BYTE       isv.result)
PROC get.window.handle (CHAN OF SP from.isv, to.isv,
                        VAL INT32  stream.id,
                        INT16      window.handle,
                        BYTE       isv.result)
PROC get.window.text (CHAN OF SP from.isv, to.isv,
                      VAL INT16  window.handle,
                      []BYTE     window.text,
                      INT        window.text.length,
                      BYTE       isv.result)
PROC get.window.state (CHAN OF SP from.isv, to.isv,
                       VAL INT16  window.handle,
                       BYTE       icon.state, maximized.state, visible.state,
                       INT16      parent.window.handle,
                       [4]INT     bounding.rectangle, client.rectangle,
                       BYTE       isv.result)
PROC get.cursor.pos (CHAN OF SP from.isv, to.isv, INT x, y, BYTE isv.result)
  Manipulate window procedures
PROC open.text.window (CHAN OF SP from.isv, to.isv,
                       VAL []BYTE title,
                       VAL INT    x.pos, y.pos, width, height,
                                  char.width, char.height,
                                  window.style, refresh.rate, input.buffer.size,
                       INT32      stream.id,
                       BYTE       isv.result,
                       [4]INT16   window.rect)
PROC set.window.text (CHAN OF SP from.isv, to.isv,
                      VAL INT16  window.handle,
                      VAL []BYTE window.text,
                      BYTE       isv.result)
PROC show.window (CHAN OF SP from.isv, to.isv,
                  VAL INT16  window.handle,
                             display.command,
                  BYTE       isv.result)
  DLL procedures
PROC load.dll (CHAN OF SP          from.isv, to.isv,
               VAL []BYTE          dll.filename,
               [DLL.DATA.SIZE]BYTE dll.data,
               BYTE                isv.result)
PROC unload.dll (CHAN OF SP          from.isv, to.isv,
                 [DLL.DATA.SIZE]BYTE dll.data,
                 BYTE                isv.result)
PROC exec.dll (CHAN OF SP              from.isv, to.isv,
               VAL [DLL.DATA.SIZE]BYTE dll.data,
               VAL []BYTE              params,
               []BYTE                  data,
               INT                     data.len,
               BYTE                    isv.result)
  Module procedures
PROC win.exec (CHAN OF SP  from.isv, to.isv,
               BYTE        isv.result,
               VAL []BYTE  cmd.line,
               VAL INT16   show.cmd,
               INT16       module.handle)
PROC get.module.usage (CHAN OF SP from.isv, to.isv,
                       BYTE       isv.result,
                       VAL INT16  module.handle,
                       INT        usage)
  General utilities
PROC sp.multiplex (CHAN OF SP   from.isv, to.isv,
                   []CHAN OF SP from.n.isv, to.n.isv,
                   CHAN OF BOOL terminate, terminated)
PROC option.list (CHAN OF SP from.isv, to.isv,
                  VAL []BYTE window.title,
                             option.list,
                  VAL INT    x, y,
                  VAL BOOL   cancel.ok,
                  INT        option,
                  BYTE       isv.result)
PROC message.box (CHAN OF SP from.isv, to.isv,
                  VAL []BYTE window.title,
                             message,
                             options,
                  VAL BOOL   default.ok,
                             cancel.ok,
                  INT        option,
                  BYTE       isv.result)
PROC cancel.cancel (BYTE isv.result)
   WIServer occam I/O library procedure headings with documentation
Version 2.03	3/9/93
For TDS3 	'wiserver'
For Occam toolset	'wiserver.lib'

  PROC push.bool
PROC push.bool ([]BYTE buffer, INT pos, VAL BOOL value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array that gets appended by 'value'. 'pos' is used as a
  pointer to the end of the data.
  
    Bi        INT pos
  This is the pointer to the end of the data in 'buffer'. It points to
  the first element beyond the data and thus the position where 'value' is
  placed.
  On exit, it is incremented by the number of bytes taken up by 'value' and
  thus still points to the first non data element in 'buffer'.
  
    In        VAL BOOL value
  This holds the value to be appended to the data in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure appends a BOOL value to the data stored in 'buffer'. The
  parameter 'pos' points to the first element in 'buffer' after the data.
  The []BYTE representation of 'value' is put at 'pos' and 'pos' is incremented
  by the number of bytes taken up by 'value'. If there is not enough room in
  'buffer' for 'value' then the procedure will STOP with an error condition.
  PROC push.byte
PROC push.byte ([]BYTE buffer, INT pos, VAL BYTE value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array that gets appended by 'value'. 'pos' is used as a
  pointer to the end of the data.
  
    Bi        INT pos
  This is the pointer to the end of the data in 'buffer'. It points to
  the first element beyond the data and thus the position where 'value' is
  placed.
  On exit, it is incremented by the number of bytes taken up by 'value' and
  thus still points to the first non data element in 'buffer'.
  
    In        VAL BYTE value
  This holds the value to be appended to the data in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure appends a BYTE value to the data stored in 'buffer'. The
  parameter 'pos' points to the first element in 'buffer' after the data.
  The []BYTE representation of 'value' is put at 'pos' and 'pos' is incremented
  by the number of bytes taken up by 'value'. If there is not enough room in
  'buffer' for 'value' then the procedure will STOP with an error condition.
  
  
  PROC push.int16
PROC push.int16 ([]BYTE buffer, INT pos, VAL INT16 value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array that gets appended by 'value'. 'pos' is used as a
  pointer to the end of the data.
  
    Bi        INT pos
  This is the pointer to the end of the data in 'buffer'. It points to
  the first element beyond the data and thus the position where 'value' is
  placed.
  On exit, it is incremented by the number of bytes taken up by 'value' and
  thus still points to the first non data element in 'buffer'.
  
    In        VAL INT16 value
  This holds the value to be appended to the data in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure appends a INT16 value to the data stored in 'buffer'. The
  parameter 'pos' points to the first element in 'buffer' after the data.
  The []BYTE representation of 'value' is put at 'pos' and 'pos' is incremented
  by the number of bytes taken up by 'value'. If there is not enough room in
  'buffer' for 'value' then the procedure will STOP with an error condition.
  
  
  PROC push.int32
PROC push.int32 ([]BYTE buffer, INT pos, VAL INT32 value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array that gets appended by 'value'. 'pos' is used as a
  pointer to the end of the data.
  
    Bi        INT pos
  This is the pointer to the end of the data in 'buffer'. It points to
  the first element beyond the data and thus the position where 'value' is
  placed.
  On exit, it is incremented by the number of bytes taken up by 'value' and
  thus still points to the first non data element in 'buffer'.
  
    In        VAL INT32 value
  This holds the value to be appended to the data in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure appends a INT32 value to the data stored in 'buffer'. The
  parameter 'pos' points to the first element in 'buffer' after the data.
  The []BYTE representation of 'value' is put at 'pos' and 'pos' is incremented
  by the number of bytes taken up by 'value'. If there is not enough room in
  'buffer' for 'value' then the procedure will STOP with an error condition.
  
  
  PROC push.string
PROC push.string ([]BYTE buffer, INT pos, VAL []BYTE value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array that gets appended by 'value'. 'pos' is used as a
  pointer to the end of the data.
  
    Bi        INT pos
  This is the pointer to the end of the data in 'buffer'. It points to
  the first element beyond the data and thus the position where 'value' is
  placed.
  On exit, it is incremented by the number of bytes taken up by 'value' and
  thus still points to the first non data element in 'buffer'.
  
    In        VAL []BYTE value
  This holds the value to be appended to the data in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.int16           Pushes the length of the string.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure appends a []BYTE array to the data stored in 'buffer'. The
  parameter 'pos' points to the first element in 'buffer' after the data.
  The []BYTE representation of 'value' is put at 'pos' and 'pos' is incremented
  by the number of bytes taken up by 'value'. If there is not enough room in
  'buffer' for 'value' then the procedure will STOP with an error condition.
  
  Strings in IServer and WIServer are preceded by an INT16 value giving the
  length of the string following. The servers use an INT16 value to give the
  length since their packet sizes may exceed 256 bytes.
  
  PROC push.small.string
PROC push.small.string ([]BYTE buffer, INT pos, VAL []BYTE value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array that gets appended by 'value'. 'pos' is used as a
  pointer to the end of the data.
  
    Bi        INT pos
  This is the pointer to the end of the data in 'buffer'. It points to
  the first element beyond the data and thus the position where 'value' is
  placed.
  On exit, it is incremented by the number of bytes taken up by 'value' and
  thus still points to the first non data element in 'buffer'.
  
    In        VAL []BYTE value
  This holds the value to be appended to the data in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.byte            Pushes the length of the string.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure appends a []BYTE array to the data stored in 'buffer'. The
  parameter 'pos' points to the first element in 'buffer' after the data.
  The []BYTE representation of 'value' is put at 'pos' and 'pos' is incremented
  by the number of bytes taken up by 'value'. If there is not enough room in
  'buffer' for 'value' then the procedure will STOP with an error condition.
  
  This strings is preceded by a BYTE value giving the length of the string
  following. If the length of value is greater then 255 then the procedure
  will STOP with an error condition.
  
  PROC push.null.string
PROC push.null.string ([]BYTE buffer, INT pos)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array that gets appended by an empty string. 'pos' is used as
  a pointer to the end of the data.
  
    Bi        INT pos
  This is the pointer to the end of the data in 'buffer'. It points to
  the first element beyond the data and thus the position where the empty
  string is placed.
  On exit, it is incremented by the number of bytes taken up by the empty
  string and thus still points to the first non data element in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.int16           Pushes the zero length of the null string.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure appends an empty string to the data stored in 'buffer'. The
  parameter 'pos' points to the first element in 'buffer' after the data.
  The length data for the string (zero) is put at 'pos' and 'pos' is incremented
  by the number of bytes taken up by the length. If there is not enough room in
  'buffer' for the length then the procedure will STOP with an error condition.
  
  
  PROC push.null.small.string
PROC push.null.small.string ([]BYTE buffer, INT pos)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array that gets appended by an empty string. 'pos' is used as
  a pointer to the end of the data.
  
    Bi        INT pos
  This is the pointer to the end of the data in 'buffer'. It points to
  the first element beyond the data and thus the position where the empty
  string is placed.
  On exit, it is incremented by the number of bytes taken up by the empty
  string and thus still points to the first non data element in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.byte            Pushes the zero length of the null string.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure appends an empty string to the data stored in 'buffer'. The
  parameter 'pos' points to the first element in 'buffer' after the data.
  The length data for the string (zero) is put at 'pos' and 'pos' is incremented
  by the number of bytes taken up by the length. If there is not enough room in
  'buffer' for the length then the procedure will STOP with an error condition.
  
  
  PROC pop.bool
PROC pop.bool ([]BYTE buffer, INT pos, BOOL value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        []BYTE buffer
  This is the data array holding the BOOL value to be put into 'value'.
  
    Bi        INT pos
  This is the pointer to the BOOL value in 'buffer'.
  
  On exit, it is incremented by the number of bytes taken up by the BOOL and
  thus still points to the next data element in 'buffer'.
  
    Out       VAL BOOL value
  This parameter is set to the BOOL value in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure reads a BOOL value from the parameter 'buffer' at the
  location pointed to by 'pos'. 'pos' is then incremented by the number
  of bytes taken up by the value so that it points to the next data element.
  
  
  PROC pop.byte
PROC pop.byte ([]BYTE buffer, INT pos, BYTE value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        []BYTE buffer
  This is the data array holding the BYTE value to be put into 'value'.
  
    Bi        INT pos
  This is the pointer to the BYTE value in 'buffer'.
  
  On exit, it is incremented by the number of bytes taken up by the BYTE and
  thus still points to the next data element in 'buffer'.
  
    Out       VAL BYTE value
  This parameter is set to the BYTE value in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure reads a BYTE value from the parameter 'buffer' at the
  location pointed to by 'pos'. 'pos' is then incremented by the number
  of bytes taken up by the value so that it points to the next data element.
  
  
  PROC pop.int16
PROC pop.int16 ([]BYTE buffer, INT pos, INT16 value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        []BYTE buffer
  This is the data array holding the INT16 value to be put into 'value'.
  
    Bi        INT pos
  This is the pointer to the INT16 value in 'buffer'.
  
  On exit, it is incremented by the number of bytes taken up by the INT16 and
  thus still points to the next data element in 'buffer'.
  
    Out       VAL INT16 value
  This parameter is set to the INT16 value in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure reads a INT16 value from the parameter 'buffer' at the
  location pointed to by 'pos'. 'pos' is then incremented by the number
  of bytes taken up by the value so that it points to the next data element.
  
  
  PROC pop.int32
PROC pop.int32 ([]BYTE buffer, INT pos, INT32 value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        []BYTE buffer
  This is the data array holding the INT32 value to be put into 'value'.
  
    Bi        INT pos
  This is the pointer to the INT32 value in 'buffer'.
  
  On exit, it is incremented by the number of bytes taken up by the INT32 and
  thus still points to the next data element in 'buffer'.
  
    Out       VAL INT32 value
  This parameter is set to the INT32 value in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure reads a INT32 value from the parameter 'buffer' at the
  location pointed to by 'pos'. 'pos' is then incremented by the number
  of bytes taken up by the value so that it points to the next data element.
  
  
  PROC pop.string
PROC pop.string ([]BYTE buffer, INT pos, []BYTE value, INT value.len)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        []BYTE buffer
  This is the data array holding the string value to be put into 'value'.
  
    Bi        INT pos
  This is the pointer to the string (INT16::[]BYTE) value in 'buffer'.
  
  On exit, it is incremented by the number of bytes taken up by the string and
  thus still points to the next data element in 'buffer'.
  
    Out       VAL []BYTE value
  This parameter is set to the string value in 'buffer'. It must be large
  enough to hold the string. If it is not then the procedure will STOP with an
  error condition.
  
    Out       INT value.len
  This value is set to the length of the string found in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure reads a string value (INT16::[]BYTE) from the parameter 'buffer'
  at the location pointed to by 'pos'. 'pos' is then incremented by the number
  of bytes taken up by the string so that it points to the next data element.
  
  If 'value' is not large enough for the string then the procedure will STOP with
  an error condition.
  
  PROC pop.small.string
PROC pop.small.string ([]BYTE buffer, INT pos, []BYTE value, INT value.len)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        []BYTE buffer
  This is the data array holding the small string value to be put into 'value'.
  
    Bi        INT pos
  This is the pointer to the small string (BYTE::[]BYTE) value in 'buffer'.
  
  On exit, it is incremented by the number of bytes taken up by the small string
  and thus still points to the next data element in 'buffer'.
  
    Out       VAL []BYTE value
  This parameter is set to the small string value in 'buffer'. It must be large
  enough to hold the string. If it is not then the procedure will STOP with an
  error condition.
  
    Out       INT value.len
  This value is set to the length of the small string found in 'buffer'.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC pop.byte             Gets the length of the small string.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure reads a small string value (BYTE::[]BYTE) from the parameter
  'buffer' at the location pointed to by 'pos'. 'pos' is then incremented by the
  number of bytes taken up by the string so that it points to the next data
  element.
  
  If 'value' is not large enough for the string then the procedure will STOP with
  an error condition.
  
  PROC adjust.packet
PROC adjust.packet ([]BYTE buffer, INT pos)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        []BYTE buffer
  This is the data array holding the data to be adjusted.
  
    Bi        INT pos
  This is the pointer to end of the data in 'buffer'. The pointer is adjusted
  so that it conforms to IServer SP protocol rules.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure adjusts the byte array 'buffer' so that it conforms to the
  IServer SP protocol. This dictates that all data packets sent to and from the
  server must be at least 8 bytes in length and that the data must be an even
  number of bytes.
  
  The eight bytes figure means that the data portion of the packet must be at
  least six bytes long since the size information in server packets takes up
  two bytes (INT16).
  
  Note: This procedure will not complain if 'pos' is set to a value greater than
        the length of 'buffer'.
  
  
  PROC write.small.string
PROC write.small.string (CHAN OF SP from.isv, to.isv,
                         VAL INT32  stream.id,
                         BYTE       isv.result,
                         VAL []BYTE string)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT  MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SPR.ERROR
  VAL BYTE SP.WRITE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL []BYTE string
  Character array to be sent to file or text window.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for sending strings to WIServer for writing to files or
  text windows. The size of 'string' must be at least ten bytes smaller than the
  packet size.
  
  An error result will occur if
  1. The server returns an error value.
  2. The server does not write all of 'string' to the file or text window.
  
  A fatal error will occur if
  1. 'string' is too large to be sent in one packet.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.char
PROC write.char (CHAN OF SP from.isv, to.isv,
                 VAL INT32  stream.id,
                 BYTE       isv.result,
                 VAL BYTE   char,
                 VAL INT    number.of.times)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT  MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL BYTE   char
  This is the character sent to steam.id.
  
    In        VAL INT    number.of.times
  This defines the number of characters printed. No action will be taken if this
  number is less than one.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends a character array filled with 'char'.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for printing a certain character a certain number of
  times. The stream may be a file or text window.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.string
PROC write.string (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL []BYTE string)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT  MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.WRITE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL []BYTE string
  Character array to be sent to file or text window.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for sending strings to WIServer for writing to files or
  text windows. There is no limit to the size of 'string'. If 'string' is too
  large for one packet then the procedure will send more than one packet.
  
  An error result will occur if
  1. The server returns an error value.
  2. The server does not write all of 'string' to the file or text window.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.nl
PROC write.nl (CHAN OF SP from.isv, to.isv,
               VAL INT32  stream.id,
               BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.PUTS
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for sending a host dependent newline to a file or text
  window.
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.string.nl
PROC write.string.nl (CHAN OF SP from.isv, to.isv,
                      VAL INT32  stream.id,
                      BYTE       isv.result,
                      VAL []BYTE string)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL []BYTE string
  Character array to be sent to file or text window.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.string
  PROC write.nl
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for sending text lines to WIServer for writing to files
  or text windows. There is no limit to the size of 'string'. If 'string' is too
  large for one packet then the procedure will send more than one packet. At
  the end of 'string' the server will send a host dependent newline character.
  
  An error result will occur if
  1. The server returns an error value.
  2. The server does not write all of 'string' to the file or text window.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.bstring
PROC write.bstring (CHAN OF SP from.isv, to.isv,
                    VAL INT32  stream.id,
                    BYTE       isv.result,
                    VAL []BYTE bstring)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL []BYTE bstring
  Bstring array to be sent to file or text window. A bstring is a character
  array with the first byte defined as the length of the text in the array (as
  per Turbo Pascal strings).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for sending text strings to WIServer for writing to files
  or text windows. 'bstring' is a character array with the first byte defined
  as the length of the text within the array.
  
  An error result will occur if
  1. The server returns an error value.
  2. The server does not write all of 'string' to the file or text window.
  
  A fatal error will occur if
  1. The length byte (element zero) is incorrect and defines a length greater
     then the array size.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.bstring.nl
PROC write.bstring.nl (CHAN OF SP from.isv, to.isv,
                       VAL INT32  stream.id,
                       BYTE       isv.result,
                       VAL []BYTE bstring)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL []BYTE bstring
  Bstring text line to be sent to file or text window. A bstring is a character
  array with the first byte defined as the length of the text in the array (as
  per Turbo Pascal strings).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string
  PROC write.nl
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for sending text lines to WIServer for writing to files
  or text windows. 'bstring' is a character array with the first byte defined
  as the length of the text within the array.
  
  An error result will occur if
  1. The server returns an error value.
  2. The server does not write all of 'string' to the file or text window.
  
  A fatal error will occur if
  1. The length byte (element zero) is incorrect and defines a length greater
     then the array size.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.bool
PROC write.bool (CHAN OF SP from.isv, to.isv,
                 VAL INT32  stream.id,
                 BYTE       isv.result,
                 VAL BOOL   bool.value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL BOOL   value
  Boolean value to be written as text.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used a text representation of a boolean value to a text
  window or text file. A TRUE value has a space to ease the use of the procedure
  when printing tables.
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.int
PROC write.int (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                BYTE       isv.result,
                VAL INT    int.value, field)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    ioconv          Standard TDS3 library
  PROC INTTOSTRING     Used to calculate the text representation of 'int.value'.
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT    int.value
  INT value to be printed as text.
  
    In        VAL INT    field
  Number of characters used for printing the integer.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Writes the text number
  PROC write.char           Writes padding spaces
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to print a text representation of an integer value.
  The value is printed as a decimal integer (with a minus sign if the value is
  negative). If 'field' is larger than the number of digits in the number (plus
  the minus sign if present) then spaces will be inserted before the number to
  pad the text out. If 'field' is smaller than the number of digits then the
  procedure will use as few characters as possible.
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.int64
PROC write.int64 (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result,
                  VAL INT64  int.value,
                  VAL INT    field)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard TDS3 library
  PROC INT64TOSTRING   Used to calculate the integer text.
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT    int.value
  INT value to be printed as text.
  
    In        VAL INT    field
  Number of characters used for printing the integer.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Writes the text number
  PROC write.char           Writes padding spaces
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to print a text representation of a 64 bit integer value.
  The value is printed as a decimal integer (with a minus sign if the value is
  negative). If 'field' is larger than the number of digits in the number (plus
  the minus sign if present) then spaces will be inserted before the number to
  pad the text out. If 'field' is smaller than the number of digits then the
  procedure will use as few characters as possible.
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.hex.byte
PROC write.hex.byte (CHAN OF SP from.isv, to.isv,
                     VAL INT32  stream.id,
                     BYTE       isv.result,
                     VAL BYTE   int.value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard TDS3 library
  PROC STRINGTOHEX16   Used to calculate the hexadecimal integer text.
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL BYTE   int.value
  INT value to be printed as text.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to print a hexadecimal text representation of a byte
  value. The value is always printed using two hexadecimal characters (upper-
  case for 'A' - 'F').
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.hex.int16
PROC write.hex.int16 (CHAN OF SP from.isv, to.isv,
                      VAL INT32  stream.id,
                      BYTE       isv.result,
                      VAL INT16  int.value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard TDS3 library
  PROC STRINGTOHEX16   Used to calculate the hexadecimal integer text.
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT16  int.value
  INT value to be printed as text.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to print a hexadecimal text representation of a INT16
  value. The value is always printed using four hexadecimal characters (upper-
  case for 'A' - 'F').
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.hex.int32
PROC write.hex.int32 (CHAN OF SP from.isv, to.isv,
                      VAL INT32  stream.id,
                      BYTE       isv.result,
                      VAL INT32  int.value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard TDS3 library
  PROC STRINGTOHEX32   Used to calculate the hexadecimal integer text.
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT32  int.value
  INT value to be printed as text.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to print a hexadecimal text representation of a INT32
  value. The value is always printed using eight hexadecimal characters (upper-
  case for 'A' - 'F').
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.hex.int64
PROC write.hex.int64 (CHAN OF SP from.isv, to.isv,
                      VAL INT32  stream.id,
                      BYTE       isv.result,
                      VAL INT64  int.value)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard TDS3 library
  PROC STRINGTOHEX64   Used to calculate the hexadecimal integer text.
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT64  int.value
  INT value to be printed as text.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to print a hexadecimal text representation of a INT64
  value. The value is always printed using sixteen hexadecimal characters (upper-
  case for 'A' - 'F').
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.real32
PROC write.real32 (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL REAL32 real.value,
                   VAL INT    Ip, Id)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard TDS3 library
  PROC REAL32TOSTRING  Used to calculate the floating point number text.
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL REAL32 real.value
  The REAL32 value to be written as text.
  
    In        VAL INT    Ip
  Ip and Id define the output form of the REAL32 number. Read the INMOS occam 2
  reference manual (PROC REAL32TOSTRING) for details.
  
    In        VAL INT    Id
  Ip and Id define the output form of the REAL32 number. Read the INMOS occam 2
  reference manual (PROC REAL32TOSTRING) for details.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Writes the text number
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to print a text representation of a REAL32 value.
  The value is printed as a decimal floating point number. The output
  representation is dependent on Ip and Id (See the INMOS occam 2 reference
  manual on PROC REAL32TOSTRING).
  
  If Ip = 0 and Id = 0 then free format is used. This means a fixed point
  is used where there are less than four zeros after the decimal point or
  where the accuracy of the number is not misrepresented.
  
  If Ip <> 0 then fixed point representation is used with Ip digits before the
  decimal point and Id digits after the decimal point with padding spaces if
  needed. If this not possible then exponential form is used using the same
  field as the fixed point form would have used (Ip + Id + 2 characters). If
  Ip and Id are very small then two special forms ("Un" and Ov") are used.
  
  If Ip = 0 and Id <> 0 then an exponential form is used with Id digits used
  in the fraction. Id = 1 should not be used.
  
  If the value is infinite or not a number then "Inf" and "NaN" will be printed
  using the correct field.
  
  An error result will occur if
  1. The server returns an error value.
  
  A fatal error will occur if
  1. The field is greater then 80 characters.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.real64
PROC write.real64 (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL REAL64 real.value,
                   VAL INT    Ip, Id)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard TDS3 library
  PROC REAL64TOSTRING  Used to calculate the floating point number text.
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL REAL64 real.value
  The REAL32 value to be written as text.
  
    In        VAL INT    Ip
  Ip and Id define the output form of the REAL32 number. Read the INMOS occam 2
  reference manual (PROC REAL32TOSTRING) for details.
  
    In        VAL INT    Id
  Ip and Id define the output form of the REAL32 number. Read the INMOS occam 2
  reference manual (PROC REAL32TOSTRING) for details.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Writes the text number
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to print a text representation of a REAL64 value.
  The value is printed as a decimal floating point number. The output
  representation is dependent on Ip and Id (See the INMOS occam 2 reference
  manual on PROC REAL64TOSTRING).
  
  If Ip = 0 and Id = 0 then free format is used. This means a fixed point
  is used where there are less than four zeros after the decimal point or
  where the accuracy of the number is not misrepresented.
  
  If Ip <> 0 then fixed point representation is used with Ip digits before the
  decimal point and Id digits after the decimal point with padding spaces if
  needed. If this not possible then exponential form is used using the same
  field as the fixed point form would have used (Ip + Id + 2 characters). If
  Ip and Id are very small then two special forms ("Un" and Ov") are used.
  
  If Ip = 0 and Id <> 0 then an exponential form is used with Id digits used
  in the fraction. Id = 1 should not be used.
  
  If the value is infinite or not a number then "Inf" and "NaN" will be printed
  using the correct field.
  
  An error result will occur if
  1. The server returns an error value.
  
  A fatal error will occur if
  1. The field is greater then 80 characters.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.tab
PROC get.tab (CHAN OF SP from.isv, to.isv,
              VAL INT32  stream.id,
              BYTE       isv.result,
              INT        tab.position)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.TAB
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    Out       INT        tab.position
  On exit, this value is set to the position of the cursor from the start of
  the current text line. The first position is counted as zero.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to determine the cursor position in the current text
  line for text windows or text files. The first position in a text line is
  zero.
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  If a server error is detected on entry then tab position will be set to zero.
  
  PROC write.tab.char
PROC write.tab.char (CHAN OF SP from.isv, to.isv,
                     VAL INT32  stream.id,
                     BYTE       isv.result,
                     VAL INT    desired.tab.position,
                     VAL BYTE   tab.character)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT    desired.tab.position
  This value represents the text line position that the procedure should print
  up to. Positions start from zero.
  
    In        VAL BYTE   tab.character
  This is the character the procedure should use for printing.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC get.tab              Find the current cursor position.
  PROC write.char           Used to print the tab character.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to tabulate text. A position in the current text line
  is specified in 'desired.tab.position' and the procedure will print the
  correct number of 'tab.character' characters to get up to (but not at) the
  desired position. Positions start as zero.
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC write.tab
PROC write.tab (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                BYTE       isv.result,
                VAL INT    desired.tab.position)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT    desired.tab.position
  This value represents the text line position that the procedure should print
  up to. Positions start from zero.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.tab.char       Used to print the tab spaces.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used to tabulate text using spaces as the tab character.
  It works in exactly the same way as write.tab.char but uses spaces as the
  tabulation character. Positions start as zero.
  
  An error result will occur if
  1. The server returns an error value.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC goto.xy
PROC goto.xy (CHAN OF SP from.isv, to.isv,
              VAL INT32  stream.id,
              BYTE       isv.result,
              VAL INT    x, y)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.GOTO.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT    x
  X axis position for cursor. (Top left is x=0, y=0)
  
    In        VAL INT    y
  Y axis position for cursor. (Top left is x=0, y=0)
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the 'goto.xy' control to the display
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for placing the text cursor in a text window at a
  specified position. The top left position is x=0, y=0. If either the 'x' or
  'y' value is out of range, the cursor will be placed at x=0, y=0. If the
  procedure is used for a file stream, the three characters will simply be
  printed as normal text bytes.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC cursor.up
PROC cursor.up (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.UP.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for moving the cursor up one text line. If the cursor
  is already on the top line then the whole text window will scroll down one
  line.
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC cursor.down
PROC cursor.down (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.DOWN.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for moving the cursor down one text line. If the cursor
  is already on the bottom line then the whole text window will scroll up one
  line.
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC cursor.left
PROC cursor.left (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.LEFT.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for moving the cursor left one text character. If the
  cursor is already at the left most col. the cursor will not move.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC cursor.right
PROC cursor.right (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.RIGHT.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for moving the cursor right one text character. If the
  cursor is already at the right most col. the cursor will not move.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC insert.line
PROC insert.line (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.INS.LINE.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for inserting a line within a text window. The text
  below the cursor will be scrolled down one text line and a blank line will
  be left at the cursor position. The cursor will not move.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC delete.line
PROC delete.line (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.DEL.LINE.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for deleting a line within a text window. The text
  below the cursor will be scrolled up one text line and a blank line will
  be left at the bottom of the window. The cursor will not move.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC insert.char
PROC insert.char (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result,
                  VAL BYTE   char)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.INS.CHAR.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL BYTE   char
  This is the character to be inserted at the cursor.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for inserting a character at the cursor in a text
  window. All the characters to the right of the cursor will be moved right
  one character (losing the rightmost character) and 'char' will be placed at
  the cursor (to the right of the caret). The cursor will not move.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC delete.char
PROC delete.char (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.DEL.CHAR.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for deleting a character at the cursor in a text
  window. All the characters to the right of the cursor will be moved left
  one character (losing the character at the cursor) and a SPACE will be placed
  at the rightmost col. of the line. The cursor will not move.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC beep
PROC beep (CHAN OF SP from.isv, to.isv,
           VAL INT32  stream.id,
           BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.BEEP.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for causing a bleep.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC clear.window
PROC clear.window (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.CLR.SCREEN.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for clearing an entire text window. The cursor will be
  placed at the top left of the text window.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC clear.to.end.of.line
PROC clear.to.end.of.line (CHAN OF SP from.isv, to.isv,
                           VAL INT32  stream.id,
                           BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.CLR.EOL.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for clearing a text line to the right of the cursor. The
  cursor will not move.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC clear.to.end.of.screen
PROC clear.to.end.of.screen (CHAN OF SP from.isv, to.isv,
                             VAL INT32  stream.id,
                             BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE ITERM.CRL.EOS.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.small.string   Sends the text control code to the text window
                            interpreter. (Just like ANSI.SYS)
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for clearing the text line to the right of the cursor
  and all the text lines below the cursor. The cursor will not move.
  
  If the procedure is used for a file stream, the control character will simply
  be printed as a normal text byte.
  
  An error result will occur if
  1. PROC print.small.string returns an error.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.event
PROC get.event (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                INT        items.left.in.buffer,
                INT16      virtual.key.code, system.key.flags,
                BYTE       ascii.key.code,
                [2]INT     pointer.pos,
                INT32      system.tick.value,
                BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.EVENT
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Out       INT        items.left.in.buffer
  On exit, this value is set to the number of events left in the event buffer.
  If the value is -1 then there were no items in the buffer to start with
  and the event data is invalid.
  If the value is 0 then there are no more items in the buffer (the call removed
  the last item).
  If the value is greater than 0 then there are still times left in the buffer.
  
    Out       INT16      virtual.key.code
  This value is only valid if 'items.left.in.buffer' was >= zero.
  The value is set to a unique key identifier (one of the 'VK.' constants in
  'wiserver.hdr'.
  
    Out       INT16      system.key.flags
  This value is only valid if 'items.left.in.buffer' was >= zero.
  Each bit represents a status of the event.
  
  Bit 0 set - The Shift key was depressed at the time of the event.
  Bit 1 set - The Control key was depressed at the time of the event.
  Bit 2 set - The Alt key was depressed at the time of the event.
  Bit 3 set - The event was caused by an auto-repeat key.
  Bit 4 set - The key is an ANSI key (i.e. it can be printed).
  Bit 5 set - The key is a DOS extended key. In DOS, these keys would be
              preceded by a zero byte. 'virtual.key.code' still holds the
              Windows virtual key code for the key but 'ascii.key.code'
              holds the DOS extended key code.
  Bit 6-15  - Undefined.
  
    Out       BYTE       ascii.key.code
  This value is only valid if 'items.left.in.buffer' was >= zero.
  It holds the ASCII equivalent of the key or a zero byte if there is none (e.g.
  a mouse button click) or one of the DOS extended key codes.
  
    Out       [2]INT     pointer.pos
  This value is only valid if 'items.left.in.buffer' was >= zero.
  It returns the row (y - element 1) and column (x - element 0) position of the
  windows pointer (arrow) at the time of the event. If the pointer is outside
  the text window when the event occurs then this value will be outside the
  range of the text window row/column positions.
  
    Out       INT32      system.tick.value
  This value is only valid if 'items.left.in.buffer' was >= zero.
  It is set to the Windows system tick value at the time of the event.
  The Windows system tick is the number of milliseconds since the system
  was started.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for polling the event buffer of a text window. If an
  event is present then it is removed. Events are caused by key presses or mouse
  clicks.
  
  The pointer must be over the desired window for mouse clicks to be added to
  the event buffer.
  
    TDS3 EXE programs
  In TDS3, EXE programs run in parallel with a terminal program. This terminal
  program constantly polls the keyboard buffer using SP.POLLKEY. This may cause
  confusion since this process would remove events from the event buffer of the
  main window. WIServer combats this by ignoring SP.POLLKEY tags once an
  SP.GET.EVENT tag is used. This will stop the terminal process from removing
  events. SP.POLLKEY will be reallowed once a SP.GETKEY is issued (TDS does this
  when the EXE program finishes). If you are writing an EXE program, you should
  use this PROC to turn off the terminal program at the start of the EXE.
  
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC wait.event
PROC wait.event (CHAN OF SP from.isv, to.isv,
                 VAL INT32  stream.id,
                 INT16      virtual.key.code, system.key.flags,
                 BYTE       ascii.key.code,
                 [2]INT     pointer.pos,
                 INT32      system.tick.value,
                 VAL INT    poll.period,
                 BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Out       INT16      virtual.key.code
  The value is set to a unique key identifier (one of the 'VK.' constants in
  'wiserver.hdr'.
  
    Out       INT16      system.key.flags
  Each bit represents a status of the event.
  
  Bit 0 set - The Shift key was depressed at the time of the event.
  Bit 1 set - The Control key was depressed at the time of the event.
  Bit 2 set - The Alt key was depressed at the time of the event.
  Bit 3 set - The event was caused by an auto-repeat key.
  Bit 4 set - The key is an ANSI key (i.e. it can be printed).
  Bit 5 set - The key is a DOS extended key. In DOS, these keys would be
              preceded by a zero byte. 'virtual.key.code' still holds the
              Windows virtual key code for the key but 'ascii.key.code'
              holds the DOS extended key code.
  Bit 6-15  - Undefined.
  
    Out       BYTE       ascii.key.code
  It holds the ASCII equivalent of the key or a zero byte if there is none (e.g.
  a mouse button click) or one of the DOS extended key codes.
  
    Out       [2]INT     pointer.pos
  It returns the row (y - element 1) and column (x - element 0) position of the
  windows pointer (arrow) at the time of the event. If the pointer is outside
  the text window when the event occurs then this value will be outside the
  range of the text window row/column positions.
  
    Out       INT32      system.tick.value
  It is set to the Windows system tick value at the time of the event.
  The Windows system tick is the number of milliseconds since the system
  was started.
  
    In        VAL INT    poll.period
  This is the delay (in transputer clock ticks) between each poll of the
  event buffer. The WIServer header library has a default value defined in
  POLL.PERIOD which may be placed in this parameter. If this value is too small
  then there is a danger that the link communication will be hogged by this
  process polling the event buffer.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC get.event            Poll the event buffer for events.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for getting an event from a text window event buffer.
  If an event is present then this procedure will continue polling until an
  event is generated. Events are caused by key presses or mouse clicks.
  
  The pointer must be over the desired window for mouse clicks to be added to
  the event buffer.
  
    TDS3 EXE programs
  In TDS3, EXE programs run in parallel with a terminal program. This terminal
  program constantly polls the keyboard buffer using SP.POLLKEY. This may cause
  confusion since this process would remove events from the event buffer of the
  main window. WIServer combats this by ignoring SP.POLLKEY tags once an
  SP.GET.EVENT tag is used. This will stop the terminal process from removing
  events. SP.POLLKEY will be reallowed once a SP.GETKEY is issued (TDS does this
  when the EXE program finishes). If you are writing an EXE program, you should
  use this PROC to turn off the terminal program at the start of the EXE.
  
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC flush.input.buffer
PROC flush.input.buffer (CHAN OF SP from.isv, to.isv,
                         VAL INT32  stream.id,
                         BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC get.event            Poll the event buffer for events.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for removing all events from a text window event buffer.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  *** THIS PROCEDURE IS OUT OBSOLETE. USE PROC flush.stream. ***
  
  PROC wait.any.event
PROC wait.any.event (CHAN OF SP from.isv, to.isv,
                     VAL INT32  stream.id,
                     BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL INT POLL.PERIOD
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC flush.event.buffer   Remove all events first.
  PROC wait.event           Wait until an event is ready.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used halting a process execution until an event is generated.
  It is very useful for 'Press a key to continue' messages where the actual
  key pressed is not needed. All events are removed beforehand.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.key
PROC get.key (CHAN OF SP from.isv, to.isv,
              VAL INT32  stream.id,
              INT        items.left.in.buffer,
              BYTE       ascii.key.code,
              BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Out       BYTE       ascii.key.code
  It holds the ASCII equivalent of the key or a zero byte if there is none (e.g.
  a mouse button click).
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC get.event            Get an event from the event buffer.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for getting an event caused by a standard key press.
  Standard keys exclude special keys such as function keys. The key value
  is an ANSI character (upper or lower case). All non-ANSI key events in the
  buffer before the ANSI-key event are removed with the ANSI-key event. If
  there are no ANSI-key events then all events are removed and 'ansi.key.code'
  is set to zero.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC wait.key
PROC wait.key (CHAN OF SP from.isv, to.isv,
               VAL INT32  stream.id,
               BYTE       ascii.key.code,
               VAL INT    poll.period,
               BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Out       BYTE       ascii.key.code
  It holds the ASCII equivalent of the key or a zero byte if there is none (e.g.
  a mouse button click).
  
    In        VAL INT    poll.period
  This is the delay (in transputer clock ticks) between each poll of the
  event buffer. The WIServer header library has a default value defined in
  POLL.PERIOD which may be placed in this parameter. If this value is too small
  then there is a danger that the link communication will be hogged by this
  process polling the event buffer.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC get.key              Get an event from the event buffer.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for getting an event caused by a standard key press.
  Standard keys exclude special keys such as function keys. The key value
  is an ANSI character (upper or lower case). All non-ANSI key events in the
  buffer before the ANSI-key event are removed with the ANSI-key event. If
  there are no ANSI-key events then all events are removed the procedure
  polls the event buffer until an ANSI-key is pressed.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.option
PROC get.option (CHAN OF SP from.isv, to.isv,
                 VAL INT32  stream.id,
                 VAL []BYTE option.keys,
                 INT        option,
                 VAL INT    poll.period,
                 VAL BOOL   escape.ok,
                 VAL BOOL   uppercase.only,
                 BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.CANCEL
  VAL INT16 VK.ESCAPE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    In        VAL []BYTE option.keys
  This is a list of allowed keys in the option. The position in the array is
  reflected in the value returned by 'option'.
  
    Out       INT        option
  This is the result of the choice. It corresponds to the element number of
  the option key in 'option.keys'. If a server error occurs or the user presses
  the escape key (and escape.ok equals TRUE) then this parameter is set to
  minus one.
  
    In        VAL INT    poll.period
  This is the delay (in transputer clock ticks) between each poll of the
  event buffer. The WIServer header library has a default value defined in
  POLL.PERIOD which may be placed in this parameter. If this value is too small
  then there is a danger that the link communication will be hogged by this
  process polling the event buffer.
  
    In        VAL BOOL   escape.ok
  If this parameter is TRUE on entry then the procedure will quit if the user
  presses the Escape key. 'option' will be set to minus one if this is the case.
  
    In        VAL BOOL   uppercase.only
  If this parameter is TRUE then key presses are converted to uppercase. This
  allows programs to not worry if lower case key presses are made. The
  values in the option array should be uppercase if appropriate.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC wait.key             Wait for an event from the event buffer.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure will wait for a keypress. The key press must be in the
  'option.keys' array. The result 'option' represents the array element number
  of the key in 'option.keys'.
  
  'option' is -1 if a server error occurs.
  
  The procedure will quit if Escape is pressed and 'escape.ok' is TRUE. 'option'
  will be set to -1.
  
  All letter keys will be converted to uppercase if 'uppercase.only' is TRUE.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC enter.ansi.string.with.escape
PROC enter.ansi.string.with.escape (CHAN OF SP from.isv, to.isv,
                                    VAL INT32  stream.id,
                                    BYTE       isv.result,
                                    VAL INT    poll.period,
                                    INT        cur.pos, len,
                                    []BYTE     string,
                                    [2]INT     pointer.pos,
                                    VAL BOOL   convert.to.upper,
                                    INT16      virt.key.code)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  
  VAL INT16 VK.SHIFT
  VAL INT16 VK.CONTROL
  VAL INT16 VK.MENU
  VAL INT16 VK.CAPITAL
  VAL INT16 VK.BACK
  VAL INT16 VK.DELETE
  VAL INT16 VK.LEFT
  VAL INT16 VK.RIGHT
  VAL INT16 VK.HOME
  VAL INT16 VK.END
  
  VAL INT16 KEY.IS.ANSI
  
  VAL BYTE ITERM.LEFT.CODE
  VAL BYTE ITERM.RIGHT.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT    poll.period
  This is the delay (in transputer clock ticks) between each poll of the
  event buffer. The WIServer header library has a default value defined in
  POLL.PERIOD which may be placed in this parameter. If this value is too small
  then there is a danger that the link communication will be hogged by this
  process polling the event buffer.
  
    Bi        INT        cur.pos
  This parameter defines the cursor position within the text string. Zero is at
  the beginning. If the value is out of range on entry then it is brought within
  range. The parameter gives the cursor position on exit.
  
    Bi        INT        len
  This parameter defines the length of the current string on entry and exit.
  If the value is out of range on entry then it is brought within
  
    Bi        []BYTE     string
  This byte array holds the input string on entry and exit. 'len' is used
  to define the current size within 'string'.
  
    Out       [2]INT     pointer.pos
  On exit, this parameter gives the Windows pointer position when the
  terminating event occurred. The position definition is as PROC get.event.
  
    In        VAL BOOL   convert.to.upper
  If this parameter is TRUE then all lower case characters typed will be
  converted to uppercase.
  
    Out       INT16      virt.key.code
  This is the virtual key code of the terminating event.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC wait.key             Wait for an event from the event buffer.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure allow the user to enter a text string. Any normal ANSI character
  may be typed. The user may use any of the Home, End, Left cursor, Right cursor,
  Backspace and Delete keys for their normal editing functions. Any other key
  will cause the procedure to exit, giving the pointer position at the time of
  the event and the virtual key code of the offending key.
  
  The maximum number of characters allowed to be typed is determined by the size
  of the 'string' parameter array. Any attempt to enter more characters will
  cause the procedure to issues a bleep.
  
  If, on entry, the 'string' parameter is intended to be empty, then the
  'len' and 'cur.pos' parameters should be set to zero. If there should be a
  default value in 'string' on entry then 'string' should hold the default text,
  'len' should indicate the length of the default text and 'cur.pos' should
  indicate the edit cursor position within the text.
  ***NOTE***: The procedure assumes the window text cursor is in the correct
  position and the default text is already printed on entry.
  
  The procedure is intended for use with applications that require very
  flexible input. Any of the non ANSI keys could be used as special function
  keys. The procedure would quit giving the quit virtual key code, the
  application could then perform the function and return to the edit line
  as if nothing had happened.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC enter.ansi.string
PROC enter.ansi.string (CHAN OF SP from.isv, to.isv,
                        VAL INT32  stream.id,
                        BYTE       isv.result,
                        VAL INT    poll.period,
                        INT        len,
                        []BYTE     string,
                        VAL BOOL   escape.ok,
                        VAL BOOL   convert.to.upper)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.CANCEL
  
  VAL INT16 VK.ESCAPE
  VAL INT16 VK.RETURN
  
  VAL BYTE ITERM.RIGHT.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT    poll.period
  This is the delay (in transputer clock ticks) between each poll of the
  event buffer. The WIServer header library has a default value defined in
  POLL.PERIOD which may be placed in this parameter. If this value is too small
  then there is a danger that the link communication will be hogged by this
  process polling the event buffer.
  
    Bi        INT        len
  This parameter defines the length of the current string on entry and exit.
  If the value is out of range on entry then it is brought within range.
  
    Bi        []BYTE     string
  This byte array holds the input string on entry and exit. 'len' is used
  to define the current size within 'string'.
  
    In        VAL BOOL   convert.to.upper
  If this parameter is TRUE then all lower case characters typed will be
  converted to uppercase.
  
    In        VAL BOOL   escape.ok
  If this parameter if TRUE on entry then the procedure will quit if the Escape
  key is pressed. 'isv.result' is set to 'SPR.CANCEL' if this happens.
  
  
    Implicit constants/variables/procedures
  Name                                 Function
  PROC enter.ansi.string.with.escape   Used for the main part of inputting text.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure allow the user to enter a text string. Any normal ANSI character
  may be typed. The user may use any of the Home, End, Left cursor, Right cursor,
  Backspace and Delete keys for their normal editing functions.
  
  Pressing the Return key will cause the procedure to place the cursor at the
  end of the text and to exit with SPR.OK. 'string' and 'len' will define the
  text typed.
  
  Pressing the Escape key with 'escape.ok' set to TRUE will cause the procedure
  to quit with 'isv.result' set to SPR.CANCEL.
  
  Pressing any other non-ANSI key will cause a beep.
  
  The maximum number of characters allowed to be typed is determined by the size
  of the 'string' parameter array. Any attempt to enter more characters will
  cause the procedure to issues a bleep.
  
  If, on entry, the 'string' parameter is intended to be empty, then the
  'len' parameter should be set to zero. If there should be a default value in
  'string' on entry then 'string' should hold the default text, 'len' should
  indicate the length of the default text.
  ***NOTE***: The procedure will print the default text on entry with the cursor
  at the end of the text.
  
  The procedure is intended for use with applications that require very
  flexible input. Any of the non ANSI keys could be used as special function
  keys. The procedure would quit giving the quit virtual key code, the
  application could then perform the function and return to the edit line
  as if nothing had happened.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC enter.real32
PROC enter.real32 (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL BOOL   default,
                              caret,
                              escape.ok,
                   BOOL       error,
                   REAL32     value,
                   VAL INT    Ip, Id)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard Inmos
  PROC STRINGTOREAL32
  PROC REAL32TOSTRING
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.CANCEL
  
  VAL INT POLL.PERIOD
  
  VAL BYTE ITERM.SHOW.CARET.CODE
  VAL BYTE ITERM.HIDE.CARET.CODE
  
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL BOOL   default
  If TRUE then the inital string will be the number in 'value' on entry. If
  FALSE then there will be no initial string.
  The format of the string is determined by 'Ip' and 'Id'.
  
    In        VAL BOOL   caret
  This parameter decides if the caret (virtical cursor) is present on
  exit of the procedure. If TRUE then the caret is maintained. If FALSE
  then the caret is hidden.
  
    In        VAL BOOL   escape.ok
  This parameter is passed straight to PROC enter.ansi.string. If TRUE
  then the user may press the ESCAPE key to quit. (isv.result is set to
  SPR.CANCEL in this case.)
  
    Out       BOOL       error
  If FALSE then the number entered has a valid format and the value is
  put in 'value'. If TRUE then the number entered could not be represented
  as a REAL32 value. NOTE: Real numbers must have the decimal point to
  show that they are real numbers. i.e.
  
  1.0  is valid
  -2.4 is valid
  33   is invalid
  
    Bi        REAL32     value
  If the parameter 'default' is TRUE then on entry this value is converted
  to a string (using Ip and Id as formating) and the string is used as the
  initial string.
  
  On exit the parameter returns the value of the real number entered. The
  parameter is undefined if 'error' is TRUE or 'isv.result' is not SPR.OK.
  
    In        VAL INT    Ip
  Ip and Id define the output form of the REAL32 number. Read the INMOS occam 2
  reference manual (PROC REAL32TOSTRING) for details.
  
    In        VAL INT    Id
  Ip and Id define the output form of the REAL32 number. Read the INMOS occam 2
  reference manual (PROC REAL32TOSTRING) for details.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.string         Print various things.
  PROC write.char           Clear input field.
  PROC cursor.left          Clear input field.
  PROC enter.ansi.string    Enter number.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure allows the user to enter a REAL32 number from the keyboard.
  The procedure may have a default value (see parameter 'default') which is
  printed in 'Ip' and 'Id' format on entry. Normal text entry keys can be
  used. The procedure checks the format of the entered number and redisplays
  the number in 'Ip' and 'Id' format after entry.
  
  PROC enter.real64
PROC enter.real64 (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result,
                   VAL BOOL   default,
                              caret,
                              escape.ok,
                   BOOL       error,
                   REAL64     value,
                   VAL INT    Ip, Id)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    extrio          Standard Inmos
  PROC STRINGTOREAL64
  PROC REAL64TOSTRING
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.CANCEL
  
  VAL INT POLL.PERIOD
  
  VAL BYTE ITERM.SHOW.CARET.CODE
  VAL BYTE ITERM.HIDE.CARET.CODE
  
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL BOOL   default
  If TRUE then the inital string will be the number in 'value' on entry. If
  FALSE then there will be no initial string.
  The format of the string is determined by 'Ip' and 'Id'.
  
    In        VAL BOOL   caret
  This parameter decides if the caret (virtical cursor) is present on
  exit of the procedure. If TRUE then the caret is maintained. If FALSE
  then the caret is hidden.
  
    In        VAL BOOL   escape.ok
  This parameter is passed straight to PROC enter.ansi.string. If TRUE
  then the user may press the ESCAPE key to quit. (isv.result is set to
  SPR.CANCEL in this case.)
  
    Out       BOOL       error
  If FALSE then the number entered has a valid format and the value is
  put in 'value'. If TRUE then the number entered could not be represented
  as a REAL64 value. NOTE: Real numbers must have the decimal point to
  show that they are real numbers. i.e.
  
  1.0  is valid
  -2.4 is valid
  33   is invalid
  
    Bi        REAL64     value
  If the parameter 'default' is TRUE then on entry this value is converted
  to a string (using Ip and Id as formating) and the string is used as the
  initial string.
  
  On exit the parameter returns the value of the real number entered. The
  parameter is undefined if 'error' is TRUE or 'isv.result' is not SPR.OK.
  
    In        VAL INT    Ip
  Ip and Id define the output form of the REAL32 number. Read the INMOS occam 2
  reference manual (PROC REAL32TOSTRING) for details.
  
    In        VAL INT    Id
  Ip and Id define the output form of the REAL32 number. Read the INMOS occam 2
  reference manual (PROC REAL32TOSTRING) for details.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.string         Print various things.
  PROC write.char           Clear input field.
  PROC cursor.left          Clear input field.
  PROC enter.ansi.string    Enter number.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure allows the user to enter a REAL64 number from the keyboard.
  The procedure may have a default value (see parameter 'default') which is
  printed in 'Ip' and 'Id' format on entry. Normal text entry keys can be
  used. The procedure checks the format of the entered number and redisplays
  the number in 'Ip' and 'Id' format after entry.
  
  PROC enter.int
PROC enter.int (CHAN OF SP from.isv, to.isv,
                VAL INT32  stream.id,
                BYTE       isv.result,
                VAL BOOL   default,
                           caret,
                           escape.ok,
                           hex,
                BOOL       error,
                INT        value,
                VAL INT    field)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    ioconv          Standard Inmos
  PROC HEXTOSTRING
  PROC INTTOSTRING
  PROC STRINGTOHEX
  PROC STRINGTOINT
  
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.CANCEL
  
  VAL INT POLL.PERIOD
  
  VAL BYTE ITERM.SHOW.CARET.CODE
  VAL BYTE ITERM.HIDE.CARET.CODE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL BOOL   default
  If TRUE then the inital string will be the number in 'value' on entry. If
  FALSE then there will be no initial string.
  
    In        VAL BOOL   caret
  This parameter decides if the caret (virtical cursor) is present on
  exit of the procedure. If TRUE then the caret is maintained. If FALSE
  then the caret is hidden.
  
    In        VAL BOOL   escape.ok
  This parameter is passed straight to PROC enter.ansi.string. If TRUE
  then the user may press the ESCAPE key to quit. (isv.result is set to
  SPR.CANCEL in this case.)
  
    In        VAL BOOL   hex
  This parameter determines how the number is printed if 'default' is TRUE.
  If TRUE then the number is printed as a hexadecimal number preceded by a
  '#' character.
  
    Out       BOOL       error
  If FALSE then the number entered has a valid format and the value is
  put in 'value'. If TRUE then the number entered could not be represented
  as an INT value. Numbers may either be entered as normal decimal integers
  or as hexadecimal integers (preceded by a '#' character) reguardless of the
  value of the 'hex' parameter.
  
    Bi        INT        value
  If the parameter 'default' is TRUE then on entry this value is converted
  to a string (using 'field' for the string length) and the string is used as the
  initial string.
  
  On exit the parameter returns the value of the integer number entered. The
  parameter is undefined if 'error' is TRUE or 'isv.result' is not SPR.OK.
  
    In        VAL INT    field
  This parameter defines the field of the number (the number of characters
  used).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC write.string         Print various things.
  PROC write.char           Clear input field.
  PROC cursor.left          Clear input field.
  PROC enter.ansi.string    Enter number.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure allows the user to enter an INT number from the keyboard.
  The procedure may have a default value (see parameter 'default') which is
  printed in 'field' spaces. Normal text entry keys can be used. The procedure
  checks the format of the entered number and redisplays the number in field
  characters. The user may enter normal decimal numbers or hexadecimal numbers
  (if preceded by a '#' character).
  
  PROC open.file
PROC open.file (CHAN OF SP from.isv, to.isv,
                INT32      stream.id,
                VAL []BYTE filename,
                VAL BYTE   file.type, file.mode,
                BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT  MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.OPEN
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    Out       INT32      stream.id
  Stream identification of file. The procedure will return a unique identifier
  for the file on exit. This identifier should be used for all operations on
  the file.
  
    In        VAL []BYTE filename
  This is the filename for the file you wish to open. A path may be included.
  
    In        VAL BYTE   file.type
  This identifies the type of the file. It may be SPT.BINARY if the file is a
  binary file or SPT.TEXT if the file is a text file.
  
    In        VAL BYTE   file.mode
  This identifies the type of open operation used. The parameter may be
  
  SPM.INPUT           - File is read only
  SPM.OUTPUT          - File is write only
  SPM.APPEND          - File is append write
  SPM.EXISTING.UPDATE - File is read/write
  SPM.NEW.UPDATE      - File is created and read/write
  SPM.APPEND.UPDATE   - File is read/write
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for opening files for input or output. On exit, the
  procedure gives a unique identification for the file in 'stream.id'. The
  file may then be written to or read from (depending on the open mode) as
  a normal stream.
  
  An error result will occur if
  1. A file does not exist for open/read operations.
  2. The server has trouble using the file system.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC close.stream
PROC close.stream (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.CLOSE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of the stream (window or file) to be closed.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for closing streams (windows or files).
  If the stream is for a window then the window will be removed from the
  desktop. If the stream is for a file then the file will be flushed and then
  closed.
  
  An error result will occur if
  1. The stream ID is unknown.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC flush.stream
PROC flush.stream (CHAN OF SP from.isv, to.isv,
                   VAL INT32  stream.id,
                   BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.FLUSH
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of the stream (window or file) to be flushed.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for flushinh streams (windows or files).
  If the stream is for a window then all events will be deleted (eg type ahead
  keys) and (if the output is buffered} the screen will be updated to the
  current state. If the stream is an output file, then all data will be written
  to the file.
  
  An error result will occur if
  1. The stream ID is unknown.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC end.of.file
PROC end.of.file (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  BYTE       file.result, isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.EOF
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  Stream identification of file or text window. This value is allocated by
  the procedure for opening a file or text window.
  
    Out       BYTE       file.result
  If the file pointer is at the end of the file then 'file.result' will be set
  to SPR.OK and if the file pointer is NOT ant the end of the file then
  'file.result' will be set to SPR.NOTOK.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  NOTE: If there is a server error on entry then 'file.result' will be set to
  'SPR.OK' to indicate an end of file.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for testing to see if the file pointer of a file
  is at the end of the file.
  
  'file.result' is set to SPR.NOTOK if file pointer is not at the end of file.
  'file.result' is set to SPR.OK if the file pointer is at the end of file.
  
  An error result will occur if
  1. The server does not recognise 'stream.id'.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  NOTE: If there is a server error on entry then 'file.result' will be set to
  'SPR.OK' to indicate an end of file.
  
  PROC remove.file
PROC remove.file (CHAN OF SP from.isv, to.isv,
                  VAL []BYTE filename,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.REMOVE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL []BYTE filename
  This is the filename (and maybe path) of the file to be deleted.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for deleting a file from the file system. 'filename'
  is the filename (and maybe path) of the file to be deleted. Wildcards will
  not be accepted.
  
  An error result will occur if
  1. The server does not recognise 'stream.id'.
  
  A fatal error will occur if
  1. The filename is larger than the MAX.PACKET.SIZE - 4 bytes.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  PROC read.binary
PROC read.binary (CHAN OF SP from.isv, to.isv,
                  VAL INT32  stream.id,
                  []BYTE     data,
                  INT        bytes.read,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.GETBLOCK
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    Out       []BYTE     data
  This is the buffer used to hold the data taken from the stream.
  
    Out       INT        bytes.read
  On exit, this gives the number of bytes actually read.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  NOTE: If there is a server error on entry then 'file.result' will be set to
  'SPR.OK' to indicate an end of file.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for reading blocks of byte data from a binary file.
  The procedure may get blocks larger than MAX.PACKET.SIZE by requesting
  bytes more than once.
  
  An error result will occur if
  1. The procedure is used when the file pointer is at the end of a file.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC read.text.line
PROC read.text.line (CHAN OF SP from.isv, to.isv,
                     VAL INT32  stream.id,
                     []BYTE     line,
                     INT        line.length,
                     BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.GETS
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    Out       []BYTE     line
  This is the buffer used to hold the line of text. If the buffer is smaller than
  the text line then it will get truncated.
  
    Out       INT        line.length
  On exit, this gives the length of the text line stored in 'line'.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  NOTE: If there is a server error on entry then 'file.result' will be set to
  'SPR.OK' to indicate an end of file.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is used for reading a text line from a file stream. Use
  with text window streams is undefined.
  
  An error result will occur if
  1. The procedure is used when the file pointer is at the end of a file.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC exit.server
PROC exit.server (CHAN OF SP from.isv, to.isv, VAL INT32 exit.code)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SP.EXIT
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  exit.code
  This is the exit code passed to the server. It is usually SPS.SUCCESS or
  SPS.FAILURE.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure will tell the server to terminate. An exit code is passed to the
  server indicating the success of the program.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.free.resources
PROC get.free.resources (CHAN OF SP from.isv, to.isv,
                         INT        max.packet.size.to.server,
                                    max.packet.size.from.server,
                                    no.of.free.file.handles,
                                    no.of.free.text.windows,
                         BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.FREE.RESOURCES
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    Out       INT        max.packet.size.to.server
  This is the maximum packet size (in bytes) for data sent to the server.
  
    Out       INT        max.packet.size.from.server
  This is the maximum packet size (in bytes) for data sent by the server.
  
    Out       INT        no.of.free.file.handles
  This is the current number of free file handles.
  
    Out       INT        no.of.free.text.windows
  This is the current number of free text window handles.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure may be used to investigate the capabilities of the server.
  If the procedure is used before any files are opened, before any text windows
  are opened and before any DLL are used then the results give the maximum
  number of open files and open text windows.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.system.information
PROC get.system.information (CHAN OF SP from.isv, to.isv,
                             VAL INT16  system.info.id,
                             INT16      system.info.result,
                             BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.SYSTEM.INFO
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT16  system.info.id
  This is the identification of the system information requested. It should be
  one of the INFO.SYSTEM.XXXX constants defined in 'wiserver.hdr'.
  
    Out       INT16      system.info.result
  This is the result of the system information request.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure gets system information from the Windows API. The server calls
  the following Windows API functions
  
  VAL INT16 INFO.SYSTEM.DESKTOP        uses API GetDeskTopWindow
  VAL INT16 INFO.SYSTEM.ACTIVE.WINDOW  uses API GetActiveWindow
  VAL INT16 INFO.SYSTEM.CAPTURE.WINDOW uses API GetCapture
  VAL INT16 INFO.SYSTEM.MODAL.WINDOW   uses API GetSysModalWindow
  VAL INT16 INFO.SYSTEM.VERSION        uses API GetVersion
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.system.mertic
PROC get.system.metric (CHAN OF SP from.isv, to.isv,
                        VAL INT16  system.metric.id,
                        INT16      system.metric.result,
                        BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.SYSTEM.METRIC
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT16  system.metric.id
  This is the identification of the system metric requested. It should be
  one of the SM.XXXX constants defined in 'wiserver.hdr'.
  
    Out       INT16      system.metric.result
  This is the result of the system metric request.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure gets system metric information from the Windows API. The server
  calls API GetSystemMetrics to obtain the data. Use one of the SM.XXXX constants
  defined in 'wiserver.hdr'.
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.application.information
PROC get.application.information (CHAN OF SP from.isv, to.isv,
                                  INT32      main.window.pointer,
                                  INT16      main.window.handle,
                                  INT16      server.task.identifier,
                                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.APP.INFO
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    Out       INT32      main.window.pointer
  This is an INT32 representation of the memory pointer for the server
  application.
  
    Out       INT16      main.window.handle
  This is an INT16 representation of the windows handle for the servers
  main window (the icon, NOT the main text window).
  
    Out       INT16      server.task.identifier
  This is an INT16 representation of the server application task identifier.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure gets information about the WIServer application. The results
  may be useful. For example, the main window handle could be used to hide the
  icon window.
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.window.handle
PROC get.window.handle (CHAN OF SP from.isv, to.isv,
                        VAL INT32  stream.id,
                        INT16      window.handle,
                        BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.WINDOW.HANDLE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT32  stream.id
  This is the stream identifier of the text window you wish to get the Windows
  handle for.
  
    Out       INT16      window.handle
  This is the window handle of the text window specified.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure gets the window handle for the text window specified by
  'stream.id'.
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.window.text
PROC get.window.text (CHAN OF SP from.isv, to.isv,
                      VAL INT16  window.handle,
                      []BYTE     window.text,
                      INT        window.text.length,
                      BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.WINDOW.TEXT
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT16  window.handle
  The handle of the window investigated.
  
    Out       []BYTE     window.text
  A buffer for the text from the window.
  
    Out       INT        window.text.length
  The length of the text in 'window.text'.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure gets the window title text from a window specified by
  'window.handle'. The server calls API GetWindowText to obtain the data.
  
  A server error may occur if
  1. 'window.text' is not large enough to hold the window text. The size is
  limited to 200 bytes anyway.
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.window.state
PROC get.window.state (CHAN OF SP from.isv, to.isv,
                       VAL INT16  window.handle,
                       BYTE       icon.state, maximized.state, visible.state,
                       INT16      parent.window.handle,
                       [4]INT     bounding.rectangle, client.rectangle,
                       BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.WINDOW.STATE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT16  window.handle
  The handle of the window investigated.
  
    Out       BYTE       icon.state
  If this value is non-zero on exit then the window investigated is in an
  icon (minimised) state.
  
    Out       BYTE       maximized.state
  If this value is non-zero on exit then the window investigated is in an
  maximized (full screen) state.
  
    Out       BYTE       visible.state
  If this value is non-zero on exit then the window investigated is in a visible
  state.
  
    Out       INT16      parent.window.handle
  On exit, this parameter has the window handle of the parent window (zero if
  none).
  
    Out       [4]INT     bounding.rectangle
  This is the result of a call to the windows function API GetWindowRect.
  
    Out       [4]INT     client.rectangle
  This is the result of a call to the windows function API GetClientRect.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure gets the window state using a few API functions.
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.cursor.pos
PROC get.cursor.pos (CHAN OF SP from.isv, to.isv, INT x, y, BYTE isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.GET.CURSOR.POS
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    Out       INT16      x
  On exit, this parameter has the horizontal corsor position in pixels from the
  left of the screen.
  
    Out       INT16      y
  On exit, this parameter has the vertical corsor position in pixels from the
  top of the screen.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure gets the position of the cursor (in pixels).
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC open.text.window
PROC open.text.window (CHAN OF SP from.isv, to.isv,
                       VAL []BYTE title,
                       VAL INT    x.pos, y.pos, width, height,
                                  char.width, char.height,
                                  window.style, refresh.rate, input.buffer.size,
                       INT32      stream.id,
                       BYTE       isv.result,
                       [4]INT16   window.rect)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.OPEN.TEXT.WINDOW
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL []BYTE title
  Text title of the window. This usually appears in the title bar at the top
  of the window.
  
    In        VAL INT    x.pos
  This is the x position of the left side of the new text window in screen
  co-ordinates. It must be convertible to INT16 values.
  
    In        VAL INT    y.pos
  This is the y position of the top of the new text window in screen co-ordinates.
  It must be convertible to INT16 values.
  
    In        VAL INT    width
  This is the number of columns in the new text window.
  
    In        VAL INT    height
  This is the number of rows in the new text window.
  
    In        VAL INT    char.width
  This is the pixel width of every character in the new text window. If
  'char.width' and 'char.height' are zero then the default size is chosen.
  If 'char.width' is zero then the appropriate size for 'char.height' will be
  chosen.
  
    In        VAL INT    char.height
  This is the pixel height of every character in the new text window. If
  'char.width' and 'char.height' are zero then the default size is chosen.
  
    In        VAL INT    window.style
  The bits in this integer define the style of the text window created. They
  desired values should be bit-wise ORed.
  E.g. for a text window with no title and an minimize box, use
  
    (MIN.BOX.TEXT.WIN.STYLE \/ NO.TITLE.TEXT.WIN.STYLE)
  
  The values are:
  
  VAL INT MIN.BOX.TEXT.WIN.STYLE     IS #0001: -- Include the minimize box
  VAL INT CARET.TEXT.WIN.STYLE       IS #0002: -- Include the caret (cursor)
  VAL INT CENTRAL.TEXT.WIN.STYLE     IS #0004: -- Create the window in the centre of the desktop
  VAL INT NO.TITLE.TEXT.WIN.STYLE    IS #0008: -- Hide the title bar
  VAL INT HIDDEN.TEXT.WIN.STYLE      IS #0010: -- Do not display straight away
  VAL INT NO.ACTIVATE.TEXT.WIN.STYLE IS #0020: -- Do not change focus on create
  
  All other bits should be zero.
  
    In        VAL INT    refresh.rate
  Because windows takes longer to scroll text windows than DOS screens, it was
  decided that output to WIServer text windows should have the option of being
  buffered. This means that when a window is scrolled, the display may not be
  updated straight away. This would have the effect of a text window scrolling
  continuously to appear to scroll in jumps. Windows uses the same technique
  in DOS windows. Normal printing (not requiring scrolling) will not be buffered.
  
  The value represents the period between each screen update (in milliseconds).
  A value of zero will disable output buffering.
  
    In        VAL INT    input.buffer.size
  This parameter defines the number of events a text window will buffer. The
  maximum allowed buffer size is 100 events. A value of zero will disable
  input to a text window.
  
    Out       INT32      stream.id
  Stream identification of text window. The procedure will return a unique
  identifier for the window on exit. This identifier should be used for all
  operations on the window.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    Out       [4]INT16   window.rect
  These co-ordinates give the bounding rectangle position of the window created.
  The elements correspond to
  [0] Left-most co-ordinate of bounding rectangle.
  [1] Top-most co-ordinate of bounding rectangle.
  [2] Right-most co-ordinate of bounding rectangle.
  [3] Bottom-most co-ordinate of bounding rectangle.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure creates a text window for and supplies a data-stream ID
  for communication to that window. It may be treated exactly as a normal
  DOS type window. See the details of each parameter for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC set.window.text
PROC set.window.text (CHAN OF SP from.isv, to.isv,
                      VAL INT16  window.handle,
                      VAL []BYTE window.text,
                      BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.SET.WINDOW.TEXT
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT16  window.handle
  The handle of the window whose text will be changed.
  
    In        VAL []BYTE window.text
  The text to be put to the windows title.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure sets the window title text from a window specified by
  'window.handle'. The server calls API SetWindowText to obtain the data.
  
  A server error may occur if
  1. 'window.text' is to large to fit in one packet.
  
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC show.window
PROC show.window (CHAN OF SP from.isv, to.isv,
                  VAL INT16  window.handle,
                             display.command,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.SHOW.WINDOW
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL INT16  window.handle
  The handle of the window to be displayed (or redisplayed).
  
    In        VAL INT16  display.commands
  One of the SW.xxxx constants.
  
  VAL INT16 SW.HIDE              IS 0 (INT16): -- Hidden
  VAL INT16 SW.MINIMIZE          IS 6 (INT16): -- Minimize window and deactivate
  VAL INT16 SW.SHOW              IS 5 (INT16): -- Windows current size and position
  VAL INT16 SW.SHOW.MAXIMIZED    IS 3 (INT16): -- Maximized and active
  VAL INT16 SW.SHOW.MINIMIZED    IS 2 (INT16): -- Minimized and active
  VAL INT16 SW.SHOW.MIN.NOACTIVE IS 7 (INT16): -- Minimized, no change to activation
  VAL INT16 SW.SHOW.NORMAL       IS 1 (INT16): -- Restored and active
  VAL INT16 SW.SHOW.NA           IS 4 (INT16): -- Current state, no activation
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure displays (or redisplays) a window using a display code
  ('display.command'). It can be used to minimize, maximize windows.
  The server calls API ShowWindow.
  
  A server error may occur if
  1. The window handle is incorrect.
  
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC load.dll
PROC load.dll (CHAN OF SP          from.isv, to.isv,
               VAL []BYTE          dll.filename,
               [DLL.DATA.SIZE]BYTE dll.data,
               BYTE                isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.LOAD.DLL
  VAL INT DLL.DATA.SIZE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL []BYTE dll.filename
  The filename (and path) of the DLL to load.
  
    Out       [DLL.DATA.SIZE]BYTE dll.data
  This is general DLL information which is always passed to the DLL when it
  is called. The information is created when the DLL is loaded.
  
    Bi        BYTE isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure loads a DLL (Dynamic Link Library) for protocol extensions. When
  loaded, the user can send special messages to the DLL using PROC dll.exec.
  The DLL must comply to the DLL Protocol Extension Definition (see manual).
  
  A server error may occur if
  1. The DLL file could not be found.
  
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC unload.dll
PROC unload.dll (CHAN OF SP          from.isv, to.isv,
                 [DLL.DATA.SIZE]BYTE dll.data,
                 BYTE                isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.UNLOAD.DLL
  VAL INT DLL.DATA.SIZE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        [DLL.DATA.SIZE]BYTE dll.index
  This is general DLL data about the DLL to be unloaded.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure unloads a DLL (Dynamic Link Library).
  
  A server error may occur if
  1. The DLL indicated was not loaded.
  
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC exec.dll
PROC exec.dll (CHAN OF SP              from.isv, to.isv,
               VAL [DLL.DATA.SIZE]BYTE dll.data,
               VAL []BYTE              params,
               []BYTE                  data,
               INT                     data.len,
               BYTE                    isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.EXEC.DLL
  VAL INT DLL.DATA.SIZE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        [DLL.DATA.SIZE]BYTE dll.index
  General DLL data used to identify the DLL.
  
    In        VAL []BYTE params
  This is the data to be sent to the DLL. The size limit is slightly smaller
  that the normal maximum packet size due to the extra information
  sent. (5 bytes)
  
    Out       []BYTE     data
  This is the data to be sent back by the DLL. The size limit is slightly smaller
  that the normal maximum packet size due to the extra information
  sent. (3 bytes)
  
    Out       INT        data.len
  The length of the data sent in 'data'.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure sends a data packet to a DLL and then gets back a reply. The
  DLL could be written by the user.
  
  A fatal error will occur if
  1. 'params' is too large to fit in the data packet.
  2. 'data' is too small to accept the data sent by the DLL.
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC win.exec
PROC win.exec (CHAN OF SP  from.isv, to.isv,
               BYTE        isv.result,
               VAL []BYTE  cmd.line,
               VAL INT16   show.cmd,
               INT16       module.handle)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  VAL BYTE SPR.OK
  VAL BYTE SP.WIN.EXEC
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL []BYTE cmd.line
  The command line to be executed (filename and path of EXE file to execute).
  
    In        VAL INT16  show.cmd
  This is one of the SW.xxxx codes defining how the application will be
  displayed when executed.
  
    Out       INT16      module.handle
  This is the module handle for the application launched. See a Windows
  manual for uses.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure can be used to launch applications. A windows module handle
  is returned for the module initiated.
  
  A server error may occur if
  1. The application file could not be found.
  
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC get.module.usage
PROC get.module.usage (CHAN OF SP from.isv, to.isv,
                       BYTE       isv.result,
                       VAL INT16  module.handle,
                       INT        usage)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SP.GET.MODULE.USAGE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
    In        VAL INT16  module.handle
  This is the Windows handle of the module being investigated.
  
    Out       VAL INT    usage
  The modules reference count. If zero then the module is not being used.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  PROC push.bool            -- All these functions may be used to help prepare --
  PROC push.byte            -- the packet for sending to WIServer or for       --
  PROC push.int16           -- interpreting the results sent back from         --
  PROC push.int32           -- WIServer.                                       --
  PROC push.string
  PROC push.small.string
  PROC push.null.string
  PROC push.null.small.string
  PROC pop.bool
  PROC pop.byte
  PROC pop.int16
  PROC pop.int32
  PROC pop.string
  PROC pop.small.string
  PROC adjust.packet
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure returns the Windows reference count for the module specified.
  The reference count is the number of instances of the module within the system.
  The server uses API GetModuleUsage.
  
  The user should refer to a windows programming manual for details.
  
  The procedure uses 'isv.result' as a rolling error. If, on entry, 'isv.result'
  does not equal 'SPR.OK' then the procedure will do nothing. If an error occurs
  during the procedure or an error value is sent back from the server (along
  'from.isv') then 'isv.error' will be set to the corresponding error value.
  This will prevent other similar procedures from performing actions which may
  exacerbate the problem.
  
  
  PROC sp.multiplex
PROC sp.multiplex (CHAN OF SP   from.isv, to.isv,
                   []CHAN OF SP from.n.isv, to.n.isv,
                   CHAN OF BOOL terminate, terminated)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL INT MAX.PACKET.SIZE
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP   from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP   to.isv
  Channel sending command message to WIServer.
  
    In        []CHAN OF SP to.n.isv
  Channel getting messages from processes for passing to the server.
  
    Out       []CHAN OF SP from.n.isv
  Channel for sending messages from the server onto a process.
  
    In        CHAN OF BOOL terminate
  Channel for getting the terminate signal (FALSE value) for the multiplexor.
  
    Out       CHAN OF BOOL terminated
  Channel for sending a messages out (FALSE value) when multiplexor terminates.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure can be used for supplying server channels for multiple
  processes. The number of processes is defined by the number of elements in
  'from.n.isv' and 'to.n.isv' (they should be the same of course). The channel
  pair 'from.isv' and 'to.isv' should be PLACEd on the server link.
  
  The process may be terminated by sending a FALSE value along 'terminate'.
  A FALSE value will be sent back along 'terminated' just before the process
  terminates.
  
  This procedure could be improved if it was intelligent and knew about
  SP.GET.EVENT. It could get all events for all windows and send back the
  the appropriate event when the appropriate window is requesting and event.
  That way, if there are lots of windows all polling for an event, there
  will only be one process polling across the link to the server.
  
  PROC option.list
PROC option.list (CHAN OF SP from.isv, to.isv,
                  VAL []BYTE window.title,
                             option.list,
                  VAL INT    x, y,
                  VAL BOOL   cancel.ok,
                  INT        option,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.CANCEL
  
  VAL INT16 VK.ESCAPE
  VAL INT16 VK.LBUTTON
  
  VAL INT16 INFO.SYSTEM.ACTIVE.WINDOW
  VAL INT NO.TITLE.TEXT.WIN.STYLE
  VAL INT16 SW.BRING.TO.TOP
  VAL INT16 SW.SET.FOCUS
  VAL INT POLL.PERIOD                  Period between each event poll.
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL []BYTE window.title
  Title of option window. If this parameter is empty then the option window
  appears with no title bar.
  
    In        VAL []BYTE option.list
  The list of options to be displayed. Each option must be seperated by a
  '|' character. NOTE: Last character of the parameter MUST be a '|'.
  e.g.
  
  "Option 1|op 2|three|"
  
  Will give options
  
  
  Option 1
  op 2
  three
  
  
    In        VAL INT    x, y
  Position of the top left of the option window from the top left of the
  screen (in screen units). If both of these parameters are less than zero
  then the window is placed at the current cursor position.
  
    In        VAL BOOL   cancel.ok
  If this parameter is TRUE then the users can press the ESCAPE key to
  cancel the option choice. The 'isv.result' parameter returns SPR.CANCEL
  in this case.
  
    Out       INT        option
  This parameter returns the number of the option selected. Option numbers start
  from zero. e.g.
  
  option.list = "Option 1|op 2|three|"
  
  Will give options
  
  Option 1                option number = 0
  op 2                    option number = 1
  three                   option number = 2
  
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                                 Function
  PROC get.system.information          Gets the active window ID at the begining.
  PROC open.text.window                Used to open option window.
  PROC get.window.handle               Gets the window handle of the option window.
  PROC goto.xy                         Used to place option text.
  PROC write.string                    Used to print option text.
  PROC get.cursor.pos                  Used when option window must appear at cursor position.
  PROC show.window                     Used to keep option window in focus and to restore oritional focus state.
  PROC close.stream                    Used to close option window.
  PROC get.event                       Used to get user input.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure provides a simple way of selecting an option from a list of
  options. It is intended for situations when there is a small message and alot
  of options. Given a list of option names, it will create a small window (size
  depending on the number of options and the longest option name) and wait
  for the user to select the desired option. The procedure keeps the window
  on top of others. NOTE: The procedure needs a mouse.
  
  Possible improvement: If option list contains || then have a blank line at
  the place in the option list.
  
  PROC message.box
PROC message.box (CHAN OF SP from.isv, to.isv,
                  VAL []BYTE window.title,
                             message,
                             options,
                  VAL BOOL   default.ok,
                             cancel.ok,
                  INT        option,
                  BYTE       isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.CANCEL
  
  VAL INT16 VK.ESCAPE
  VAL INT16 VK.RETURN
  VAL INT16 VK.LBUTTON
  
  VAL INT16 INFO.SYSTEM.ACTIVE.WINDOW
  VAL INT NO.TITLE.TEXT.WIN.STYLE
  VAL INT CENTRAL.TEXT.WIN.STYLE
  VAL INT16 SW.BRING.TO.TOP
  VAL INT16 SW.SET.FOCUS
  VAL INT POLL.PERIOD                  Period between each event poll.
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP to.isv
  Channel sending command message to WIServer.
  
    In        VAL []BYTE window.title
  Title of option window. If this parameter is empty then the option window
  appears with no title bar.
  
    In        VAL []BYTE message
  This is the message that appears in the window. '|' characters are treated as
  newlines. e.g.
  
  message = "This is|a message"
  
  Will appear as
  
  This is
  a message
  
  
    In        VAL []BYTE options
  This is the list of options displayed below the message (on one line).
  Each option must be seperated by a '|' character. A '@' character is displayed
  as a space but is not part of the option space.
  e.g.
  
  "Yes@|@No@|@@@@@@CANCEL"
  
  Will appear as
  
  Yes  No       CANCEL
     ^^  ^^^^^^^         Clicking here will NOT cause the option to be selected.
  
    In        VAL BOOL   default.ok
  If this parameter is TRUE then the procedure will return with option = 0
  if the RETURN key is pressed.
  
    In        VAL BOOL   cancel.ok
  If this parameter is TRUE then the users can press the ESCAPE key to
  cancel the option choice. The 'isv.result' parameter returns SPR.CANCEL
  in this case.
  
    Out       INT        option
  This parameter returns the number of the option selected. Option numbers start
  from zero. e.g.
  
  options = "Option 1|op 2|three"
  
  Will give options
  
  Option 1                option number = 0
  op 2                    option number = 1
  three                   option number = 2
  
  
    Bi        BYTE       isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                                 Function
  PROC get.system.information          Gets the active window ID at the begining.
  PROC open.text.window                Used to open option window.
  PROC get.window.handle               Gets the window handle of the option window.
  PROC goto.xy                         Used to place text.
  PROC write.string                    Used to print text.
  PROC get.cursor.pos                  Used when option window must appear at cursor position.
  PROC show.window                     Used to keep option window in focus and to restore oritional focus state.
  PROC close.stream                    Used to close option window.
  PROC get.event                       Used to get user input.
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure provides a simple way of selecting an option from a list of
  options. It is intended for situations when there is a medium sized message and
  a small number of options. Given a list of option names and a message, it will
  create a small window (size depending on the number of options and the size
  of the message) and wait for the user to select the desired option. The
  procedure keeps the window on top of others. NOTE: The procedure needs a mouse.
  
  PROC cancel.cancel
PROC cancel.cancel (BYTE isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  18.01.93.10.mjm              LIB WIServer I/O header library
  25.01.93.01.mjm              WIServer library documentation
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  VAL BYTE SPR.OK
  VAL BYTE SPR.CANCEL
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        BYTE isv.result
  The parameter is (nearly always) the rolling error parameter used in nearly
  all WIServer I/O PROCs. The parameter is changed to SPR.OK only if it
  equals SPR.CANCEL on entry.  
  
    Implicit constants/variables/procedures
  None
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure is provided for use an easy method of screening out
  SPR.CANCEL results when they are not needed. Graphic window library header
Version 2.03	3/9/93
For TDS3 	'graphics.hdr'
For Occam toolset	'grapwin.inc'

  Protocol for graphic stream process
PROTOCOL GRAPHIC.WINDOW.STREAM
  CASE
    add.graphic.line.tag; [4]REAL32    -- Add another line. REAL32 ranges 0.0 - 1.0 --
    flush.graphic.stream.tag           -- Display all buffered lines. --
    clear.graphic.stream.tag           -- Delete all lines. --
    terminate.graphic.stream.tag       -- Exit the buffer process. --
:

 Graphic window library procedure headings
Version 2.03	3/9/93
For TDS3 	'graphics.window'
For Occam toolset	'grapwin.lib

PROC clip.graphic.line (REAL32     x0, y0, x1, y1,
                        BOOL       line.is.visible,
                        VAL REAL32 x.min, y.min, x.max, y.max)
PROC open.graphic.window (CHAN OF SP          from.isv, to.isv,
                          VAL []BYTE          dll.filename,
                          [DLL.DATA.SIZE]BYTE dll.data,
                          VAL INT             x.pos, y.pos, width, height,
                          VAL []BYTE          title,
                          INT16               window.id,
                          BYTE                isv.result)
PROC close.graphic.window (CHAN OF SP          from.isv, to.isv,
                           [DLL.DATA.SIZE]BYTE dll.data,
                           VAL INT16           window.id,
                           BYTE                isv.result)
PROC add.graphic.lines (CHAN OF SP          from.isv, to.isv,
                        [DLL.DATA.SIZE]BYTE dll.data,
                        VAL INT16           window.id,
                        VAL [][4]REAL32     lines,
                        INT                 lines.left,
                        BYTE                isv.result)
PROC clear.all.graphic.lines (CHAN OF SP          from.isv, to.isv,
                              [DLL.DATA.SIZE]BYTE dll.data,
                              VAL INT16           window.id,
                              BYTE                isv.result)
PROC graphic.lines.free (CHAN OF SP          from.isv, to.isv,
                         [DLL.DATA.SIZE]BYTE dll.data,
                         VAL INT16           window.id,
                         INT                 lines.free,
                         BYTE                isv.result)
PROC graphic.line.buffer.process (CHAN OF SP                    from.isv, to.isv,
                                  CHAN OF GRAPHIC.WINDOW.STREAM lines.in,
                                  [DLL.DATA.SIZE]BYTE           dll.data,
                                  VAL INT16                     window.id,
                                  BYTE                          isv.result)

 Graphic window library procedure headings with documentation
Version 2.03	3/9/93
For TDS3 	'graphics.window'
For Occam toolset	'grapwin.lib

  Introduction
A DLL is used (GRAPHWIN.DLL) to allow the creation of resizable graphic
windows. The windows can contain lines used to form diagrams or images. The
lines get rescaled as the window is resized.

NOTE: Every window MUST be closed. If a program crashes before a graphic
window is closed then the DLL will remain in memory and, although the
window will disappear, the memory used to store the lines will not be
freed. Only a certain number of graphic windows may be opened at once, so
if a program keeps crashing, window memory slots will get filled up until
new graphic windows can not be displayed. The computer will have to exit
windows to remove the DLL. (If the user is sneaky, he can load the
GRAPHWIN.DLL using PROC load.dll and then unload it several times using
PROC unload.dll.


  PROC clip.graphic.line
PROC clip.graphic.line (REAL32     x0, y0, x1, y1,
                        BOOL       line.is.visible,
                        VAL REAL32 x.min, y.min, x.max, y.max)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  none
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    Bi        REAL32     x0, y0, x1, y1
  This is the line (x0, y0) - (x1, y1) that mab be clipped. The result
  is a line within the area specified (or no line at all).
  
    Out       BOOL       line.is.visible
  Returns TRUE if a part of the line given in x0, y0, x1, y1 is within the
  specified area. FALSE if it is completely outside.
  
    In        VAL REAL32 x.min, y.min, x.max, y.max
  Parameter specifying the clipping area.
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure takes a line (x0, y0, x1, y1) and clips it so that it lies
  within a specified area (x.min, y.min, x.max, y.max). The line
  may lie outside the area, in which case a flag is raised.
  
  PROC open.graphic.window
PROC open.graphic.window (CHAN OF SP          from.isv, to.isv,
                          VAL []BYTE          dll.filename,
                          [DLL.DATA.SIZE]BYTE dll.data,
                          VAL INT             x.pos, y.pos, width, height,
                          VAL []BYTE          title,
                          INT16               window.id,
                          BYTE                isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  13.08.93.01.mjm              LIB Graphic window header
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.ERROR
  VAL INT DLL.DATA.SIZE
  
    wiserver        18.01.93.11.mjm
  PROC load.dll
  PROC exec.dll
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP          from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP          to.isv
  Channel sending command message to WIServer.
  
    In        VAL []BYTE          dll.filename
  Filename (and path) of DLL to be loaded.
  
    Out       [DLL.DATA.SIZE]BYTE dll.data
  Information about the DLL. Details not required. This array must be
  passed to all other references to the DLL.
  
    In        VAL INT             x.pos, y.pos
  Position of top left of window in screen units.
  
    In        VAL INT             width, height
  Width and height of window in screen units.
  
    In        VAL []BYTE          title
  Title given to the window created.
  
    Out       INT16               window.id
  Handle of the window created.
  
    Bi        BYTE                isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure opens a graphic window. Lines may be added to it using
  PROC add.graphic.lines.
  
  NOTE: The window must be removed with PROC close.graphic.window or the
  DLL instance will not be removed (even if WIServer deletes the window on
  exit). If too many instances build up then the DLL will cease to work.
  
  PROC close.graphic.window
PROC close.graphic.window (CHAN OF SP          from.isv, to.isv,
                           [DLL.DATA.SIZE]BYTE dll.data,
                           VAL INT16           window.id,
                           BYTE                isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  13.08.93.01.mjm              LIB Graphic window header
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.ERROR
  VAL INT DLL.DATA.SIZE
  
    wiserver        18.01.93.11.mjm
  PROC unload.dll
  PROC exec.dll
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP          from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP          to.isv
  Channel sending command message to WIServer.
  
    Bi        [DLL.DATA.SIZE]BYTE dll.data
  Information about the DLL. Details not required. This array must be
  passed to all references to the DLL.
  
    In        VAL INT16           window.id
  Handle of the window to be closed.
  
    Bi        BYTE                isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure destorys a specified graphic window and unloads its
  DLL instance.
  
  NOTE: The window must be removed with PROC close.graphic.window or the
  DLL instance will not be removed (even if WIServer deletes the window on
  exit). If too many instances build up then the DLL will cease to work.
  
  PROC add.graphic.lines
PROC add.graphic.lines (CHAN OF SP          from.isv, to.isv,
                        [DLL.DATA.SIZE]BYTE dll.data,
                        VAL INT16           window.id,
                        VAL [][4]REAL32     lines,
                        INT                 lines.left,
                        BYTE                isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  13.08.93.01.mjm              LIB Graphic window header
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.ERROR
  VAL INT DLL.DATA.SIZE
  
    wiserver        18.01.93.11.mjm
  PROC exec.dll
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP          from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP          to.isv
  Channel sending command message to WIServer.
  
    Bi        [DLL.DATA.SIZE]BYTE dll.data
  Information about the DLL. Details not required. This array must be
  passed to all references to the DLL.
  
    In        VAL INT16           window.id
  Handle of the window.
  
    In        [][4]REAL32         lines
  An array of lines to be displayed in the graphic window. The graphic window
  co-ordinates are (0.0, 0.0) - (1.0, 1.0).
  
    Out       INT                 lines.left
  Number of lines unable to be displayed due to lack of memory.
  
    Bi        BYTE                isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure displays an array of lines in the graphic window specified
  by window.id. The graphic window co-ordinates are (0.0, 0.0) - (1.0, 1.0).
  A fatal error may occur IN THE DLL if the range (0.0 - 1.0) is exceeded.
  User should ensure that all points added wre within range.
  
  The size of the array is not important. More than one PROC exec.dll may
  be executed in order to send all the lines.
  
  PROC clear.all.graphic.lines
PROC clear.all.graphic.lines (CHAN OF SP          from.isv, to.isv,
                              [DLL.DATA.SIZE]BYTE dll.data,
                              VAL INT16           window.id,
                              BYTE                isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  13.08.93.01.mjm              LIB Graphic window header
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.ERROR
  VAL INT DLL.DATA.SIZE
  
    wiserver        18.01.93.11.mjm
  PROC exec.dll
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP          from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP          to.isv
  Channel sending command message to WIServer.
  
    Bi        [DLL.DATA.SIZE]BYTE dll.data
  Information about the DLL. Details not required. This array must be
  passed to all references to the DLL.
  
    In        VAL INT16           window.id
  Handle of the window.
  
    Bi        BYTE                isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure clears all lines from the specified graphic window.
  
  PROC graphic.lines.free
PROC graphic.lines.free (CHAN OF SP          from.isv, to.isv,
                         [DLL.DATA.SIZE]BYTE dll.data,
                         VAL INT16           window.id,
                         INT                 lines.free,
                         BYTE                isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  13.08.93.01.mjm              LIB Graphic window header
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.ERROR
  VAL INT DLL.DATA.SIZE
  
    wiserver        18.01.93.11.mjm
  PROC exec.dll
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP          from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP          to.isv
  Channel sending command message to WIServer.
  
    Bi        [DLL.DATA.SIZE]BYTE dll.data
  Information about the DLL. Details not required. This array must be
  passed to all references to the DLL.
  
    In        VAL INT16           window.id
  Handle of the window.
  
    Out       INT                 lines.free
  Number of lines still able to display in the graphic window specified.
  
    Bi        BYTE                isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure returns the number of lines able to fit in the availiable
  memory of the specified graphic window.
  
  PROC graphic.line.buffer.process
PROC graphic.line.buffer.process (CHAN OF SP                    from.isv, to.isv,
                                  CHAN OF GRAPHIC.WINDOW.STREAM lines.in,
                                  [DLL.DATA.SIZE]BYTE           dll.data,
                                  VAL INT16                     window.id,
                                  BYTE                          isv.result)
    COMMENT PROC Documentation
    Associated documentation
  Ref:                         Title
  13.08.93.01.mjm              LIB Graphic window header
  
    Libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
  none
  
    Implicit libraries used
    lib name        ref
  names of constants, variables, procs, functions and protocols
  
    wiserver.hdr    18.01.93.10.mjm
  PROTOCOL SP
  VAL BYTE SPR.OK
  VAL BYTE SPR.ERROR
  VAL INT DLL.DATA.SIZE
  
    wiserver        18.01.93.11.mjm
  PROC exec.dll
  
    graphics.hdr    13.08.93.01.mjm
  CHAN OF GRAPHIC.WINDOW.STREAM
  
  
    Parameters
    In/Out/Bi Name and Type
  Description of parameter.
  
    In        CHAN OF SP          from.isv
  Channel sending reply message from WIServer.
  
    Out       CHAN OF SP          to.isv
  Channel sending command message to WIServer.
  
    In        CHAN OF GRAPHIC.WINDOW.STREAM lines.in
  Varient protocol channel for control information.
  
    Bi        [DLL.DATA.SIZE]BYTE dll.data
  Information about the DLL. Details not required. This array must be
  passed to all references to the DLL.
  
    In        VAL INT16           window.id
  Handle of the window.
  
    Bi        BYTE                isv.result
  Rolling error parameter. If 'isv.result' (IServer Error) does not equal 'SPR.OK'
  on entry then the procedure will do nothing.
  If an error occurs during the procedure, 'isv.result' will be set to an
  appropriate error value (one of the SPR.xxx codes).
  
  
    Implicit constants/variables/procedures
  Name                      Function
  none
  
    BS6224 Schematic
  none
  
  
    Introduction
  This procedure accepts control information from lines.in. affecting the
  specified graphic window. The control information may be
  
    add.graphic.line.tag; [4]REAL32
      Add a line to the window. The line may be buffered and so may not appear
      right away.
  
    flush.graphic.stream.tag
      All currently buffered lines are displayed.
  
    clear.graphic.stream.tag
      All lines are deleted from the window.
  
    terminate.graphic.stream.tag
      Procedure terminates (and buffered lines are flushed).
  
  The procedure clips all the lines and buffers them to increase the size of
  each SP command (thus speading up communication). The procedure calculates
  the maximum number of lines it can send in one SP command thus maximising
  communication.
  

