/* HTTP server 1.0, DMI editor - May 1999 - by Vincent CARON */ typeof ed_port=ObjText;; typeof ed_root=ObjText;; typeof bt_root=ObjButton;; typeof open_bmp=ObjBitmap;; typeof editWin=ObjWin;; fun load (l) = if (l==nil) then 0 else let l -> [line _tail] in let line -> [param x] in let x -> [value _] in { if (!strcmpi param "HTTPport") then (_SETtext ed_port value; 0) else if (!strcmpi param "HTTProot") then (_SETtext ed_root value; 0) else 0; load _tail; };; fun getParam()= ("HTTPport"::(_GETtext ed_port)::nil):: ("HTTProot"::(_GETtext ed_root)::nil)::nil;; fun save (filename, n)= ("register"::"Dms/CommTools/HTTPserver/HTTPserver.pkg"::nil):: ("action"::"url_in"::nil):: ("event"::"url_out"::nil):: getParam;; fun rflSizeEditWin (wn, blurp, w, h)= _SIZEtext ed_root w-105 20 59 43; _POSITIONbutton bt_root w-33 42 22 22; 0;; /* fun rflBrowse(obj,x,pack)= let _PtoScol pack -> path in let strlen _GetFileNameFromP pack -> flen in _SETtext ed_root substr path 0 (strlen path)-flen-1;; fun rflBrowseButton(bt,x)= let _DLGOpenFile _channel editWin (_GETtext ed_root) nil "Tous (*.*)\0*.*\0\0" -> dlg in _DLGrflopen dlg @rflBrowse nil; 0;;*/ fun IniEditor(s)= let [300 75] -> [w h] in let startEditor _channel nil nil nil w h WN_NORMAL EDITOR_NORMAL s "Dms/CommTools/HTTPserver/HTTPserver.dmc" nil nil @load @save nil -> ed in ( set editWin = getEditWin ed; _CBwinSize editWin @rflSizeEditWin 0; _CRtext _channel editWin 16 20 40 20 ET_ALIGN_RIGHT (_locEditor "560-HTTPSE-port:" nil); _CRtext _channel editWin 16 45 40 20 ET_ALIGN_RIGHT (_locEditor "570-HTTPSE-root:" nil); set ed_port=_CReditLine _channel editWin 59 18 50 20 ET_AHSCROLL+ET_DOWN "80"; set ed_root=_CReditLine _channel editWin 59 43 w-105 20 ET_AHSCROLL+ET_DOWN ""; /*set bt_root=_CRbuttonBitmap _channel editWin set open_bmp = _LDbitmap _channel _checkpack "Dms/commtools/httpserver/open.bmp" w-33 42 22 22 0;*/ /*_CBbutton bt_root @rflBrowseButton 0;*/ if s==nil then nil else openDMI ed ); 0;;