UNIX Free Pascal



. - 2


(* , , + *)

o:=r mod o10;

s:=r div o1000;

u:=(r div o100) mod o10;

g:=(r mod o100) div o10;

res:=symrights[u]+symrights[g]+symrights[o];(* *)

for i:=1 to 3 do (* *)

if s and (1 shl (i-1)) <> 0 then (* *)

if res[12-3*i]='x' then (* *)

res[12-3*i]:=spec[i] (* *)

else

res[12-3*i]:=upcase(spec[i]); (* - *)

getrights:=res; (* - 9- 12- *)

end;

var

d:^TDir; (* *)

elem:^Dirent; (* , *)

tekkat, (* *)

fullpath (* *)

:array [0..1000] of char;

st:stat; (* *)

begin

if paramcount=0 then (* *)

strcopy(tekkat,'.') (* *)

else

tekkat:=paramstr(1); (* *)

if not access(pchar(tekkat),F_OK or R_OK) then (*F_OK - ..*)

begin

writeln(' ', tekkat, ' '); (**)

halt(1); (* *)

end;

if not fstat(pchar(tekkat),st) then (* *)

begin

writeln(' ', tekkat); (**)

halt(1); (* *)

end;

if not S_ISDIR(st.mode) then (* *)