hedgewars/uConsole.pas
branchhedgeroid
changeset 6027 302408e45052
parent 5661 45618bdce725
child 6033 6bcc36225162
equal deleted inserted replaced
6025:cac1d5601d7c 6027:302408e45052
    89 PByte(@ConsoleLines[CurrLine].s)^:= 0
    89 PByte(@ConsoleLines[CurrLine].s)^:= 0
    90 {$ENDIF}
    90 {$ENDIF}
    91 {$ENDIF}
    91 {$ENDIF}
    92 end;
    92 end;
    93 
    93 
       
    94 function ShortStringAsPChar(s: ShortString) : PChar;
       
    95 begin
       
    96     if Length(S) = High(s) then Dec(s[0]);
       
    97     s[Ord(Length(s))+1] := #0;
       
    98     Result := @S[1];
       
    99 end;
    94 
   100 
    95 function GetLastConsoleLine: shortstring;
   101 function GetLastConsoleLine: shortstring;
    96 var valueStr: shortstring;
   102 var valueStr: shortstring;
    97     i: LongWord;
   103     i: LongWord;
    98 begin
   104 begin
   123 procedure freeModule;
   129 procedure freeModule;
   124 begin
   130 begin
   125 
   131 
   126 end;
   132 end;
   127 
   133 
   128 Function ShortStringAsPChar(S: ShortString) : PChar;
       
   129 Var NewString : String;
       
   130 Begin
       
   131 if Length(S) = High(S) then Dec(S[0]);
       
   132 s[Ord(Length(s))+1] := #0;
       
   133 Result := @S[1];
       
   134 End;
       
   135 
       
   136 end.
   134 end.