!VAX! %constant %string (3) Null Device = "NL:"
{APM} %constant %string Null Device = ":N"

%external %routine %spec Initialise Heap Space %alias "IE_INIT_HEAP"
%external %routine %spec Reset Heap Space      %alias "IE_RESET_HEAP"

!VAX!%external %record (*) %map %spec new      %alias "IE_NEW" %c
!VAX!                                          (%record (*) %name R)
!VAX!%external %routine %spec         dispose  %alias "IE_DISPOSE" (%name whatever)

%constant %integer Max Line Length = 65535

%record %format line fm (%record (line fm) %name last, next,
                         %byte bits,
                         %byte Spare1, Spare2, Spare3,
                         %integer Max Length,
                                  Length,
                         %byte %array text (1 : 256))

%constant %integer Size of Line fm = 20
!!!%own %record (Line fm) Size Of Line fm

%external %record (Line fm) %map %spec New Line FM %alias "IE_NEW_LINE" %c
                                                   (%integer Characters)
%external %routine %spec Dispose Line FM %alias "IE_DISPOSE_LINE" %c
                                         (%record (Line Fm) %name L)

%constant %integer untouched      = 2_00000001,
                   displayed      = 2_00000010,
                   contains CCs   = 2_00000100,
                   marked         = 2_00001000,
                   pseudo line    = 2_00010000,
                   Magic Markered = 2_00100000

%record %format marker fm (%string (31) name,
                           %integer pos,
                           %record (line fm) %name line,
                           %record (marker fm) %name next)
!!!%constant %integer Size Of Marker fm = 44
%own %record (Marker fm) Size Of Marker fm

%record %format Magic Marker fm (%integer pos,
                                 %record (line fm) %name line,
                                 %record (magic marker fm) %name next)
!!!%constant %integer Size Of Magic Marker fm = 12
%own %record (Magic Marker fm) Size Of Magic Marker fm

%record %format buffer fm (%string (31) name,
                           %string (127) source file,
                           %record (line fm) %name first, last,
                           %record (line fm) %name current,
                           %integer pos,
                           %record (marker fm) %name markers,
                           %record (Magic Marker fm) %name Magic Markers,
                           %record (buffer fm) %name next,
                           %integer access,
                                    changed)
!!!%constant %integer Size Of Buffer fm = 196
%own %record (Buffer fm) Size Of Buffer fm

%external %routine %spec load buffer %alias "IE_LOAD_BUFFER" %c
                                     (%record (buffer fm) %name buffer,
                                      %string (127) file name)

%external %routine %spec unload buffer %alias "IE_UNLOAD_BUFFER" %c
                                       (%record (buffer fm) %name buffer,
                                        %string (127) file name)

%external %routine %spec bulk move %alias "IE_BULK_MOVE" %c
                                   (%integer bytes,
                                    %byte %name from, to)

%external %integer %function %spec find string %alias "IE_FIND_STRING" %c
                                               (%integer mode,
                                                %string (*) %name F, 
                                                %integer Start,
                                                %record (Line fm) %name L)
%external %integer %function %spec Reverse find string %alias "IE_REV_FIND" %c
                                               (%integer mode,
                                                %string (*) %name F, 
                                                %integer Start,
                                                %record (Line fm) %name L)

                                                
!VAX!%external %routine %spec set wild file spec %alias "IE_SET_WILD" %c
!VAX!                                            (%string (*) %name spec)
!VAX!%external %string (127) %function %spec next wild file %alias "IE_NEXT_WILD"

!VAX!%external %integer %function %spec Default Access %alias "IE_DEFAULT_ACCESS"
!VAX!%external %string (127) %spec Default Filename %alias "IE_DEFAULT_FILE_NAME"
!VAX!%external %integer %spec Interrupted %alias "IE_INTERRUPTED"

{APM}%constant %string (31) Old Journal  = "$IE_OLD_J"
!VAX!%constant %string (31) Old Journal  = "IE_JOURNAL:;1"

%external %routine %spec Scrap Journal File %alias "IE_J_SCRAP"
%external %routine %spec Keep Journal File  %alias "IE_J_KEEP"
%external %routine %spec Set Journal Frequency %alias "IE_J_SET" (%integer n)
%external %routine %spec Put Journal Symbol %alias "IE_J_PUT" (%integer Sym)
%external %routine %spec Put Journal Integer %alias "IE_J_INT" (%integer N)
%external %routine %spec Put Journal String %alias "IE_J_STRING" (%string (255) S)

{wierdies}

{APM} %external %routine %spec Quote Password %alias "quote" %c
{APM}                          (%string (255) Pass)
{APM} %dynamic %routine %spec Obey Stream (%string (255) Param)

!VAX! %external %routine %spec Notify %alias "IE_NOTIFY" %c
!VAX!                                 (%string (12) User Name,
!VAX!                                  %string (80) Message)

%end %of %file
