! ! ! Description: ! ! ! ! This macro is used to change non-printable characters into ! ! printable characters to print on the line printer. Control ! ! characters are converted into the ^char format and the escape ! ! character is changed to a dollar sign. ! ! ! ! To invoke: $ see :== "$sys$system:teco mung see" ! ! $ see file_name ! ! ! hxa hk @:en/qa/"u @^A%SEE - Unable to find input file(s) % :G* @^A% % ex ' @en// !nxtfil! g* hxa @:er/qa/"u @^A%SEE - Unable to open input file % :G* @^A% % hk ex ' j @:s/]/"s 0k ' @:s/./"s k @i/see/ | zj @i/.see/ ' hxa hk @:ew/qa/"u @^A%SEE - Unable to open output file % :G* @^A% % ex ' @^A%Creating file % :g* @^A% % ! Counters: q0=char in, q1=control char, q2=char out, q3=escapes ! 0u0 0u1 0u2 0u3 < 0j < .-z; ! Exit interations at end of buf. ! %0^[ ! Count the characters processed. ! 0a-128"g 0a-128@i// d r ' ! Strip the parity bit (if any). ! 0a-127"e 0a-96@i// d r ' ! Convert delete to control char. ! 0a-31"g c f< ' ! Skip if not a control charater. ! 0a-09"e c f< ' ! Skip horizontal tabs. ! 0a-10"e c f< ' ! Skip line feeds. ! 0a-13"e c f< ' ! Skip carriage returns. ! 0a-27"e %3^[ d @i/$/ f< ' ! Escape goes to dollar sign. ! %1^[ ! Count the control characters. ! @i/^/ 0a+64@i// d ! All others go to ^char. ! > q2+zu2 ! Accumulate the output count. ! hpw hk ! Write out the current buffer. ! ^n^_; 25<"t zj 12@i// ' 1:A;> ! Read next 25 records if not EOF ! > @^A%Statistics: Characters in: % q0:= @^A%, characters out: % q2:= @^A%, control: % q1:= @^A% (% q3:= @^A%) % ec @:en//"s @o!nxtfil! ' ex