/********************************************************************/ /* Package : TeXShell for CMS, version 2.00 */ /* Author : Humberto Jose' Bortolossi */ /* */ /* Bitnet : hjbortol at brlncc.bitnet, hjbortol at brfuem.bitnet */ /* internet : hjbortol at impa.br */ /* */ /* Organizations : Instituto de Matematica Pura e Aplicada (IMPA) */ /* Fundacao Universidade Estadual de Maringa' */ /* */ /* Copyright : This program is freely distributable. */ /* You can do changes but, please, keep my name. */ /* */ /* Description : This macro xedit is used to print DVI files on a */ /* printer. You must modify this macro to your local */ /* system (I guess it would not be difficulty). */ /* */ /* (C) Copyright 1992-1993 */ /********************************************************************/ parse arg fm 'execio 1 diskr PRIMARY FILE' fm '(FINIS' pull fn ft . set emsg off 'listfile TEXSHELL CONFIG * (ALLOC NOHEADER STACK' if rc /= 0 then do say 'File TEXSHELL CONFIG * not found.' say 'Taking K as fonts disk.' Dropbuf Disk_fonts = 'K' end else do pull . . FileMode . . NumberOfLines . DropBuf 'execio' NumberOfLines 'diskr TEXSHELL CONFIG' FileMode '(FINIS' do forever while queued() /= 0 pull Label Information . if Label = 'FONTS_DISK' then do Disk_fonts = substr(Information,1,1) DropBuf end else Disk_fonts = 'K' end end 'listfile TEXSHELL CONFIG * (ALLOC NOHEADER STACK' if rc /= 0 then do say 'File TEXSHELL CONFIG * not found.' say 'Taking 3820 as printer.' Dropbuf Disk_fonts = 'K' end else do pull . . FileMode . . NumberOfLines . DropBuf 'execio' NumberOfLines 'diskr TEXSHELL CONFIG' FileMode '(FINIS' do forever while queued() /= 0 pull Label Information . if Label = 'PRINTER' then do Printer = Information DropBuf end else Printer = '3820' end end say 'First page (default is 0)?' parse pull first_page result = datatype(first_page) if result = 'CHAR' then first_page = 0 say 'Last page (default is 99999)?' parse pull last_page result = datatype(last_page) if result = 'CHAR' then last_page = 99999 number_of_pages = (last_page - first_page) + 1 select when Printer = '3820' then do 'exec dvi3820' fn '(' first_page number_of_pages say say 'Wait a while. Processing file.' say 'laser on 2 nodisp standard' /* 'PRT3827' FN 'LIST3820 A (FONT (* FONT3820' DISK_FONTS') SE)' */ /* 'PRT3827' FN 'LIST3820 A (OPTIONS(TEX OPTIONS *))' */ 'PSF' FN 'LIST3820' FM '(OPTIONS(TEX OPTIONS *))' /* 'PSP' FN 'LIST3820 A (OPTIONS(TEX OPTIONS E))' */ 'erase' fn 'LIST3820 *' /* 'CP SPOOL PRT CLASS A FORM STANDARD DEST OFF' */ 'laser off 2 nodisp' end when Printer = '3812' then do 'exec dvi3812' fn '(' first_page number_of_pages say say 'Wait a while. Processing file.' say /* 'CP SPOOL PRT CLASS L FORM STANDARD DEST PR3827' */ 'PRT3827' FN 'LIST3812 A (FONT (* FONT3812' DISK_FONTS') SE)' 'erase' fn 'LIST3812 *' /* 'CP SPOOL PRT CLASS A FORM STANDARD DEST OFF' */ end when Printer = '38PP' then do 'exec dvi38pp' fn '(' first_page number_of_pages say say 'Wait a while. Processing file.' say /*'CP SPOOL PRT CLASS L FORM STANDARD DEST PR3827' */ 'PRT3827' FN 'LIST38PP A (FONT (* FONT3812' DISK_FONTS') SE)' 'erase' fn 'LIST38PP *' /*'CP SPOOL PRT CLASS A FORM STANDARD DEST OFF' */ end otherwise do 'exec dvi38pp' fn '(' first_page number_of_pages say say 'Wait a while. Processing file.' say 'PSF' FN 'LIST3820' FM '(OPTIONS(TEX OPTIONS *))' /* 'CP SPOOL PRT CLASS L FORM STANDARD DEST PR3827' */ /* 'PSF' FN 'LIST3820 A (OP (TEX OPTIONS A))' */ /* 'PSP' FN 'LIST3820 A (OPTIONS(TEX OPTIONS E))' */ 'erase' fn 'LIST3820 *' /* 'cp spool prt class a form standard dest off' */ end end set emsg on exit 0