mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-01 17:37:09 +02:00
32 lines
455 B
PHP
32 lines
455 B
PHP
|
|
|
|
function LOG_PRI(p : longint) : longint;
|
|
|
|
begin
|
|
LOG_PRI:=(p and LOG_PRIMASK);
|
|
end;
|
|
|
|
function LOG_MAKEPRI(fac,pri : longint) : longint;
|
|
|
|
begin
|
|
LOG_MAKEPRI:=(fac shl 3) or pri;
|
|
end;
|
|
|
|
function LOG_FAC(p : longint) : longint;
|
|
|
|
begin
|
|
LOG_FAC:=(p and LOG_FACMASK) shr 3;
|
|
end;
|
|
|
|
function LOG_MASK(pri : longint) : longint;
|
|
|
|
begin
|
|
LOG_MASK:=1 shl pri;
|
|
end;
|
|
|
|
|
|
function LOG_UPTO(pri : longint) : longint;
|
|
begin
|
|
LOG_UPTO:=(1 shl (pri + 1)) - 1;
|
|
end;
|