* use ptrint

This commit is contained in:
peter 2004-05-02 21:23:18 +00:00
parent 7559d7050e
commit 3ab3e2e19b
7 changed files with 41 additions and 24 deletions

View File

@ -167,7 +167,7 @@ begin
end;
end;
Procedure TDataset.DataEvent(Event: TDataEvent; Info: Longint);
Procedure TDataset.DataEvent(Event: TDataEvent; Info: Ptrint);
Var
i : longint;
@ -1719,7 +1719,10 @@ end;
{
$Log$
Revision 1.12 2004-03-25 20:43:39 michael
Revision 1.13 2004-05-02 21:23:18 peter
* use ptrint
Revision 1.12 2004/03/25 20:43:39 michael
Some compatibility additions
Revision 1.11 2004/01/05 21:21:38 michael

View File

@ -101,7 +101,7 @@ begin
end;
Procedure TDataLink.DataEvent(Event: TDataEvent; Info: Longint);
Procedure TDataLink.DataEvent(Event: TDataEvent; Info: Ptrint);
begin
@ -420,7 +420,7 @@ begin
end;
procedure TDatasource.DistributeEvent(Event: TDataEvent; Info: Longint);
procedure TDatasource.DistributeEvent(Event: TDataEvent; Info: Ptrint);
Var
@ -506,7 +506,7 @@ begin
end;
procedure TDataSource.ProcessEvent(Event : TDataEvent; Info : longint);
procedure TDataSource.ProcessEvent(Event : TDataEvent; Info : Ptrint);
Const
OnDataChangeEvents = [deRecordChange, deDataSetChange,

View File

@ -34,6 +34,11 @@ const
YesNoChars : Array[Boolean] of char = ('Y','N');
type
{$ifdef ver1_0}
PtrInt = Longint;
PPtrInt = ^PtrInt;
{$endif}
{LargeInt}
LargeInt = Int64;
@ -842,7 +847,7 @@ type
procedure CloseBlob(Field: TField); virtual;
procedure CloseCursor; virtual;
procedure CreateFields;
procedure DataEvent(Event: TDataEvent; Info: Longint); virtual;
procedure DataEvent(Event: TDataEvent; Info: Ptrint); virtual;
procedure DestroyFields; virtual;
procedure DoAfterCancel; virtual;
procedure DoAfterClose; virtual;
@ -1053,7 +1058,7 @@ type
protected
procedure ActiveChanged; virtual;
procedure CheckBrowseMode; virtual;
procedure DataEvent(Event: TDataEvent; Info: Longint); virtual;
procedure DataEvent(Event: TDataEvent; Info: Ptrint); virtual;
procedure DataSetChanged; virtual;
procedure DataSetScrolled(Distance: Integer); virtual;
procedure EditingChanged; virtual;
@ -1136,9 +1141,9 @@ type
FOnStateChange: TNotifyEvent;
FOnDataChange: TDataChangeEvent;
FOnUpdateData: TNotifyEvent;
procedure DistributeEvent(Event: TDataEvent; Info: Longint);
procedure DistributeEvent(Event: TDataEvent; Info: Ptrint);
procedure RegisterDataLink(DataLink: TDataLink);
Procedure ProcessEvent(Event : TDataEvent; Info : longint);
Procedure ProcessEvent(Event : TDataEvent; Info : Ptrint);
procedure SetDataSet(ADataSet: TDataSet);
procedure SetEnabled(Value: Boolean);
procedure UnregisterDataLink(DataLink: TDataLink);
@ -1487,7 +1492,10 @@ end.
{
$Log$
Revision 1.15 2004-03-25 20:43:39 michael
Revision 1.16 2004-05-02 21:23:18 peter
* use ptrint
Revision 1.15 2004/03/25 20:43:39 michael
Some compatibility additions
Revision 1.14 2004/03/19 23:19:51 michael

View File

@ -1877,15 +1877,15 @@ begin
end else begin { ***** fkCalculated, fkLookup ***** }
prec:=pDbfRecord(CalcBuffer);
dst:=@prec^.DeletedFlag;
Inc(integer(dst), GetRecordSize + Field.Offset);
Boolean(dst^) := LongBool(Buffer);
Inc(pchar(dst), GetRecordSize + Field.Offset);
Boolean(dst^) := (Buffer<>nil);
if Boolean(dst^) then begin
Inc(integer(dst), 1);
Inc(Pchar(dst), 1);
Move(Buffer^, dst^, Field.DataSize);
end;
end; { end of ***** fkCalculated, fkLookup ***** }
if not (State in [dsCalcFields, dsFilter, dsNewValue]) then begin
DataEvent(deFieldChange, Longint(Field));
DataEvent(deFieldChange, Ptrint(Field));
end;
end;

View File

@ -276,7 +276,7 @@ begin
7: Move(Buffer^, PDDGData(ActiveBuffer)^.DateField, Field.DataSize);
8: Move(Buffer^, PDDGData(ActiveBuffer)^.Even, Field.DataSize);
end;
DataEvent(deFieldChange, Longint(Field));
DataEvent(deFieldChange, Ptrint(Field));
end;
procedure TDDGDataSet.GetBookmarkData(Buffer: PChar; Data: Pointer);
@ -528,7 +528,10 @@ end;
end.
$Log$
Revision 1.3 2002-09-07 15:15:23 peter
Revision 1.4 2004-05-02 21:23:18 peter
* use ptrint
Revision 1.3 2002/09/07 15:15:23 peter
* old logs removed and tabs fixed
}

View File

@ -287,13 +287,13 @@ end;
procedure TField.DataChanged;
begin
FDataset.DataEvent(deFieldChange,longint(Self));
FDataset.DataEvent(deFieldChange,ptrint(Self));
end;
procedure TField.FocusControl;
begin
FDataSet.DataEvent(deFocusControl,longint(Self));
FDataSet.DataEvent(deFocusControl,ptrint(Self));
end;
procedure TField.FreeBuffers;
@ -1806,7 +1806,10 @@ end;
{
$Log$
Revision 1.10 2004-03-25 20:43:39 michael
Revision 1.11 2004-05-02 21:23:18 peter
* use ptrint
Revision 1.10 2004/03/25 20:43:39 michael
Some compatibility additions
Revision 1.9 2004/02/25 16:29:26 michael

View File

@ -133,7 +133,7 @@ type
// TRecInfo
PRecInfo = ^TRecInfo;
TRecInfo = packed record
RecordNumber: Integer;
RecordNumber: PtrInt;
BookmarkFlag: TBookmarkFlag;
end;
//-----------------------------------------------------------------------------
@ -473,7 +473,7 @@ begin
with PRecInfo(Buffer + FRecInfoOfs)^ do
begin
BookmarkFlag := bfCurrent;
RecordNumber := Integer(FData.Objects[FCurRec]);
RecordNumber := PtrInt(FData.Objects[FCurRec]);
end;
end
else
@ -668,7 +668,7 @@ begin
BufEnd := StrEnd(ActiveBuffer); // Fill with blanks when necessary
if BufEnd > RecBuf then
BufEnd := RecBuf;
FillChar(BufEnd[0], Field.Size + LongInt(RecBuf) - LongInt(BufEnd), Ord(' '));
FillChar(BufEnd[0], Field.Size + PtrInt(RecBuf) - PtrInt(BufEnd), Ord(' '));
p := StrLen(Buffer);
if p > Field.Size then
p := Field.Size;
@ -682,7 +682,7 @@ begin
Move(Buffer^, RecBuf[0], Field.Size);
end;
if not (State in [dsCalcFields, dsFilter, dsNewValue]) then
DataEvent(deFieldChange, Longint(Field));
DataEvent(deFieldChange, Ptrint(Field));
end;
procedure TFixedFormatDataSet.SetFieldPos(var Buffer : PChar; FieldNo : Integer);
@ -751,7 +751,7 @@ procedure TFixedFormatDataSet.InternalGotoBookmark(ABookmark: Pointer);
var
Index: Integer;
begin
Index := FData.IndexOfObject(TObject(PInteger(ABookmark)^));
Index := FData.IndexOfObject(TObject(PPtrInt(ABookmark)^));
if Index <> -1 then
FCurRec := Index
else