From 39dc56232628b9e7fef93ccfe2a3e3a28be16865 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 16 May 2007 21:25:55 +0000 Subject: [PATCH] * changed some message handling to ansistring, no slow down measurable with make cycle, resolves #8890 git-svn-id: trunk@7370 - --- compiler/cmsgs.pas | 8 ++++---- compiler/comphook.pas | 34 +++++++++++++++++----------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/compiler/cmsgs.pas b/compiler/cmsgs.pas index fb7c549528..f81134861c 100644 --- a/compiler/cmsgs.pas +++ b/compiler/cmsgs.pas @@ -52,7 +52,7 @@ type procedure ClearIdx; procedure CreateIdx; function GetPChar(nr:longint):pchar; - function Get(nr:longint;const args:array of string):string; + function Get(nr:longint;const args:array of string):ansistring; end; { this will read a line until #10 or #0 and also increase p } @@ -66,11 +66,11 @@ uses cutils; -function MsgReplace(const s:string;const args:array of string):string; +function MsgReplace(const s:string;const args:array of string):ansistring; var last, i : longint; - hs : string; + hs : ansistring; begin if s='' then @@ -375,7 +375,7 @@ begin end; -function TMessage.Get(nr:longint;const args:array of string):string; +function TMessage.Get(nr:longint;const args:array of string):ansistring; var hp : pchar; begin diff --git a/compiler/comphook.pas b/compiler/comphook.pas index e28e5305a4..ca91efd7fc 100644 --- a/compiler/comphook.pas +++ b/compiler/comphook.pas @@ -121,7 +121,7 @@ var { Default Functions } Function def_status:boolean; -Function def_comment(Level:Longint;const s:string):boolean; +Function def_comment(Level:Longint;const s:ansistring):boolean; function def_internalerror(i:longint):boolean; procedure def_initsymbolinfo; procedure def_donesymbolinfo; @@ -132,7 +132,7 @@ Function def_getnamedfiletime(Const F : String) : Longint; type tstopprocedure = procedure(err:longint); tstatusfunction = function:boolean; - tcommentfunction = function(Level:Longint;const s:string):boolean; + tcommentfunction = function(Level:Longint;const s:ansistring):boolean; tinternalerrorfunction = function(i:longint):boolean; tinitsymbolinfoproc = procedure; @@ -198,22 +198,22 @@ end; Stopping the compiler ****************************************************************************} - constructor EControlCAbort.Create; - begin - inherited Create('Ctrl-C Signaled!'); - end; +constructor EControlCAbort.Create; + begin + inherited Create('Ctrl-C Signaled!'); + end; - constructor ECompilerAbort.Create; - begin - inherited Create('Compilation Aborted'); - end; +constructor ECompilerAbort.Create; + begin + inherited Create('Compilation Aborted'); + end; - constructor ECompilerAbortSilent.Create; - begin - inherited Create('Compilation Aborted'); - end; +constructor ECompilerAbortSilent.Create; + begin + inherited Create('Compilation Aborted'); + end; {**************************************************************************** @@ -243,13 +243,13 @@ begin end; -Function def_comment(Level:Longint;const s:string):boolean; +Function def_comment(Level:Longint;const s:ansistring):boolean; const rh_errorstr = 'error:'; rh_warningstr = 'warning:'; var - hs : string; - hs2 : string; + hs : ansistring; + hs2 : ansistring; begin def_comment:=false; { never stop } hs:='';