summaryrefslogtreecommitdiff
path: root/plugins/HistoryPlusPlus/hpp_bookmarks.pas
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-07-13 12:05:09 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-07-13 12:05:09 +0000
commita79fa86ed589c3d843baa932230ef08bc7468296 (patch)
tree98339a8ea73acfffbea00ca607c6525e89657ac6 /plugins/HistoryPlusPlus/hpp_bookmarks.pas
parenta87fb51fd8597af4909892f0e12010594e935586 (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_bookmarks.pas')
-rw-r--r--plugins/HistoryPlusPlus/hpp_bookmarks.pas16
1 files changed, 9 insertions, 7 deletions
diff --git a/plugins/HistoryPlusPlus/hpp_bookmarks.pas b/plugins/HistoryPlusPlus/hpp_bookmarks.pas
index a98f2a381a..7db2328e91 100644
--- a/plugins/HistoryPlusPlus/hpp_bookmarks.pas
+++ b/plugins/HistoryPlusPlus/hpp_bookmarks.pas
@@ -49,7 +49,7 @@ unit hpp_bookmarks;
interface
-uses windows, m_api, hpp_jclSysUtils, SysUtils;
+uses windows, m_api;
type
TEventData = record
@@ -125,7 +125,7 @@ type
// function GetBookmark(hDBEvent: THandle; var EventData: TEventData): Boolean;
function AddItem(hDBEvent: THandle): Boolean;
function RemoveItem(hDBEvent: THandle): Boolean;
- function AddItemName(hDBEvent: THandle; Value: String): Boolean;
+ function AddItemName(hDBEvent: THandle; const Value: String): Boolean;
function GetItemName(hDBEvent: THandle): String;
function RemoveItemName(hDBEvent: THandle): Boolean;
function FindEventByTimestampAndCrc(ped: PEventData): Boolean;
@@ -162,7 +162,9 @@ procedure hppDeinitBookmarkServer;
implementation
-uses hpp_events, hpp_contacts, hpp_global, Checksum, hpp_database, hpp_forms;
+uses
+ SysUtils,
+ hpp_jclSysUtils, hpp_events, hpp_contacts, hpp_global, Checksum, hpp_database, hpp_forms;
procedure hppInitBookmarkServer;
begin
@@ -301,7 +303,7 @@ var
mem_org: Pointer;
mem_len: Integer;
rec_size: Word;
- count: Integer;
+ rec_count: Integer;
ed: PEventData;
AllOk: Boolean;
begin
@@ -314,9 +316,9 @@ begin
rec_size := PWord(mem_org)^;
if rec_size < SizeOf(TEventData) then
raise EAbort.Create('Bookmark size is too small');
- Count := (mem_len - SizeOf(Word)) div rec_size;
+ rec_count := (mem_len - SizeOf(Word)) div rec_size;
mem := pointer(uint_ptr(mem_org) + SizeOf(Word));
- for i := 0 to Count - 1 do
+ for i := 0 to rec_count - 1 do
begin
ed := PEventData(int_ptr(mem) + i * rec_size);
if not Bookmarks.AddEventData(ed^) then
@@ -557,7 +559,7 @@ begin
Result := AddKey(hDBEvent,ped);
end;
-function TBookmarksHash.AddItemName(hDBEvent: THandle; Value: String): Boolean;
+function TBookmarksHash.AddItemName(hDBEvent: THandle; const Value: String): Boolean;
begin
Result := (WriteDBWideStr(Contact.hContact,hppDBName,AnsiString('bm'+intToStr(hDBEvent)),Value) = 0);
end;