Commit 71875280 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-03-08 15:40:31 by cvscast] Empty log message

Original author: cvscast
Date: 2003-03-08 15:40:31+00:00
parent 95719ff7
...@@ -534,7 +534,8 @@ struct ...@@ -534,7 +534,8 @@ struct
pl : Normal.t array; pl : Normal.t array;
interface : interface; interface : interface;
codes : return_code array; codes : return_code array;
mutable actions : actions option mutable actions : actions option;
mutable printed : bool
} }
let array_for_all f a = let array_for_all f a =
...@@ -681,7 +682,7 @@ let disp_0 = function ...@@ -681,7 +682,7 @@ let disp_0 = function
pl = pl; pl = pl;
interface = iface; interface = iface;
codes = Array.of_list (List.rev !codes); codes = Array.of_list (List.rev !codes);
actions = None } in actions = None; printed = false } in
incr cur_id; incr cur_id;
dispatchers := DispMap.add (t,pl) res !dispatchers; dispatchers := DispMap.add (t,pl) res !dispatchers;
res res
...@@ -1003,11 +1004,13 @@ let disp_0 = function ...@@ -1003,11 +1004,13 @@ let disp_0 = function
a a
let to_print = ref [] let to_print = ref []
let printed = ref []
module DSET = Set.Make (struct type t = int let compare (x:t) (y:t) = x - y end)
let printed = ref DSET.empty
let queue d = let queue d =
if not (List.mem d.id !printed) then ( if not d.printed then (
printed := d.id :: !printed; d.printed <- true;
to_print := d :: !to_print to_print := d :: !to_print
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment