diff options
| author | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-07-30 13:36:31 +0000 |
|---|---|---|
| committer | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-07-30 13:36:31 +0000 |
| commit | a4f3cfe4a67f1c85d12c02ab4587cded6d7e5db2 (patch) | |
| tree | 3ddbbbca6ddf5ed7602f216bd3cd2779a4550a42 /packages/fcl-base | |
| parent | 5a8f0cc8b78b8bb9a5b65d94d2afea849a29b1de (diff) | |
| download | fpc-a4f3cfe4a67f1c85d12c02ab4587cded6d7e5db2.tar.gz | |
* Patch from Luiz Americo to put Const in front of string parameters
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15670 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-base')
| -rw-r--r-- | packages/fcl-base/src/dummy/eventlog.inc | 2 | ||||
| -rw-r--r-- | packages/fcl-base/src/eventlog.pp | 54 | ||||
| -rw-r--r-- | packages/fcl-base/src/os2/eventlog.inc | 2 | ||||
| -rw-r--r-- | packages/fcl-base/src/unix/eventlog.inc | 2 | ||||
| -rw-r--r-- | packages/fcl-base/src/win/eventlog.inc | 2 |
5 files changed, 31 insertions, 31 deletions
diff --git a/packages/fcl-base/src/dummy/eventlog.inc b/packages/fcl-base/src/dummy/eventlog.inc index f37ef11ef0..16df19d304 100644 --- a/packages/fcl-base/src/dummy/eventlog.inc +++ b/packages/fcl-base/src/dummy/eventlog.inc @@ -32,7 +32,7 @@ begin DeActivateFileLog; end; -procedure TEventLog.WriteSystemLog(EventType : TEventType; Msg : String); +procedure TEventLog.WriteSystemLog(EventType : TEventType; const Msg : String); begin WriteFileLog(EventType,Msg); diff --git a/packages/fcl-base/src/eventlog.pp b/packages/fcl-base/src/eventlog.pp index e4f17a58a8..00c679abb4 100644 --- a/packages/fcl-base/src/eventlog.pp +++ b/packages/fcl-base/src/eventlog.pp @@ -52,8 +52,8 @@ Type procedure SetFileName(const Value: String); procedure ActivateSystemLog; function DefaultFileName: String; - procedure WriteFileLog(EventType : TEventType; Msg: String); - procedure WriteSystemLog(EventType: TEventType; Msg: String); + procedure WriteFileLog(EventType : TEventType; const Msg: String); + procedure WriteSystemLog(EventType: TEventType; const Msg: String); procedure DeActivateFileLog; procedure DeActivateSystemLog; procedure CheckIdentification; @@ -71,18 +71,18 @@ Type Function EventTypeToString(E : TEventType) : String; Function RegisterMessageFile(AFileName : String) : Boolean; virtual; Function UnRegisterMessageFile : Boolean; virtual; - Procedure Log (EventType : TEventType; Msg : String); {$ifndef fpc }Overload;{$endif} - Procedure Log (EventType : TEventType; Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} - Procedure Log (Msg : String); {$ifndef fpc }Overload;{$endif} - Procedure Log (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} - Procedure Warning (Msg : String); {$ifndef fpc }Overload;{$endif} - Procedure Warning (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} - Procedure Error (Msg : String); {$ifndef fpc }Overload;{$endif} - Procedure Error (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} - Procedure Debug (Msg : String); {$ifndef fpc }Overload;{$endif} - Procedure Debug (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} - Procedure Info (Msg : String); {$ifndef fpc }Overload;{$endif} - Procedure Info (Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} + Procedure Log (EventType : TEventType; const Msg : String); {$ifndef fpc }Overload;{$endif} + Procedure Log (EventType : TEventType; const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} + Procedure Log (const Msg : String); {$ifndef fpc }Overload;{$endif} + Procedure Log (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} + Procedure Warning (const Msg : String); {$ifndef fpc }Overload;{$endif} + Procedure Warning (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} + Procedure Error (const Msg : String); {$ifndef fpc }Overload;{$endif} + Procedure Error (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} + Procedure Debug (const Msg : String); {$ifndef fpc }Overload;{$endif} + Procedure Debug (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} + Procedure Info (const Msg : String); {$ifndef fpc }Overload;{$endif} + Procedure Info (const Fmt : String; Args : Array of const); {$ifndef fpc }Overload;{$endif} Published Property Identification : String Read FIdentification Write SetIdentification; Property LogType : TLogType Read Flogtype Write SetlogType; @@ -126,12 +126,12 @@ begin Raise ELogError.Create(SErrOperationNotAllowed); end; -procedure TEventLog.Debug(Fmt: String; Args: array of const); +procedure TEventLog.Debug(const Fmt: String; Args: array of const); begin Debug(Format(Fmt,Args)); end; -procedure TEventLog.Debug(Msg: String); +procedure TEventLog.Debug(const Msg: String); begin Log(etDebug,Msg); end; @@ -142,38 +142,38 @@ begin Active:=True; end; -procedure TEventLog.Error(Fmt: String; Args: array of const); +procedure TEventLog.Error(const Fmt: String; Args: array of const); begin Error(Format(Fmt,Args)); end; -procedure TEventLog.Error(Msg: String); +procedure TEventLog.Error(const Msg: String); begin Log(etError,Msg); end; -procedure TEventLog.Info(Fmt: String; Args: array of const); +procedure TEventLog.Info(const Fmt: String; Args: array of const); begin Info(Format(Fmt,Args)); end; -procedure TEventLog.Info(Msg: String); +procedure TEventLog.Info(const Msg: String); begin Log(etInfo,Msg); end; -procedure TEventLog.Log(Msg: String); +procedure TEventLog.Log(const Msg: String); begin Log(DefaultEventType,msg); end; -procedure TEventLog.Log(EventType: TEventType; Fmt: String; +procedure TEventLog.Log(EventType: TEventType; const Fmt: String; Args: array of const); begin Log(EventType,Format(Fmt,Args)); end; -procedure TEventLog.Log(EventType: TEventType; Msg: String); +procedure TEventLog.Log(EventType: TEventType; const Msg: String); begin EnsureActive; Case FlogType of @@ -182,7 +182,7 @@ begin end; end; -procedure TEventLog.WriteFileLog(EventType : TEventType; Msg : String); +procedure TEventLog.WriteFileLog(EventType : TEventType; const Msg : String); Var S,TS,T : String; @@ -204,7 +204,7 @@ begin Raise ELogError.CreateFmt(SErrLogFailedMsg,[S]); end; -procedure TEventLog.Log(Fmt: String; Args: array of const); +procedure TEventLog.Log(const Fmt: String; Args: array of const); begin Log(Format(Fmt,Args)); end; @@ -267,12 +267,12 @@ begin Flogtype := Value; end; -procedure TEventLog.Warning(Fmt: String; Args: array of const); +procedure TEventLog.Warning(const Fmt: String; Args: array of const); begin Warning(Format(Fmt,Args)); end; -procedure TEventLog.Warning(Msg: String); +procedure TEventLog.Warning(const Msg: String); begin Log(etWarning,Msg); end; diff --git a/packages/fcl-base/src/os2/eventlog.inc b/packages/fcl-base/src/os2/eventlog.inc index 4d126f54ba..66742baecb 100644 --- a/packages/fcl-base/src/os2/eventlog.inc +++ b/packages/fcl-base/src/os2/eventlog.inc @@ -164,7 +164,7 @@ begin end; -procedure TEventLog.WriteSystemLog (EventType: TEventType; Msg: string); +procedure TEventLog.WriteSystemLog (EventType: TEventType; const Msg: string); const WinET: array [TEventType] of Str3 = ('USR', 'INF', 'WRN', 'ERR', 'DBG'); diff --git a/packages/fcl-base/src/unix/eventlog.inc b/packages/fcl-base/src/unix/eventlog.inc index 226507d168..88b25c1b69 100644 --- a/packages/fcl-base/src/unix/eventlog.inc +++ b/packages/fcl-base/src/unix/eventlog.inc @@ -76,7 +76,7 @@ begin CloseLog; end; -procedure TEventLog.WriteSystemLog(EventType : TEventType; Msg : String); +procedure TEventLog.WriteSystemLog(EventType : TEventType; const Msg : String); Var P,PT : PChar; diff --git a/packages/fcl-base/src/win/eventlog.inc b/packages/fcl-base/src/win/eventlog.inc index e35524f11e..04b86dc70a 100644 --- a/packages/fcl-base/src/win/eventlog.inc +++ b/packages/fcl-base/src/win/eventlog.inc @@ -49,7 +49,7 @@ function ReportEvent(hEventLog: THandle; wType, wCategory: Word; dwDataSize: DWORD; lpStrings, lpRawData: Pointer): BOOL; stdcall; } -procedure TEventLog.WriteSystemLog(EventType : TEventType; Msg : String); +procedure TEventLog.WriteSystemLog(EventType : TEventType; const Msg : String); Var P : PChar; |
