DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦b89163348⟧ TextFile

    Length: 3840 (0xf00)
    Types: TextFile
    Names: »eindent«

Derivation

└─⟦2c55ea56f⟧ Bits:30001844 SW-save af projekt 1000, Alarm-system
    └─⟦6b41451d2⟧ 
        └─⟦this⟧ »eindent« 

TextFile

job jaba 7 600 time 8 0 perm disc 50 3 size 80000
mode list.yes
(nindentpas=edit indentpas
if ok.no
finis
indent = set 31
indent = pascal nindentpas
if ok.no
finis
scope user indent
if ok.no
finis
c = list eindent count.boss
if ok.no
finis
finis output.no
indentlist = indent nindentpas lc mark
if ok.no
finis
clear temp nindentpas
udlist = cross indentlist
if ok.no
finis
convert udlist
finis output.no )




l./(*version/, d, i/
(* version 80.10.10 *)
/


l./skiperror,longlines/, d, i/
skiperror, formfeed, myind,
/,
l./nowarn,autoeol,/, d, i/
before_program,  (* false until process, program, or prefix met, i.e.
until it can be decided whether input is a PASCAL80 program or a PASCAL program *)
noind, fewends : boolean;
/,


l./nowarn=true;/, r/  nowarn=true;/before_program = true;/,
l./autoeol=false/, d,
l./eolmade=false/, r/ eolmade=false;//,

l./longlines=false/, d,

l./pascalkeys=(/,
l./'OR/, r/'/'AS        ', '/,
r/ 'NIL ',//,
l./keynumÆ3Å:=7/, r/7/8/,


l./if idmode>nochange then/, d,


l./procedure fileid;/, i/


procedure pascal80_indent;
var
step : integer;

begin
before_program := false;

(* remove non PASCAL80 key words from table *)
(* i.e. FILE, VALUE, and PROGRAM *)

for step := keynum Æ 4 (* length of word file *) Å to
keynum Æ 7 (* length of word program *) + 1 Å  do
if (keyword Æ step Å = 'FILE') or
(keyword Æ step Å = 'VALUE') or
(keyword Æ step Å = 'PROGRAM') then keyword Æ step Å := '   ';

end; (* PASCAL80 indent *)


procedure pascal_indent;
var
step : integer;

begin
before_program := false;

(* remove non RC8000 PASCAL key words from table *)
(* i.e. AS, LOCK, PREFIX, INCLUDE, PROCESS, and CHANNEL *)

for step := keynum Æ 2 (* length of word as *) Å to
keynum Æ 7 (* length of word channel *) + 1 Å do
if (keyword Æ step Å = 'AS') or
(keyword Æ step Å = 'LOCK') or
(keyword Æ step Å = 'PREFIX') or
(keyword Æ step Å = 'INCLUDE') or
(keyword Æ step Å = 'PROCESS') or
(keyword Æ step Å = 'CHANNEL') then keyword Æ step Å := '  ';

end; (* pascal indent *)


/,



l./writeln(output,'WARN/, d,

l./if id='warn/, r/warn/mark/, r/nowarn:=false/markmode:=true/,

l./if id='autoeol/, d,

l./writeln(output,'call:/, i/
if outputfile then close(output);
/,



l./procedure writeeol/,
l./begin/, d./end;/, i/
begin
/,
l./page(output/, r/page(output)/
begin
page(output);
formfeed := false;
end;
/,
l./else/, d,

l./procedure write1(/,
d./end;(*WRITE1*)/,



l./function resword(length/,
l./i:=keynum/, i/
if length <= toplength then
begin
/,

l./resword:=res/, i/
end;
/,


l./procedure pasidentifier;/,
l./for k:=k/, r/k:=k/hi := k/, r/ÆkÅ/Æ hi Å/,

l./repeattry:=/, i/
if resword( k, key ) then
begin
/,

l./if(string='END/, i/

if before_program then
begin
if (string = 'PROCESS') or (string = 'PREFIX') then
pascal80_indent
else
if string = 'PROGRAM' then
pascal_indent;
end; (* if before program *)

/,


l./end(*KINÆ2../, i/
end; (* if resword ... *)
/,







l./procedure printline/,
l./write1(/, r/write1/write/,
l./labelline/, r/ or labelline//,

l./write1/, g 12/write1/write/,

l./procedure readline/,
l./while not eoln(input/ , i/
repeat
/,
l./end;/, r/;/;
if input^ = ff then
begin
formfeed := true;
repeat
get(input)
until input^ <> ff; (* skip ff's *)
end; (* if input^ = ff *)

until eoln(input);  (* input^ = nl or eof !!! *)
/,

l./formfeed:=input^/, d,

l./skiptext:=false;skip/, d,

l./if autoeol/, d,

l./labelline:=false/, d,

l./firstid:=false/, d,

l./iflonglines then/, d1,

l./ifeolmade then/,
d,



f

▶EOF◀