mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 11:24:14 +02:00
- obsolete defines removed
git-svn-id: trunk@49184 -
This commit is contained in:
parent
f1e748512b
commit
0188a558d1
@ -23,9 +23,7 @@ unit cclasses;
|
||||
|
||||
{$i fpcdefs.inc}
|
||||
|
||||
{$ifndef VER2_0}
|
||||
{$define CCLASSESINLINE}
|
||||
{$endif}
|
||||
{$define CCLASSESINLINE}
|
||||
|
||||
interface
|
||||
|
||||
@ -88,14 +86,14 @@ type
|
||||
procedure Put(Index: Integer; Item: Pointer);
|
||||
procedure SetCapacity(NewCapacity: Integer);
|
||||
procedure SetCount(NewCount: Integer);
|
||||
Procedure RaiseIndexError(Index : Integer);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
Procedure RaiseIndexError(Index : Integer);noreturn;
|
||||
property List: PPointerList read FList;
|
||||
public
|
||||
destructor Destroy; override;
|
||||
function Add(Item: Pointer): Integer;
|
||||
procedure Clear;
|
||||
procedure Delete(Index: Integer);
|
||||
class procedure Error(const Msg: string; Data: PtrInt);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
class procedure Error(const Msg: string; Data: PtrInt);noreturn;
|
||||
procedure Exchange(Index1, Index2: Integer);
|
||||
function Expand: TFPList;
|
||||
function Extract(item: Pointer): Pointer;
|
||||
@ -227,7 +225,7 @@ type
|
||||
function HashOfIndex(Index: Integer): LongWord;
|
||||
function GetNextCollision(Index: Integer): Integer;
|
||||
procedure Delete(Index: Integer);
|
||||
class procedure Error(const Msg: string; Data: PtrInt);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
class procedure Error(const Msg: string; Data: PtrInt);noreturn;
|
||||
function Expand: TFPHashList;
|
||||
function Extract(item: Pointer): Pointer;
|
||||
function IndexOf(Item: Pointer): Integer;
|
||||
@ -718,7 +716,7 @@ implementation
|
||||
TFPObjectList (Copied from rtl/objpas/classes/lists.inc)
|
||||
*****************************************************************************}
|
||||
|
||||
procedure TFPList.RaiseIndexError(Index : Integer);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
procedure TFPList.RaiseIndexError(Index : Integer);noreturn;
|
||||
begin
|
||||
Error(SListIndexError, Index);
|
||||
end;
|
||||
@ -814,7 +812,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TFPList.Error(const Msg: string; Data: PtrInt);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
class procedure TFPList.Error(const Msg: string; Data: PtrInt);noreturn;
|
||||
begin
|
||||
Raise EListError.CreateFmt(Msg,[Data]) at get_caller_addr(get_frame), get_caller_frame(get_frame);
|
||||
end;
|
||||
@ -1541,7 +1539,7 @@ begin
|
||||
Self.Delete(Result);
|
||||
end;
|
||||
|
||||
class procedure TFPHashList.Error(const Msg: string; Data: PtrInt);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
class procedure TFPHashList.Error(const Msg: string; Data: PtrInt);noreturn;
|
||||
begin
|
||||
Raise EListError.CreateFmt(Msg,[Data]) at get_caller_addr(get_frame), get_caller_frame(get_frame);
|
||||
end;
|
||||
|
@ -90,7 +90,7 @@ implementation
|
||||
{ use a separate procedure here instead of calling internalerrorproc directly because
|
||||
- procedure variables cannot have a noreturn directive
|
||||
- having a procedure and a procedure variable with the same name in the interfaces of different units is confusing }
|
||||
procedure internalerror(i:longint);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
procedure internalerror(i:longint);noreturn;
|
||||
|
||||
begin
|
||||
internalerrorproc(i);
|
||||
@ -196,10 +196,6 @@ try_qword:
|
||||
result.overflow:=true;
|
||||
end;
|
||||
|
||||
{ workaround for 2.6.x bug }
|
||||
{$ifdef VER2_6}
|
||||
{$push} {$Q-}
|
||||
{$endif VER2_6}
|
||||
function sub_from(const a:Tconstexprint;b:qword):Tconstexprint;
|
||||
|
||||
const abs_low_int64=qword(9223372036854775808); {abs(low(int64)) -> overflow error}
|
||||
@ -244,10 +240,6 @@ try_qword:
|
||||
ov:
|
||||
result.overflow:=true;
|
||||
end;
|
||||
{ workaround for 2.6.x bug }
|
||||
{$ifdef VER2_6}
|
||||
{$pop}
|
||||
{$endif VER2_6}
|
||||
|
||||
operator + (const a,b:Tconstexprint):Tconstexprint;
|
||||
|
||||
|
@ -117,12 +117,6 @@ interface
|
||||
}
|
||||
function isabspowerof2(const value : Tconstexprint;out power : longint) : boolean;
|
||||
function nextpowerof2(value : int64; out power: longint) : int64;
|
||||
{$ifdef VER2_6} { only 2.7.1+ has a popcnt function in the system unit }
|
||||
function PopCnt(AValue : Byte): Byte;
|
||||
function PopCnt(AValue : Word): Word;
|
||||
function PopCnt(AValue : DWord): DWord;
|
||||
function PopCnt(Const AValue : QWord): QWord;
|
||||
{$endif VER2_6}
|
||||
|
||||
function backspace_quote(const s:string;const qchars:Tcharset):string;
|
||||
function octal_quote(const s:string;const qchars:Tcharset):string;
|
||||
@ -1015,48 +1009,6 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ifdef VER2_6}
|
||||
const
|
||||
PopCntData : array[0..15] of byte = (0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4);
|
||||
|
||||
function PopCnt(AValue : Byte): Byte;
|
||||
begin
|
||||
Result:=PopCntData[AValue and $f]+PopCntData[(AValue shr 4) and $f];
|
||||
end;
|
||||
|
||||
|
||||
function PopCnt(AValue : Word): Word;
|
||||
var
|
||||
i : SizeInt;
|
||||
begin
|
||||
Result:=0;
|
||||
for i:=0 to 3 do
|
||||
begin
|
||||
inc(Result,PopCntData[AValue and $f]);
|
||||
AValue:=AValue shr 4;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function PopCnt(AValue : DWord): DWord;
|
||||
var
|
||||
i : SizeInt;
|
||||
begin
|
||||
Result:=0;
|
||||
for i:=0 to 7 do
|
||||
begin
|
||||
inc(Result,PopCntData[AValue and $f]);
|
||||
AValue:=AValue shr 4;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function PopCnt(Const AValue : QWord): QWord;
|
||||
begin
|
||||
Result:=PopCnt(lo(AValue))+PopCnt(hi(AValue))
|
||||
end;
|
||||
{$endif VER2_6}
|
||||
|
||||
|
||||
function backspace_quote(const s:string;const qchars:Tcharset):string;
|
||||
|
||||
|
@ -112,12 +112,10 @@ unit i_emx;
|
||||
initialization
|
||||
{$ifdef CPUI386}
|
||||
{$ifdef EMX}
|
||||
{$IFNDEF VER1_0}
|
||||
set_source_info(system_i386_emx_info);
|
||||
{ OS/2 via EMX can be run under DOS as well }
|
||||
if (OS_Mode=osDOS) or (OS_Mode=osDPMI) then
|
||||
source_info.scriptext := '.bat';
|
||||
{$ENDIF VER1_0}
|
||||
{$endif EMX}
|
||||
{$endif CPUI386}
|
||||
end.
|
||||
|
@ -89,7 +89,7 @@ interface
|
||||
function ErrorCount:longint;
|
||||
procedure SetErrorFlags(const s:string);
|
||||
procedure GenerateError;
|
||||
procedure Internalerror(i:longint);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
procedure Internalerror(i:longint);noreturn;
|
||||
procedure Comment(l:longint;s:ansistring);
|
||||
function MessageStr(w:longint):TMsgStr;
|
||||
procedure Message(w:longint;onqueue:tmsgqueueevent=nil);
|
||||
@ -583,7 +583,7 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
procedure internalerror(i : longint);{$ifndef VER2_6}noreturn;{$endif VER2_6}
|
||||
procedure internalerror(i : longint);noreturn;
|
||||
begin
|
||||
UpdateStatus;
|
||||
do_internalerror(i);
|
||||
|
Loading…
Reference in New Issue
Block a user