From d567e908db2e1acec01d0798bd7e8af6c084dba4 Mon Sep 17 00:00:00 2001 From: hattenberger Date: Wed, 1 May 2013 22:48:44 +0000 Subject: remove accidental trunk dir --- trunk/META.glibivy | 4 -- trunk/META.ivy | 4 -- trunk/Makefile | 137 ----------------------------------------- trunk/README | 18 ------ trunk/cglibivy.c | 43 ------------- trunk/civy.c | 93 ---------------------------- trunk/civyloop.c | 70 --------------------- trunk/ctkivy.c | 36 ----------- trunk/debian/changelog | 86 -------------------------- trunk/debian/compat | 1 - trunk/debian/control | 18 ------ trunk/debian/copyright | 27 -------- trunk/debian/rules | 17 ----- trunk/debian/source/format | 1 - trunk/examples/Makefile | 29 --------- trunk/examples/glibivyprobe.ml | 9 --- trunk/examples/ivyivyprobe.ml | 8 --- trunk/examples/ivyprobe.ml | 40 ------------ trunk/examples/tkivyprobe.ml | 10 --- trunk/glibIvy.ml | 8 --- trunk/glibIvy.mli | 13 ---- trunk/ivy.ml | 81 ------------------------ trunk/ivy.mli | 57 ----------------- trunk/ivyLoop.ml | 22 ------- trunk/ivyLoop.mli | 25 -------- trunk/tkIvy.ml | 8 --- trunk/tkIvy.mli | 13 ---- 27 files changed, 878 deletions(-) delete mode 100644 trunk/META.glibivy delete mode 100644 trunk/META.ivy delete mode 100644 trunk/Makefile delete mode 100644 trunk/README delete mode 100644 trunk/cglibivy.c delete mode 100644 trunk/civy.c delete mode 100644 trunk/civyloop.c delete mode 100644 trunk/ctkivy.c delete mode 100644 trunk/debian/changelog delete mode 100644 trunk/debian/compat delete mode 100644 trunk/debian/control delete mode 100644 trunk/debian/copyright delete mode 100755 trunk/debian/rules delete mode 100644 trunk/debian/source/format delete mode 100644 trunk/examples/Makefile delete mode 100644 trunk/examples/glibivyprobe.ml delete mode 100644 trunk/examples/ivyivyprobe.ml delete mode 100644 trunk/examples/ivyprobe.ml delete mode 100644 trunk/examples/tkivyprobe.ml delete mode 100644 trunk/glibIvy.ml delete mode 100644 trunk/glibIvy.mli delete mode 100644 trunk/ivy.ml delete mode 100644 trunk/ivy.mli delete mode 100644 trunk/ivyLoop.ml delete mode 100644 trunk/ivyLoop.mli delete mode 100644 trunk/tkIvy.ml delete mode 100644 trunk/tkIvy.mli diff --git a/trunk/META.glibivy b/trunk/META.glibivy deleted file mode 100644 index 50818cb..0000000 --- a/trunk/META.glibivy +++ /dev/null @@ -1,4 +0,0 @@ -version="1.2" -directory="+ivy" -archive(byte)="glibivy-ocaml.cma" -archive(native)="glibivy-ocaml.cmxa" diff --git a/trunk/META.ivy b/trunk/META.ivy deleted file mode 100644 index 553684e..0000000 --- a/trunk/META.ivy +++ /dev/null @@ -1,4 +0,0 @@ -version="1.2" -directory="+ivy" -archive(byte)="ivy-ocaml.cma" -archive(native)="ivy-ocaml.cmxa" diff --git a/trunk/Makefile b/trunk/Makefile deleted file mode 100644 index 84d8bd4..0000000 --- a/trunk/Makefile +++ /dev/null @@ -1,137 +0,0 @@ -# $Id$ - -DESTDIR = / - -DEBUG = n - - -OCAMLC = ocamlc -OCAMLMLI = ocamlc -OCAMLOPT = ocamlopt -unsafe -OCAMLDEP = ocamldep -OCAMLMKLIB = ocamlmklib - -ifeq ($(DEBUG),y) -OCAMLFLAGS = -g -else -OCAMLFLAGS = -endif - -OCAMLOPTFLAGS= -CFLAGS+=-Wall -OCAMLINC=-I `ocamlc -where` -GLIBINC=`pkg-config --cflags glib-2.0` - -LBITS := $(shell getconf LONG_BIT) -ifeq ($(LBITS),64) - FPIC=-fPIC -endif - -OUTDIR = ivy - - -IVY = ivy.ml ivyLoop.ml - -IVYCMO= $(IVY:.ml=.cmo) -IVYCMI= $(IVY:.ml=.cmi) -IVYMLI= $(IVY:.ml=.mli) -IVYCMX= $(IVY:.ml=.cmx) - -GLIBIVY = ivy.ml glibIvy.ml - -GLIBIVYCMO= $(GLIBIVY:.ml=.cmo) -GLIBIVYCMI= $(GLIBIVY:.ml=.cmi) -GLIBIVYCMX= $(GLIBIVY:.ml=.cmx) - -TKIVY = ivy.ml tkIvy.ml - -TKIVYCMO= $(TKIVY:.ml=.cmo) -TKIVYCMI= $(TKIVY:.ml=.cmi) -TKIVYCMX= $(TKIVY:.ml=.cmx) - -UNAME = $(shell uname -s) - -ifeq ("$(UNAME)","Darwin") - LIBRARYS = -L/opt/local/lib -endif - -LIBS = ivy-ocaml.cma glibivy-ocaml.cma -XLIBS = ivy-ocaml.cmxa glibivy-ocaml.cmxa -TKLIBS = tkivy.cma tkivy.cmxa -STATIC = libivy-ocaml.a libglibivy-ocaml.a ivy-ocaml.a glibivy-ocaml.a -GLIBIVYCMI = glibIvy.cmi -METAFILES = META.ivy META.glibivy - -all : $(LIBS) $(XLIBS) - -deb : - dpkg-buildpackage -rfakeroot - -ivy : ivy-ocaml.cma ivy-ocaml.cmxa -glibivy : glibivy-ocaml.cma glibivy-ocaml.cma -tkivy : $(TKLIBS) - -INST_FILES = $(IVYCMI) $(IVYMLI) $(GLIBIVYCMI) $(LIBS) $(XLIBS) $(STATIC) -# tkIvy.cmi libtkivy.a dlltkivy.so tkivy.a -STUBLIBS = dllivy-ocaml.so dllglibivy-ocaml.so - -install : $(LIBS) - mkdir -p $(DESTDIR)/`ocamlc -where`/$(OUTDIR) - cp $(INST_FILES) $(DESTDIR)/`ocamlc -where`/$(OUTDIR) - mkdir -p $(DESTDIR)/`ocamlc -where`/stublibs - cp $(STUBLIBS) $(DESTDIR)/`ocamlc -where`/stublibs - mkdir -p $(DESTDIR)/`ocamlc -where`/METAS - cp $(METAFILES) $(DESTDIR)/`ocamlc -where`/METAS - mkdir -p $(DESTDIR)/`ocamlc -where` - $(foreach file,$(LIBS) $(XLIBS) $(STATIC) $(IVYCMI) $(IVYMLI) $(GLIBIVYCMI), \ - cd $(DESTDIR)/`ocamlc -where`; ln -s ivy/$(file) $(file);) - -desinstall : - cd `ocamlc -where`; rm -f $(INST_FILES); rm -f METAS/$(METAFILES) - -ivy-ocaml.cma : $(IVYCMO) civy.o civyloop.o - $(OCAMLMKLIB) -o ivy-ocaml $^ $(LIBRARYS) -livy - -ivy-ocaml.cmxa : $(IVYCMX) civy.o civyloop.o - $(OCAMLMKLIB) -o ivy-ocaml $^ $(LIBRARYS) -livy - -glibivy-ocaml.cma : $(GLIBIVYCMO) civy.o cglibivy.o - $(OCAMLMKLIB) -o glibivy-ocaml $^ $(LIBRARYS) -lglibivy `pkg-config --libs glib-2.0` -lpcre - -glibivy-ocaml.cmxa : $(GLIBIVYCMX) civy.o cglibivy.o - $(OCAMLMKLIB) -o glibivy-ocaml $^ $(LIBRARYS) -lglibivy `pkg-config --libs glib-2.0` -lpcre - -tkivy-ocaml.cma : $(TKIVYCMO) civy.o ctkivy.o - $(OCAMLMKLIB) -o tkivy-ocaml $^ $(LIBRARYS) -livy -ltclivy - -tkivy-ocaml.cmxa : $(TKIVYCMX) civy.o ctkivy.o - $(OCAMLMKLIB) -o tkivy-ocaml $^ $(LIBRARYS) -livy -ltclivy - - -.SUFFIXES: -.SUFFIXES: .ml .mli .mly .mll .cmi .cmo .cmx .c .o .out .opt - -.ml.cmo : - $(OCAMLC) $(OCAMLFLAGS) $(INCLUDES) -c $< -.c.o : - $(CC) -Wall -c $(FPIC) -I /opt/local/include/ $(OCAMLINC) $(GLIBINC) $< -.mli.cmi : - $(OCAMLMLI) $(OCAMLFLAGS) -c $< -.ml.cmx : - $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $< -.mly.ml : - ocamlyacc $< -.mll.ml : - ocamllex $< -.cmo.out : - $(OCAMLC) -custom -o $@ unix.cma -I . ivy.cma $< -cclib -livy -.cmx.opt : - $(OCAMLOPT) -o $@ unix.cmxa -I . ivy.cmxa $< -cclib -livy - -clean: - \rm -fr *.cm* *.o *.a .depend *~ *.out *.opt .depend *.so *-stamp debian/ivy-ocaml debian/files debian/ivy-ocaml.debhelper.log debian/ivy-ocaml.substvars debian/*~ - -.depend: - $(OCAMLDEP) $(INCLUDES) *.mli *.ml > .depend - -include .depend diff --git a/trunk/README b/trunk/README deleted file mode 100644 index 03b8864..0000000 --- a/trunk/README +++ /dev/null @@ -1,18 +0,0 @@ -OCaml (caml.org) bindings for the Ivy library (www.tls.cena.fr/products/ivy). - -Two libraries are provided: - - ivy-ocaml, running with the Ivy main loop (module IvyLoop) - - glibivy-ocaml, running with the Glib main loop (provided by lablgtk) - -Installation: - - Requires the OCaml compiler and the ivy-c library - - "make" to compile - - "make install" to set the files (DESTDIR may be specified) - - "examples" directory contains the ivyprobe program for both main loops -("make ivyivyprobe.out" and "make glibivyprobe.out") - -Documentation: - - The Ivy documentation (www.tls.cena.fr/products/ivy) - - The .mli files (ivy.mli, ivyLoop.mli and glibIvy.mli) - -Maintainer: Gautier Hattenberger (gautier dot hattenberger at enac dot fr) diff --git a/trunk/cglibivy.c b/trunk/cglibivy.c deleted file mode 100644 index 8241b70..0000000 --- a/trunk/cglibivy.c +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -value ivy_GtkmainLoop(value unit) -{ - g_main_loop_run(g_main_loop_new(NULL, FALSE)); - return Val_unit; -} - -extern void cb_delete_channel(void *delete_read); -extern void cb_read_channel(Channel ch, IVY_HANDLE fd, void *closure); -extern void cb_write_channel(Channel ch, IVY_HANDLE fd, void *closure); - -value ivy_GtkchannelSetUp(value fd, value closure_name) -{ - Channel c; - value * closure = caml_named_value(String_val(closure_name)); - -#if IVYMINOR_VERSION == 8 - c = IvyChannelAdd((IVY_HANDLE)Int_val(fd), (void*)closure, cb_delete_channel, cb_read_channel); -#else - c = IvyChannelAdd((IVY_HANDLE)Int_val(fd), (void*)closure, cb_delete_channel, cb_read_channel, cb_write_channel); -#endif - return Val_int(c); -} - -value ivy_GtkchannelClose(value ch) -{ - IvyChannelRemove((Channel)Long_val(ch)); - return Val_unit; -} diff --git a/trunk/civy.c b/trunk/civy.c deleted file mode 100644 index 563f7ec..0000000 --- a/trunk/civy.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -value ivy_sendMsg(value msg) -{ - IvySendMsg(String_val(msg)); - return Val_unit; -} - -value ivy_stop(value unit) -{ - IvyStop (); - return Val_unit; -} - - -void app_cb(IvyClientPtr app, void *user_data, IvyApplicationEvent event ) -{ - value closure = *(value*)user_data; - callback2(closure, Val_int(app), Val_int(event)); -} - -value ivy_init(value vappName, value vready, value closure_name) -{ - value * closure = caml_named_value(String_val(closure_name)); - char * appName = malloc(strlen(String_val(vappName))+1); /* Memory leak */ - strcpy(appName, String_val(vappName)); - char * ready = malloc(strlen(String_val(vready))+1); /* Memory leak */ - strcpy(ready, String_val(vready)); - IvyInit(appName, ready, app_cb, (void*)closure, 0, 0); /* When the "die callback" is called ??? */ - return Val_unit; -} - -value ivy_start(value bus) -{ - IvyStart(String_val(bus)); - return Val_unit; -} - -void ClosureCallback(IvyClientPtr app, void *closure, int argc, char **argv) -{ - char* t[argc+1]; - int i; - /* Copie de argv dans t avec ajout d'un pointeur nul a la fin */ - for(i=0; i < argc; i++) t[i] = argv[i]; - t[argc] = (char*)0L; - callback2(*(value*)closure, Val_long(app), copy_string_array((char const **)t)); -} - -value ivy_bindMsg(value cb_name, value regexp) -{ - value * closure = caml_named_value(String_val(cb_name)); - MsgRcvPtr id = IvyBindMsg(ClosureCallback, (void*)closure, String_val(regexp)); - return Val_long(id); -} - -value ivy_unbindMsg(value id) -{ - IvyUnbindMsg((MsgRcvPtr)Long_val(id)); - return Val_unit; -} - -value ivy_name_of_client(value c) -{ - return copy_string(IvyGetApplicationName((IvyClientPtr)Long_val(c))); -} -value ivy_host_of_client(value c) -{ - return copy_string(IvyGetApplicationHost((IvyClientPtr)Long_val(c))); -} - -void cb_delete_channel(void *delete_read) -{ -} - -void cb_write_channel(Channel ch, IVY_HANDLE fd, void *closure) -{ -} - -void cb_read_channel(Channel ch, IVY_HANDLE fd, void *closure) -{ - callback(*(value*)closure, Val_int(ch)); -} diff --git a/trunk/civyloop.c b/trunk/civyloop.c deleted file mode 100644 index 083b104..0000000 --- a/trunk/civyloop.c +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -value ivy_mainLoop(value unit) -{ -#if IVYMINOR_VERSION == 8 - IvyMainLoop (NULL,NULL); -#else - IvyMainLoop (); -#endif - return Val_unit; -} - -void timer_cb(TimerId id, void *data, unsigned long delta) -{ - value closure = *(value*)data; - callback(closure, Val_long(id)); -} - -value ivy_timerRepeatafter(value nb_ticks,value delay, value closure_name) -{ - value * closure = caml_named_value(String_val(closure_name)); - TimerId id = TimerRepeatAfter(Int_val(nb_ticks), Int_val(delay), timer_cb, (void*)closure); - return Val_int(id); -} - -/* Data associated to Channel callbacks is the couple of delete and -read closures */ - -extern void cb_delete_channel(void *delete_read); -extern void cb_read_channel(Channel ch, IVY_HANDLE fd, void *closure); -extern void cb_write_channel(Channel ch, IVY_HANDLE fd, void *closure); - - -value ivy_channelSetUp(value fd, value closure_name) -{ - Channel c; - value * closure = caml_named_value(String_val(closure_name)); - -#if IVYMINOR_VERSION == 8 - c = IvyChannelAdd((IVY_HANDLE)Int_val(fd), (void*)closure, cb_delete_channel, cb_read_channel); -#else - c = IvyChannelAdd((IVY_HANDLE)Int_val(fd), (void*)closure, cb_delete_channel, cb_read_channel, cb_write_channel); -#endif - return Val_int(c); -} - -value ivy_timerRemove(value t) -{ - TimerRemove((TimerId)Long_val(t)); - return Val_unit; -} - - -value ivy_channelClose(value ch) -{ - IvyChannelRemove((Channel)Long_val(ch)); - return Val_unit; -} diff --git a/trunk/ctkivy.c b/trunk/ctkivy.c deleted file mode 100644 index 87b7eb6..0000000 --- a/trunk/ctkivy.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ivytcl.h" - -extern void cb_delete_channel(void *delete_read); -extern void cb_read_channel(Channel ch, IVY_HANDLE fd, void *closure); - -value ivy_TclmainLoop(value unit) -{ - Tk_MainLoop(); - return Val_unit; -} - - -value ivy_TclchannelSetUp(value fd, value closure_name) -{ - Channel c; - value * closure = caml_named_value(String_val(closure_name)); - - c = IvyTclChannelSetUp((IVY_HANDLE)Int_val(fd), (void*)closure, cb_delete_channel, cb_read_channel); - return Val_int(c); -} - -value ivy_TclchannelClose(value ch) -{ - IvyTclChannelClose((Channel)Int_val(ch)); - return Val_unit; -} diff --git a/trunk/debian/changelog b/trunk/debian/changelog deleted file mode 100644 index dbcced8..0000000 --- a/trunk/debian/changelog +++ /dev/null @@ -1,86 +0,0 @@ -ivy-ocaml (1.2) unstable; urgency=low - - * Add META file for ocamlfind support - * Move installed files in ivy subdirectory - * Remove -ocaml suffix - * Symbolic link for backward compatibility - * Update for ocaml 3.12.1 - * Increase minor version number - - -- Gautier Hattenberger Thu, 21 Feb 2013 09:53:31 +0100 - -ivy-ocaml (1.1-14~precise) precise; urgency=low - - * updated version for ubuntu precise ppa build - - -- Felix Ruess Wed, 04 Apr 2012 15:27:59 +0200 - -ivy-ocaml (1.1-13) unstable; urgency=low - - * Update for ocaml 1.12.0 - - -- Gautier Hattenberger Tue, 18 Oct 2011 17:53:31 +0100 - -ivy-ocaml (1.1-12.1) unstable; urgency=low - - * Non-maintainer upload - * Updated all debian files to use dh (debhelper 7) - - -- Felix Ruess Fri, 21 Oct 2011 19:47:25 +0200 - -ivy-ocaml (1.1-12) unstable; urgency=low - - * Support for ivy-c_3.11.8 - - -- Gautier Hattenberger Wed, 02 Feb 2011 17:49:31 +0100 - -ivy-ocaml (1.1-11) unstable; urgency=low - - * Support of ivy-c_3.11.6, OSX and Linux 64bit - - -- Gautier Hattenberger Wed, 1 Dec 2010 10:43:29 +0100 - -ivy-ocaml (1.1-10) unstable; urgency=low - - * Updated for ocaml 3.11.2 - - -- Pascal Brisset (Hecto) Thu, 25 Feb 2010 09:58:29 +0100 - -ivy-ocaml (1.1-7) unstable; urgency=low - - * Updated for ocaml 3.10.2 - - -- Pascal Brisset (Hecto) Fri, 23 May 2008 23:18:00 +0200 - -ivy-ocaml (1.1-6) unstable; urgency=low - - * Updated for ocaml 3.10.1 - - -- Pascal Brisset (Hecto) Mon, 25 Feb 2008 10:31:49 +0100 - -ivy-ocaml (1.1-5) unstable; urgency=low - - * Updated for ocaml 3.10 - - -- Pascal Brisset (Hecto) Tue, 04 Sep 2007 20:41:49 +0200 - -ivy-ocaml (1.1-4) unstable; urgency=low - - * Updated for ocaml 3.09.2-6 - - -- Antoine Drouin (Poine) Fri, 04 Aug 2006 13:40:54 +0200 - -ivy-ocaml (1.1-3) unstable; urgency=low - - * Updated for ivy 3.8 - - -- Antoine Drouin (Poine) Fri, 28 Jul 2006 13:40:54 +0200 - -ivy-ocaml (1.0-2) unstable; urgency=low - - * Updated for ocaml 3.09 - - * Initial Release. - - -- Pascal Brisset (Hecto) Thu, 7 Oct 2004 13:40:54 +0200 - diff --git a/trunk/debian/compat b/trunk/debian/compat deleted file mode 100644 index 7f8f011..0000000 --- a/trunk/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/trunk/debian/control b/trunk/debian/control deleted file mode 100644 index 4bba10f..0000000 --- a/trunk/debian/control +++ /dev/null @@ -1,18 +0,0 @@ -Source: ivy-ocaml -Section: net -Priority: optional -Maintainer: Gautier Hattenberger -Build-Depends: debhelper (>= 7.0.50~), dh-ocaml (>= 0.9.0), ocaml-nox, libglib2.0-dev, libpcre3-dev, ivy-c-dev (>=3.11) -Standards-Version: 3.9.2 -Homepage: http://www2.tls.cena.fr/products/ivy/ -Vcs-Svn: http://svn.tls.cena.fr/svn/ivy/ivy-ocaml/trunk -Vcs-Browser: http://svn.tls.cena.fr/wsvn/ivy/ivy-ocaml/trunk/#_ivy-ocaml_trunk_ - -Package: ivy-ocaml -Architecture: any -Depends: ${ocaml:Depends}, ${shlibs:Depends}, ${misc:Depends}, ivy-c(>= 3.11) -Suggests: ocaml-findlib -Provides: ${ocaml:Provides} -Description: Ocaml binding for the Ivy software bus - This package provides the bindings for the Ivy software bus. Standalone - linking and with the glib mainloop are provided. diff --git a/trunk/debian/copyright b/trunk/debian/copyright deleted file mode 100644 index 5ee9dea..0000000 --- a/trunk/debian/copyright +++ /dev/null @@ -1,27 +0,0 @@ -Format: http://dep.debian.net/deps/dep5 -Upstream-Name: ivy-ocaml -Source: http://www2.tls.cena.fr/products/ivy/ - -Files: * -Copyright: 2005-2011 CENA -License: - LGPL - see also http://www2.tls.cena.fr/products/ivy/download/legalissues.html -Files: debian/* -Copyright: 2011 Felix Ruess -License: GPL-2+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see - . - On Debian systems, the complete text of the GNU General - Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/trunk/debian/rules b/trunk/debian/rules deleted file mode 100755 index 6827cc6..0000000 --- a/trunk/debian/rules +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ --with ocaml - -override_dh_auto_install : - $(MAKE) install DESTDIR=$(CURDIR)/debian/ivy-ocaml - diff --git a/trunk/debian/source/format b/trunk/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/trunk/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) 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), "\tDefault is 2010, unused if IVYBUS is set"; - "-domain", Arg.String (fun x -> domain := x), "\tDefault is 127.255.255.255, unused if IVYBUS is set"; - "-n", Arg.String (fun s -> name := s), "\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 () - - diff --git a/trunk/glibIvy.ml b/trunk/glibIvy.ml deleted file mode 100644 index 17919c5..0000000 --- a/trunk/glibIvy.ml +++ /dev/null @@ -1,8 +0,0 @@ - -type channel -external main : unit -> unit = "ivy_GtkmainLoop" -external ext_channelSetUp : Unix.file_descr -> string -> channel = "ivy_GtkchannelSetUp" -let set_up_channel fd delete read = - ext_channelSetUp fd (Ivy.cb_register read) -external close_channel : channel -> unit = "ivy_GtkchannelClose" - diff --git a/trunk/glibIvy.mli b/trunk/glibIvy.mli deleted file mode 100644 index 3df31b6..0000000 --- a/trunk/glibIvy.mli +++ /dev/null @@ -1,13 +0,0 @@ -val main : unit -> unit -(** Glib main loop *) - -type channel -(** Channel handled by the main loop *) - -val set_up_channel : Unix.file_descr -> (unit -> unit) -> (channel -> unit) -> channel -(** [set_up_channel fd delete read] gives the opportunity to the main loop -to call [read] when data is available on [fd] and [delete] when [fd] is -closed *) - -val close_channel : channel -> unit -(** Stops the handling of a channel by the main loop *) diff --git a/trunk/ivy.ml b/trunk/ivy.ml deleted file mode 100644 index f031252..0000000 --- a/trunk/ivy.ml +++ /dev/null @@ -1,81 +0,0 @@ -(* $Id$ *) - - -type binding -type client -type client_event = Connected | Disconnected -type cb = client -> string array -> unit -type client_cb = client -> client_event -> unit - -external send : string -> unit = "ivy_sendMsg" -external stop : unit -> unit = "ivy_stop" -external ext_init : string -> string -> string -> unit = "ivy_init" - - -let gensym = let n = ref 0 in fun p -> incr n; p ^ string_of_int !n -let cb_register = fun closure -> - let s = gensym "callback_" in - Callback.register s closure; - s - -let init = fun name ready ccb -> - ext_init name ready (cb_register ccb) - - -external start : string -> unit = "ivy_start" -external ext_bind : string -> string -> binding = "ivy_bindMsg" - -let bind = fun (cb:cb) regexp -> - ext_bind (cb_register cb) regexp - -external unbind : binding -> unit = "ivy_unbindMsg" - - -external name_of_client : client -> string = "ivy_name_of_client" -external host_of_client : client -> string = "ivy_host_of_client" - - - -let marshal_tag = "MARSHAL" - -let hexa_char = fun c -> - assert(0 <= c && c < 16); - if c < 10 then - Char.chr (c + Char.code '0') - else - Char.chr (c + Char.code 'A' - 10) - -let hexa_code = fun c -> - if '0' <= c && c <= '9' then - Char.code c - Char.code '0' - else if 'A' <= c && c <= 'F' then - Char.code c - Char.code 'A' + 10 - else failwith (Printf.sprintf "hexa_code: %c" c) - - -let hexa_of_string = fun s -> - let n = String.length s in - let h = String.create (n*2) in - for i = 0 to n - 1 do - let c = Char.code s.[i] in - h.[2*i] <- hexa_char (c lsr 4); - h.[2*i+1] <- hexa_char (c land 0xf) - done; - h - -let string_of_hexa = fun h -> - let n = String.length h / 2 in - let s = String.create n in - for i = 0 to n - 1 do - s.[i] <- Char.chr (hexa_code h.[2*i] lsl 4 + hexa_code h.[2*i+1]) - done; - s - - -let send_data = fun tag value -> - let s = hexa_of_string (Marshal.to_string value []) in - send (Printf.sprintf "%s %s %s" marshal_tag tag s) - -let data_bind = fun cb tag -> - let r = Printf.sprintf "%s %s (.*)" marshal_tag tag in - bind (fun c a -> cb c (Marshal.from_string (string_of_hexa a.(0)) 0)) r diff --git a/trunk/ivy.mli b/trunk/ivy.mli deleted file mode 100644 index 9bbab0c..0000000 --- a/trunk/ivy.mli +++ /dev/null @@ -1,57 +0,0 @@ -(** $Id$ *) - -(** Interface for ivy-c (http://www.tls.cena.fr/products/ivy/) *) - -type binding -(** Identification of bindings (callback/message) *) - -type client -(** Identification of client applications *) - -val name_of_client : client -> string -val host_of_client : client -> string -(** Access to client identification *) - -type client_event = Connected | Disconnected -(** Status of (de)connecting applications *) - -type cb = client -> string array -> unit -(** Profile of message binding callback *) - -type client_cb = client -> client_event -> unit -(** Profile of callback for (de)connecting applications *) - -val init : string -> string -> client_cb -> unit -(** [init name ready cb] initializes the application as an IVY client, -identifying itself with [name], first sending the [ready] message. [cb] -will be called each time a new application (de)connects to this IVY bus. *) - -val start : string -> unit -(** [start bus] starts the connection to machine/network/port specified in -[bus]. Syntax for [bus] is ["IPaddress:port"] *) - -val bind : cb -> string -> binding -(** [bind cb regexp] binds callback [cb] to messages matching the [regexp] -regular expression. [cb] will be called with the array of matching groups -defined in [regexp]. *) - -val send : string -> unit -(** [send message] sends a message to the IVY initialized bus *) - -val stop : unit -> unit -(** Exits the main loop *) - -val unbind : binding -> unit -(** Removes a message binding *) - -val send_data : string -> 'a -> unit -(** [send_data tag value] marshals [value] into a string and sends it with -[tag] over the IVY bus *) - -val data_bind : (client -> 'a -> unit) -> string -> binding -(** [data_bind cb tag] binds [cb] to IVY messages sent with [send_data] and -tagged with [tag]. This operation IS NOT type safe.*) - -(***) - -val cb_register : ('a -> 'b) -> string diff --git a/trunk/ivyLoop.ml b/trunk/ivyLoop.ml deleted file mode 100644 index 5808de4..0000000 --- a/trunk/ivyLoop.ml +++ /dev/null @@ -1,22 +0,0 @@ -type channel -type delete_channel_cb = unit -> unit -type timer -type timer_cb = timer -> unit - -external ext_timer : int -> int -> string -> timer = "ivy_timerRepeatafter" - -let timer = fun n t cb -> - let closure_name = Ivy.cb_register cb in - ext_timer n t closure_name - -external remove_timer : timer -> unit = "ivy_timerRemove" - -external main : unit -> unit = "ivy_mainLoop" - -external ext_channelSetUp : Unix.file_descr -> string -> channel = "ivy_channelSetUp" -external close_channel : channel -> unit = "ivy_channelClose" - - -type read_channel_cb = channel -> unit -let set_up_channel fd delete read = - ext_channelSetUp fd (Ivy.cb_register read) diff --git a/trunk/ivyLoop.mli b/trunk/ivyLoop.mli deleted file mode 100644 index 5c84843..0000000 --- a/trunk/ivyLoop.mli +++ /dev/null @@ -1,25 +0,0 @@ -val main : unit -> unit -(** Starts the loop which handles asynchronous communications. The standard -version does not return until IVY is explictly stopped *) - -type channel -(** Channel handled by the main loop *) - -val set_up_channel : Unix.file_descr -> (unit -> unit) -> (channel -> unit) -> channel -(** [set_up_channel fd delete read] gives the opportunity to the main loop -to call [read] when data is available on [fd] and [delete] when [fd] is -closed *) - -val close_channel : channel -> unit -(** Stops the handling of a channel by the main loop *) - -type timer -(** Timer identifier *) - -val timer : int -> int -> (timer -> unit) -> timer -(** [timer n ms cb] sets a timer which will call [n] times the callback [cb] -with a period of [ms] milliseconds *) - -val remove_timer : timer -> unit -(** [remove_timer t] stops the timer [t] *) - diff --git a/trunk/tkIvy.ml b/trunk/tkIvy.ml deleted file mode 100644 index 907baa9..0000000 --- a/trunk/tkIvy.ml +++ /dev/null @@ -1,8 +0,0 @@ - -type channel -external main : unit -> unit = "ivy_TclmainLoop" -external ext_channelSetUp : Unix.file_descr -> string -> channel = "ivy_TclchannelSetUp" -let set_up_channel fd delete read = - ext_channelSetUp fd (Ivy.cb_register read) -external close_channel : channel -> unit = "ivy_TclchannelClose" - diff --git a/trunk/tkIvy.mli b/trunk/tkIvy.mli deleted file mode 100644 index 9d56a4d..0000000 --- a/trunk/tkIvy.mli +++ /dev/null @@ -1,13 +0,0 @@ -val main : unit -> unit -(** Tk main loop *) - -type channel -(** Channel handled by the main loop *) - -val set_up_channel : Unix.file_descr -> (unit -> unit) -> (channel -> unit) -> channel -(** [set_up_channel fd delete read] gives the opportunity to the main loop -to call [read] when data is available on [fd] and [delete] when [fd] is -closed *) - -val close_channel : channel -> unit -(** Stops the handling of a channel by the main loop *) -- cgit v1.1