aboutsummaryrefslogtreecommitdiff
path: root/trunk/examples
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/examples')
-rw-r--r--trunk/examples/Makefile29
-rw-r--r--trunk/examples/glibivyprobe.ml9
-rw-r--r--trunk/examples/ivyivyprobe.ml8
-rw-r--r--trunk/examples/ivyprobe.ml40
-rw-r--r--trunk/examples/tkivyprobe.ml10
5 files changed, 0 insertions, 96 deletions
diff --git a/trunk/examples/Makefile b/trunk/examples/Makefile
deleted file mode 100644
index d110fd0..0000000
--- a/trunk/examples/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# $Id$
-
-OCAMLC = ocamlc -I ..
-OCAMLMLI = ocamlc -I ..
-OCAMLOPT = ocamlopt
-OCAMLDEP=ocamldep
-
-all: ivyprobe.out glibivyprobe.out
-
-ivyprobe.out : ivyprobe.cmo ivyivyprobe.cmo
- $(OCAMLC) -custom -o $@ unix.cma ivy-ocaml.cma $^
-
-glibivyprobe.out : ivyprobe.cmo glibivyprobe.cmo
- $(OCAMLC) -custom -o $@ unix.cma glibivy-ocaml.cma $^
-
-#tkivyprobe.out : ivyprobe.cmo tkivyprobe.cmo
-# $(OCAMLC) -custom -o $@ unix.cma -I +labltk labltk.cma -I . $^
-#tkivyprobe.cmo : OCAMLFLAGS=-I +labltk
-
-%.cmo : %.ml
- $(OCAMLC) -c $<
-
-clean:
- \rm -f *.cm* *.o *.a .depend *~ *.out *.opt .depend *.so
-
-.depend:
- $(OCAMLDEP) $(INCLUDES) *.mli *.ml > .depend
-
-include .depend
diff --git a/trunk/examples/glibivyprobe.ml b/trunk/examples/glibivyprobe.ml
deleted file mode 100644
index fb7e1f3..0000000
--- a/trunk/examples/glibivyprobe.ml
+++ /dev/null
@@ -1,9 +0,0 @@
-(* $Id$ *)
-
-let _ =
- Ivyprobe.init ();
- try
- ignore (GlibIvy.set_up_channel Unix.stdin Ivy.stop (fun _ -> Ivyprobe.read stdin));
- GlibIvy.main ()
- with
- End_of_file -> Ivy.stop ()
diff --git a/trunk/examples/ivyivyprobe.ml b/trunk/examples/ivyivyprobe.ml
deleted file mode 100644
index b51a708..0000000
--- a/trunk/examples/ivyivyprobe.ml
+++ /dev/null
@@ -1,8 +0,0 @@
-let _ =
- Ivyprobe.init ();
- try
- ignore (IvyLoop.set_up_channel Unix.stdin Ivy.stop (fun _ -> Ivyprobe.read stdin));
- IvyLoop.main ()
- with
- End_of_file -> Ivy.stop ()
-
diff --git a/trunk/examples/ivyprobe.ml b/trunk/examples/ivyprobe.ml
deleted file mode 100644
index 47bd2aa..0000000
--- a/trunk/examples/ivyprobe.ml
+++ /dev/null
@@ -1,40 +0,0 @@
-(* $Id$ *)
-
-let print_message app message =
- Printf.printf "%s sent" (Ivy.name_of_client app);
- Array.iter (fun s -> Printf.printf " '%s'" s) message;
- print_newline ()
-
-let read = fun channel ->
- let l = input_line channel in
- Ivy.send l
-
-let watch_clients c e =
- let dis = match e with Ivy.Connected -> "" | Ivy.Disconnected -> "dis" in
- Printf.printf "%s %sconnected from %s\n"
- (Ivy.name_of_client c)
- dis
- (Ivy.host_of_client c);
- flush stdout
-
-let init = fun () ->
- let regexp = ref ""
- and name = ref "MLIVYPROBE"
- and port = ref 2010
- and domain = ref "127.255.255.255" in
- Arg.parse
- [ "-b", Arg.Int (fun x -> port := x), "<Port number>\tDefault is 2010, unused if IVYBUS is set";
- "-domain", Arg.String (fun x -> domain := x), "<Network address>\tDefault is 127.255.255.255, unused if IVYBUS is set";
- "-n", Arg.String (fun s -> name := s), "<Name of the prober>\tDefault is MLIVYPROBE"]
- (fun s -> regexp := s)
- "Usage: ";
-
- let bus =
- try Sys.getenv "IVYBUS" with
- Not_found -> Printf.sprintf "%s:%d" !domain !port in
- Ivy.init !name "READY" watch_clients;
- Ivy.start bus;
-
- Printf.printf "\nEnd of file to stop\n\n"; flush stdout;
-
- ignore (Ivy.bind print_message !regexp)
diff --git a/trunk/examples/tkivyprobe.ml b/trunk/examples/tkivyprobe.ml
deleted file mode 100644
index 67ee3aa..0000000
--- a/trunk/examples/tkivyprobe.ml
+++ /dev/null
@@ -1,10 +0,0 @@
-let _ =
- Ivyprobe.init ();
- let top = Tk.openTk () in
- try
- ignore (TkIvy.set_up_channel Unix.stdin Ivy.stop (fun _ -> Ivyprobe.read stdin));
- TkIvy.main ()
- with
- End_of_file -> Ivy.stop ()
-
-