|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 2304 (0x900)
Types: TextFile
Names: »nettxt«
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
└─⟦4334b4c0b⟧
└─⟦this⟧ »nettxt«
net=set 50
net=algol
program for line justification.
call: <objectfile>=net <sourcefile> <fpparam>(0,n)
fpparam: linewidth lw.65 , maximum number of extra spaces
for each word division esp.3
begin
integer i,j,is,js,ks,nc,nd,ms,lw,nn,ld,esp;
real array field raf;
integer array I(0:100),SP(1:20);
long array IFILE,OFILE(1:3);
zone zi,zo(128,1,stderror);
raf:= 0;
cleararray(IFILE); readinfp(IFILE.raf,1);
open(zi,4,IFILE,0);
cleararray(OFILE); readlsfp(OFILE.raf);
open(zo,4,OFILE,0);
lw:= 65; readifp(<:lw:>,lw);
esp:= 3; readifp(<:esp:>,esp);
if esp<1 then esp:= 1;
nc:= -1; I(0):= 0;
for i:= i while I(nc+1)<>25 do
begin
i:= 0;
for i:= i while I(i)<>10 and I(i)<>25 do
begin i:= i+1; readchar(zi,I(i)); end;
nc:= i-1;
if I(i)=10 then begin readchar(zi,i); repeatchar(zi); end;
cleararray(SP);
if i<>32 and i<>10 and I(nc+1)<>25 and nc<lw then
begin nd:= 0;
for i:= 2 step 1 until nc do
if I(i)=32 and I(i-1)<>32 then nd:= nd+1;
if nd>0 then
begin
js:= entier((lw-nc)/nd);
if js>=esp then js:= esp
else
begin ks:= lw-nc-js*nd;
nn:= if nd mod 2=0 then nd else 0;
i:= 0; is:= 0;
for i:= i+1 while is<ks do
begin nn:= nn-ks;
if nn<=0 then
begin SP(i):= SP(i)+1; is:= is+1; nn:= nn+nd end;
end;
end;
for i:= 1 step 1 until nd do SP(i):= SP(i)+js;
end nd>0;
end;
j:= 1;
for i:= 1 step 1 until nc+1 do
begin
write(zo,false add I(i),1);
if i>1 and I(i)=32 and I(i-1)<>32 then
begin write(zo,sp,SP(j)); j:= j+1 end;
end;
end;
close(zi,true); close(zo,true);
end
▶EOF◀