summaryrefslogtreecommitdiff
path: root/macros/text1/compugraphics_8600/reblock.pascal
diff options
context:
space:
mode:
Diffstat (limited to 'macros/text1/compugraphics_8600/reblock.pascal')
-rw-r--r--macros/text1/compugraphics_8600/reblock.pascal34
1 files changed, 34 insertions, 0 deletions
diff --git a/macros/text1/compugraphics_8600/reblock.pascal b/macros/text1/compugraphics_8600/reblock.pascal
new file mode 100644
index 0000000000..28c7dd6e8f
--- /dev/null
+++ b/macros/text1/compugraphics_8600/reblock.pascal
@@ -0,0 +1,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.