SUBROUTINE FONT.RESET * Sends a printer reset sequence if defined for the selected printer * 01/09/92 - BTS - Original release * 06/25/92 - BTS - Add SETPRINTER option to restore the printer environment * 10/29/92 - bts - Added support for LPT2 and a reset code for each printer * 11/30/92 - bts - removed the SETPRINTER option to restore the selected * printer - now it is retained until reselected by the user * 12/01/92 - BTS - Update common for AREV 3.0 * 2/24/93 - BTS - Modify to look for a RESET font in the printer table * 01/21/95 - BTS - Move FILE responsibility to REPORT_PRINT. Remove PDISK PRN * - No message if no printer is selected. * 06/05/96 - BTS - Add print TOF at EOJ option from printer environment. * If the RESET font is defined, set TOF only if the RESET * code does not do a TOF. * 02/25/97 - BTS - Remove TOF option since R/List apparently does this now. * Remove RESET font option and use only the EOJ option. * R/List does not send the EOJ print control. * The reset sequence on the matrix resets top of form. * Since this program runs after R/List, the top of form gets * reset to the end of the R/List (at 63 lines). If you want * to use the reset sequence, add a TOF to the reset string. DECLARE SUBROUTINE MSG, SET_ACTIVE_PRINTER $INSERT SYSINCLUDE, ENVIRON.CONSTANTS $INSERT SYSINCLUDE, PRINT_CONSTANTS EQUATE UPPER$ TO "ABCDEFGHIJKLMNOPQRSTUVWXYZ" EQUATE LOWER$ TO "abcdefghijklmnopqrstuvwxyz" POSITION = '' TEMP = '' FLAG = '' * Read the environment to see which printer is selected. TEMP = '' FLAG = '' SET_ACTIVE_PRINTER(3,TEMP,FLAG) IF NOT(TEMP) THEN RETURN VAR = TEMP<1> VAR2 = @ENVIRON.SET PRINTER_ID = EXTRACT(VAR2,'',VAR,'') OPEN 'SYSPRINTERS' TO SYSPRINTERS_FILE ELSE MSG('The SYSPRINTERS table is not found.','','','') STOP END READ RECORD FROM SYSPRINTERS_FILE, PRINTER_ID:"*PRINTER" ELSE MSG('The printer record is not found.','','','') STOP END BEGFONT = RECORD<6> ENDFONT = RECORD<7> FONTLIST = RECORD<8> TOFATEOJ = RECORD<13> EOJ = RECORD<5,3> * Send EOJ if set. IF EOJ THEN PRINTER ON PRINT @(-72): PRINTER OFF END * The FONTLIST field is a multivalue with spaces allowed in the field and * trailing value marks to mark a fixed number of positions. * * CONVERT LOWER$ TO UPPER$ IN FONTLIST * LOCATE "RESET" IN FONTLIST USING @VM SETTING POSITION THEN * BEGATTRIB = (0-88) - (2 * POSITION) * ** ENDATTRIB = (0-89) - (2 * POSITION) ;* THIS IS NOT USED HERE * PRINTER ON * PRINT @(BEGATTRIB): * PRINTER OFF * END RETURN