Ver código fonte

* finalization added with setrawmode(false)

peter 25 anos atrás
pai
commit
64a3b5313d
2 arquivos alterados com 32 adições e 4 exclusões
  1. 25 2
      rtl/linux/ggigraph.pp
  2. 7 2
      rtl/linux/graph.pp

+ 25 - 2
rtl/linux/ggigraph.pp

@@ -90,6 +90,23 @@ implementation
 uses
   linux;
 
+var
+  OldIO : TermIos;
+Procedure SetRawMode(b:boolean);
+Var
+  Tio : Termios;
+Begin
+  if b then
+   begin
+     TCGetAttr(1,Tio);
+     OldIO:=Tio;
+     CFMakeRaw(Tio);
+   end
+  else
+   Tio:=OldIO;
+  TCSetAttr(1,TCSANOW,Tio);
+End;
+
 const
   InternalDriverName = 'LinuxGGI';
 
@@ -509,12 +526,18 @@ begin
   end;
 end;
 
-begin
+initialization
   InitializeGraph;
+  SetRawMode(True);
+finalization
+  SetRawMode(False);
 end.
 {
   $Log$
-  Revision 1.2  2000-05-26 18:21:04  peter
+  Revision 1.3  2000-07-08 21:22:16  peter
+    * finalization added with setrawmode(false)
+
+  Revision 1.2  2000/05/26 18:21:04  peter
     * fixed @ with var parameters
 
   Revision 1.1  2000/03/19 11:20:14  peter

+ 7 - 2
rtl/linux/graph.pp

@@ -589,13 +589,18 @@ end;
        end;
    end;
 
-begin
+initialization
   InitializeGraph;
   SetRawMode(True);
+finalization
+  SetRawMode(False);
 end.
 {
   $Log$
-  Revision 1.17  2000-06-30 22:14:44  peter
+  Revision 1.18  2000-07-08 21:22:16  peter
+    * finalization added with setrawmode(false)
+
+  Revision 1.17  2000/06/30 22:14:44  peter
     * removed unused var
 
   Revision 1.16  2000/06/25 13:38:30  jonas