1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
PROGRAM reblock(input,output);
VAR
outstring :STRING(1024);
instring :STRING(8);
fontname :STRING(8);
filetype :STRING(8);
parmstring :STRING(20);
i, fill :integer;
BEGIN
parmstring := TRIM(parms);
i := index(parmstring,' ');
fontname := SUBSTR(parmstring,1,i-1);
filetype := SUBSTR(parmstring,i+1);
RESET(input,'NAME='||fontname||'.PR'||filetype||'.A');
REWRITE(output,'NAME='||fontname||'.'||filetype||
'.A,LRECL=1024,RECFM=F');
outstring := '';
READLN(input,instring);
WHILE NOT EOF(input) DO BEGIN;
outstring := outstring || instring;
IF LENGTH(outstring) >= 1024 THEN BEGIN
WRITELN(output,outstring);
outstring := '';
END;
READLN(input,instring);
END;
IF LENGTH(outstring) > 0 THEN BEGIN
IF LENGTH(outstring) < 1024 THEN
REPEAT
outstring := outstring || '00'xc;
UNTIL LENGTH(outstring) >= 1024;
WRITELN(output,outstring);
END;
END.
|