/* Bitmap Server - DMS - June 98 - by Sylvain HUET */ /* rev. October 99 - by Sébastien DENEUX (action start added)*/ defcom Cget=get S S I;; typeof bmps=[[S S I] r1];; typeof bmpfiles=[S r1];; fun byalias(x,a)=let x->[n _ _] in !strcmp n a;; fun activate(from,cli,action,param,rep)= if !strcmp action "start" then _DMScreateClientDMI this cli linebuild bmpfiles else if !strcmp action "destroy" then _DMSdelClientDMI this cli else let search_in_list bmps @byalias action -> [x y r] in if x==nil then nil else (_DMScreateClientDMI this cli nil; _DMSsend this cli Cget [x y r]);; fun getbmp(l,x)= if strcmp hd l "bmp" then nil else let l->[_ [x[y[z _]]]] in ( set bmpfiles=y::bmpfiles; set bmps=[x y atoi z]::bmps );; fun IniDMI(file)= _DMSregisterDMI this @activate nil nil nil; let strextr _getpack _checkpack file -> l in apply_on_list l @getbmp 0;;