diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2019-02-11 11:49:19 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2019-02-11 11:49:39 +0100 |
commit | 98cab31fc3659e33aef260efca55bf9f1753164c (patch) | |
tree | f1affa84049ef9b268e6c4f521f000478b0f3a8e /system/printer-9nadel/1986/src/CHARED.ELA | |
parent | 71e2b36ccd05ea678e62e32ee6245df2b8d6ac17 (diff) | |
download | eumel-src-98cab31fc3659e33aef260efca55bf9f1753164c.tar.gz eumel-src-98cab31fc3659e33aef260efca55bf9f1753164c.tar.bz2 eumel-src-98cab31fc3659e33aef260efca55bf9f1753164c.zip |
Add source files from Michael
Diffstat (limited to 'system/printer-9nadel/1986/src/CHARED.ELA')
-rw-r--r-- | system/printer-9nadel/1986/src/CHARED.ELA | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/system/printer-9nadel/1986/src/CHARED.ELA b/system/printer-9nadel/1986/src/CHARED.ELA new file mode 100644 index 0000000..a54679f --- /dev/null +++ b/system/printer-9nadel/1986/src/CHARED.ELA @@ -0,0 +1,47 @@ +PACKET chared DEFINES chared :
+
+PROC chared (TEXT VAR text denoter, BOOL CONST dens) :
+FILE VAR f := editfile;
+TEXT VAR t ;
+ROW 30 INT VAR bytes ;
+INT VAR i, zeile, max breite := 0 ;
+FOR i FROM 1 UPTO 30 REP
+ bytes(i) := 0
+PER ;
+input (f) ;
+zeile := 7 ;
+WHILE NOT eof (f) REP
+ getline (f, t) ;
+ convert line ;
+ zeile DECR 1
+UNTIL zeile < 0 PER ;
+convert to text denoter .
+
+
+convert line :
+ FOR i FROM 1 UPTO LENGTH t REP
+ IF (t SUB i) <> " " AND (t SUB i) <> "."
+ THEN setbit (bytes (i), zeile) ;
+ max breite := max (max breite, i)
+ FI
+ PER .
+
+convert to text denoter :
+ text denoter := """""27""K""" ;
+ IF dens
+ THEN text denoter CAT text (max breite)
+ ELSE text denoter CAT text (max breite DIV 2)
+ FI ;
+ text denoter CAT """""0""" ;
+ FOR i FROM 1 UPTO max breite REP
+ IF dens OR (i AND 1) = 1
+ THEN text denoter CAT """" ;
+ text denoter CAT text (bytes (i)) ;
+ text denoter CAT """"
+ FI
+ PER ;
+ text denoter CAT """" .
+
+ENDPROC chared ;
+
+ENDPACKET chared
|