-- wterm is wide text terminal.
-- Wterm is Copyright (C) 2023 David Lightman ; 
--
--   This program 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 program 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, write to the Free Software
--   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
--
-- Date := "2023-10-20 13:18:00"
-- Version := "0.0.0r"
with W ;
with W.Net ; 
with W.Net.Client ; 
with W.App ; 
with W.App.Engine ; 
with Gnat.Os_Lib;
use Gnat;
procedure Wterm is
   
   
   use W.Net;
   
   Term : W.Term_Enum := W.None;
   
   Envar : Os_Lib.String_Access := Os_Lib.Getenv("TERM");
   
begin
   
   if not (Os_Lib."="(Envar, null)) and then
     Envar'Length > 0 then
      begin
	 Term := W.Term_Enum'Value(Envar.all);
      exception
	 when Constraint_Error =>
	    null;
      end;
   end if;
   declare
      Engine : W.App.Engine.Engine_Record(term);   
   begin
      Client.Client(Engine, "82.64.250.137");   
   end;
end Wterm ;