hedgewars/uConsole.pas
changeset 3617 1df21e06b8ba
parent 3407 dcc129c4352e
child 3697 d5b30d6373fc
equal deleted inserted replaced
3616:85d69ddb41b6 3617:1df21e06b8ba
    81                         value^.Next:= Variables;
    81                         value^.Next:= Variables;
    82                         Variables:= value
    82                         Variables:= value
    83                         end;
    83                         end;
    84 
    84 
    85 RegisterVariable:= value;
    85 RegisterVariable:= value;
    86 end;
       
    87 
       
    88 procedure FreeVariablesList;
       
    89 var t, tt: PVariable;
       
    90 begin
       
    91 tt:= Variables;
       
    92 Variables:= nil;
       
    93 while tt <> nil do
       
    94       begin
       
    95       t:= tt;
       
    96       tt:= tt^.Next;
       
    97       Dispose(t)
       
    98       end;
       
    99 end;
    86 end;
   100 
    87 
   101 procedure WriteToConsole(s: shortstring);
    88 procedure WriteToConsole(s: shortstring);
   102 var Len: LongInt;
    89 var Len: LongInt;
   103     done: boolean;
    90     done: boolean;
   314     RegisterVariable('flag'    , vtCommand, @chFlag         , false);
   301     RegisterVariable('flag'    , vtCommand, @chFlag         , false);
   315     RegisterVariable('script'  , vtCommand, @chScript       , false);
   302     RegisterVariable('script'  , vtCommand, @chScript       , false);
   316 end;
   303 end;
   317 
   304 
   318 procedure freeModule;
   305 procedure freeModule;
   319 begin
   306 var t, tt: PVariable;
   320     FreeVariablesList();
   307 begin
       
   308     tt:= Variables;
       
   309     Variables:= nil;
       
   310     while tt <> nil do
       
   311     begin
       
   312         t:= tt;
       
   313         tt:= tt^.Next;
       
   314         Dispose(t)
       
   315     end;
   321 end;
   316 end;
   322 
   317 
   323 end.
   318 end.