diff options
author | Alexey Kulakov <panda75@bk.ru> | 2012-07-13 12:05:09 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2012-07-13 12:05:09 +0000 |
commit | a79fa86ed589c3d843baa932230ef08bc7468296 (patch) | |
tree | 98339a8ea73acfffbea00ca607c6525e89657ac6 /plugins/HistoryPlusPlus/hpp_itemprocess.pas | |
parent | a87fb51fd8597af4909892f0e12010594e935586 (diff) |
partial code beautifier (through Pascal Analizer)
git-svn-id: http://svn.miranda-ng.org/main/trunk@947 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryPlusPlus/hpp_itemprocess.pas')
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_itemprocess.pas | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/plugins/HistoryPlusPlus/hpp_itemprocess.pas b/plugins/HistoryPlusPlus/hpp_itemprocess.pas index 8ddb7968e7..137fdd28b0 100644 --- a/plugins/HistoryPlusPlus/hpp_itemprocess.pas +++ b/plugins/HistoryPlusPlus/hpp_itemprocess.pas @@ -59,9 +59,9 @@ uses var
rtf_ctable_text: AnsiString;
-function DoSupportBBCodesHTML(S: AnsiString): AnsiString;
-function DoSupportBBCodesRTF(S: AnsiString; StartColor: integer; doColorBBCodes: boolean): AnsiString;
-function DoStripBBCodes(S: String): String;
+function DoSupportBBCodesHTML(const S: AnsiString): AnsiString;
+function DoSupportBBCodesRTF(const S: AnsiString; StartColor: integer; doColorBBCodes: boolean): AnsiString;
+function DoStripBBCodes(const S: String): String;
function DoSupportSmileys(awParam:WPARAM; alParam: LPARAM): Integer;
function DoSupportMathModule(awParam:WPARAM; alParam: LPARAM): Integer;
@@ -145,10 +145,9 @@ const MAX_FMTBUF = 4095;
var
- i: integer;
TextBuffer: THppBuffer;
-function GetColorRTF(code: AnsiString; colcount: integer): integer;
+function GetColorRTF(const code: AnsiString; colcount: integer): integer;
var
i: integer;
begin
@@ -271,7 +270,7 @@ begin end;
*)
-function DoSupportBBCodesRTF(S: AnsiString; StartColor: integer; doColorBBCodes: boolean): AnsiString;
+function DoSupportBBCodesRTF(const S: AnsiString; StartColor: integer; doColorBBCodes: boolean): AnsiString;
var
bufPos,bufEnd: PAnsiChar;
strStart,strTrail: PAnsiChar;
@@ -357,7 +356,7 @@ begin TextBuffer.Unlock;
end;
-function DoSupportBBCodesHTML(S: AnsiString): AnsiString;
+function DoSupportBBCodesHTML(const S: AnsiString): AnsiString;
var
bufPos,bufEnd: PAnsiChar;
strStart,strTrail,strCode: PAnsiChar;
@@ -409,7 +408,7 @@ begin TextBuffer.Unlock;
end;
-function DoStripBBCodes(S: String): String;
+function DoStripBBCodes(const S: String): String;
var
WideStream: String;
i,spos,epos,cpos,slen: integer;
@@ -537,10 +536,10 @@ begin end;
end;
-
-initialization
- rtf_ctable_text := '';
-
+procedure Filltables;
+var
+ i: integer;
+begin
for i := 0 to High(rtf_ctable) do
begin
rtf_ctable_text := rtf_ctable_text + AnsiString(format('\red%d\green%d\blue%d;',
@@ -556,6 +555,12 @@ initialization bbCodes[i, bbEnd ].prefix.wide := String(bbCodes[i, bbEnd ].prefix.ansi);
bbCodes[i, bbEnd ].suffix.wide := String(bbCodes[i, bbEnd ].suffix.ansi);
end;
+end;
+
+initialization
+ rtf_ctable_text := '';
+
+ FillTables;
TextBuffer := THppBuffer.Create;
|