#] #] ********************* #] loaddefs link d_Qndfs 'PRINT.NDF' - special formatting of a file being printed out # EXAMPLE: print "myfile specifications f_print := 'PRINT.NDF' ; loaddefs_start f_print ; #**************************** # List of operators, generated with : # $ cat "$d_Qndfs""PRINT.NDF" | grep "^#]" | sed 's/^#\]/ /' # ********************* loaddefs link d_Qndfs 'PRINT.NDF' - special formatting of a file being printed out print IS OPERATION Filename - #*********************************** # default specifications printspecs := "lborder (10 reshape ' ') "tborder ('' '' '' ''); "rborder (10 reshape ' '); printspecs := cols ((floor (shape printspecs / 2)) 2 reshape printspecs); IF flag_debug THEN write 'loading print' ; ENDIF ; #] print IS OPERATION Filename - print IS OPERATION Filename { Fin := open Filename "r ; Fout := open "temp "w ; IF not isfault Fin THEN lborder := first . ("lborder find first printspecs) choose second printspecs; tborder := first . ("tborder find first printspecs) choose second printspecs; IF isfault lborder THEN lborder := ''; ENDIF; IF isfault tborder THEN tborder := ''; ENDIF; noend := l; linemax := tell (65 - shape tborder); linecnt := 0; WHILE noend DO Fout EACHRIGHT writefile tborder; FOR i WITH linemax DO IF isfault (line := readfile Fin) THEN noend := o; exit 0; ENDIF; IF in (char 12) line THEN writefile Fout line; exit 0 ENDIF; line := link lborder line; writefile Fout line; ENDFOR; ENDWHILE; EACH close Fin Fout; host 'copy temp prn'; host 'erase temp'; 'print has completed job' ELSE 'file wouldnt open: ' Fin ENDIF } loaddefs_ended f_print ; # enddoc