/* Text Server - DMS - June 98 - by Sylvain HUET */ /* rev. October 99 - by Sébastien DENEUX (action start added)*/ defcom Cget=get S S S;; typeof bmps=[[S S S] r1];; typeof textfiles=[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 textfiles else if !strcmp action "destroy" then _DMSdelClientDMI this cli else let search_in_list bmps @byalias action -> [alias file params] in if alias == nil then nil else ( _DMScreateClientDMI this cli nil; _DMSsend this cli Cget [alias file params] ) ;; fun getbmp(l,x)= if strcmp hd l "text" then nil else let l -> [_ [alias [file [params _]]]] in ( set textfiles = file::textfiles; set bmps = [alias file params]::bmps ) ;; fun IniDMI(file)= _DMSregisterDMI this @activate nil nil nil; let strextr _getpack _checkpack file -> l in apply_on_list l @getbmp 0;;