|
@@ -40,7 +40,7 @@ TYPE
|
|
PluginHandler* = PROCEDURE {DELEGATE} (p: Plugin);
|
|
PluginHandler* = PROCEDURE {DELEGATE} (p: Plugin);
|
|
|
|
|
|
(** Event handler (upcall) *)
|
|
(** Event handler (upcall) *)
|
|
- EventHandler* = PROCEDURE {DELEGATE} (event: LONGINT; plugin: Plugin);
|
|
|
|
|
|
+ EventHandler* = PROCEDURE {DELEGATE} (event: WORD; plugin: Plugin);
|
|
|
|
|
|
(* List item of event handler list *)
|
|
(* List item of event handler list *)
|
|
EventHandlerList = POINTER TO RECORD
|
|
EventHandlerList = POINTER TO RECORD
|
|
@@ -55,7 +55,7 @@ TYPE
|
|
Registry* = OBJECT (Plugin)
|
|
Registry* = OBJECT (Plugin)
|
|
VAR
|
|
VAR
|
|
root: Plugin; (* list of registered plugins, in order of registration *)
|
|
root: Plugin; (* list of registered plugins, in order of registration *)
|
|
- added: LONGINT; (* number of plugins successfully added (for synchronization) *)
|
|
|
|
|
|
+ added: SIZE; (* number of plugins successfully added (for synchronization) *)
|
|
handlers: EventHandlerList; (* list of installed event handlers *)
|
|
handlers: EventHandlerList; (* list of installed event handlers *)
|
|
|
|
|
|
(** Get a specific plugin. If name = "", get the first existing plugin. Return NIL if it was not found. *)
|
|
(** Get a specific plugin. If name = "", get the first existing plugin. Return NIL if it was not found. *)
|
|
@@ -73,7 +73,7 @@ TYPE
|
|
(** Like Get, but wait until the plugin is available. *)
|
|
(** Like Get, but wait until the plugin is available. *)
|
|
|
|
|
|
PROCEDURE Await*(CONST name: ARRAY OF CHAR): Plugin;
|
|
PROCEDURE Await*(CONST name: ARRAY OF CHAR): Plugin;
|
|
- VAR p: Plugin; num: LONGINT;
|
|
|
|
|
|
+ VAR p: Plugin; num: SIZE;
|
|
BEGIN {EXCLUSIVE}
|
|
BEGIN {EXCLUSIVE}
|
|
LOOP
|
|
LOOP
|
|
p := root;
|
|
p := root;
|
|
@@ -100,7 +100,7 @@ TYPE
|
|
(** Get a table of available plugin instances in the registry, in order of registration. If none are available, table = NIL, otherwise LEN(table^) is the number of available plugins. *)
|
|
(** Get a table of available plugin instances in the registry, in order of registration. If none are available, table = NIL, otherwise LEN(table^) is the number of available plugins. *)
|
|
|
|
|
|
PROCEDURE GetAll*(VAR table: Table);
|
|
PROCEDURE GetAll*(VAR table: Table);
|
|
- VAR p: Plugin; num, i: LONGINT;
|
|
|
|
|
|
+ VAR p: Plugin; num, i: SIZE;
|
|
BEGIN {EXCLUSIVE}
|
|
BEGIN {EXCLUSIVE}
|
|
num := 0; p := root; (* get number of entries *)
|
|
num := 0; p := root; (* get number of entries *)
|
|
WHILE p # NIL DO INC(num); p := p.link END;
|
|
WHILE p # NIL DO INC(num); p := p.link END;
|
|
@@ -230,8 +230,8 @@ TYPE
|
|
VAR
|
|
VAR
|
|
main*: Registry; (** registry of all registries (excluding itself) *)
|
|
main*: Registry; (** registry of all registries (excluding itself) *)
|
|
|
|
|
|
-PROCEDURE AppendInt(x: LONGINT; VAR to: ARRAY OF CHAR);
|
|
|
|
-VAR i, m: LONGINT;
|
|
|
|
|
|
+PROCEDURE AppendInt(x: SIZE; VAR to: ARRAY OF CHAR);
|
|
|
|
+VAR i, m: SIZE;
|
|
BEGIN
|
|
BEGIN
|
|
ASSERT(x >= 0);
|
|
ASSERT(x >= 0);
|
|
i := 0; WHILE to[i] # 0X DO INC(i) END;
|
|
i := 0; WHILE to[i] # 0X DO INC(i) END;
|
|
@@ -248,7 +248,7 @@ BEGIN
|
|
to[i] := 0X
|
|
to[i] := 0X
|
|
END AppendInt;
|
|
END AppendInt;
|
|
|
|
|
|
-PROCEDURE GenName(n: LONGINT; VAR registry, plugin: Name);
|
|
|
|
|
|
+PROCEDURE GenName(n: SIZE; VAR registry, plugin: Name);
|
|
BEGIN
|
|
BEGIN
|
|
COPY(registry, plugin);
|
|
COPY(registry, plugin);
|
|
AppendInt(n, plugin)
|
|
AppendInt(n, plugin)
|