tldm-universe/Ardent/UV/BP/LA100

142 lines
5.4 KiB
Plaintext
Raw Normal View History

2024-09-09 21:51:08 +00:00
******************************************************************************
*
* Routine to handle UniVerse Spooled Device Management
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software Inc.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description........................................
* 10/14/98 23801 SAP Change copyrights.
* 10/01/93 12406 ALC Use system(32) to get uvhome directory.
* 11/10/92 10549 TMC New file
*
*******************************************************************************
*
*spooler
*created by: kk
*last modified by: rj
*rev 1.0
*
* LA100
*************************************************
*PROGRAM TO SET OPTIONS ON THE DEC LETTERPRINTER*
*BY KEN KASPER *
*4/25/84 *
*************************************************
uvpath = system(32)
execute "SH -c '":uvpath:"/runpriv runpriv'", //out. > error, //in. < "id"
if index(error,"sys2",1) or index(error,"root",1) then
* we where not able to change group successfully
print "User is not assigned to sys2 group"
stop
end else
null
end
CPI5 = CHAR(27):CHAR(91):CHAR(53):CHAR(119)
CPI6 = CHAR(27):CHAR(91):CHAR(54):CHAR(119)
CPI6.6 = CHAR(27):CHAR(91):CHAR(55):CHAR(119)
CPI8.25 = CHAR(27):CHAR(91):CHAR(56):CHAR(119)
CPI10 = CHAR(27):CHAR(91):CHAR(48):CHAR(119)
CPI12 = CHAR(27):CHAR(91):CHAR(50):CHAR(119)
CPI13.2 = CHAR(27):CHAR(91):CHAR(51):CHAR(119)
CPI16.5 = CHAR(27):CHAR(91):CHAR(52):CHAR(119)
TWOLINES = CHAR(27):CHAR(91):CHAR(52):CHAR(122)
THREELINES = CHAR(27):CHAR(91):CHAR(53):CHAR(122)
FOURLINES = CHAR(27):CHAR(91):CHAR(54):CHAR(122)
SIXLINES = CHAR(27):CHAR(91):CHAR(48):CHAR(122)
EIGHTLINES = CHAR(27):CHAR(91):CHAR(50):CHAR(122)
TWELVELINES = CHAR(27):CHAR(91):CHAR(51):CHAR(122)
FONTPITCHES = CHAR(27):CHAR(91):CHAR(63):CHAR(50):CHAR(57):CHAR(104)
ALLPITCHES = CHAR(27):CHAR(91):CHAR(63):CHAR(50):CHAR(57):CHAR(108)
LETTERQUALITY = CHAR(27):CHAR(91):CHAR(50):CHAR(34):CHAR(122)
DRAFTQUALITY = CHAR(27):CHAR(91):CHAR(49):CHAR(34):CHAR(122)
PROMPT ''
PRINT@(-1)
100 PRINT@(5,3):"Enter 1) Letter Quality or 2) Draft Quality print - ":@(-4):;INPUT QUALITY,2
IF QUALITY = '' THEN QUALITY = 2
PRINT@(57,3):QUALITY
IF QUALITY #1 AND QUALITY #2 THEN GOTO 100
IF ALPHA(QUALITY) THEN GOTO 100
200 PRINT @(5,5):"Enter Pitch Select 1) Font Pitch or 2) All Pitches - ":@(-4):;INPUT PITCH,2
IF PITCH = '' THEN PITCH = 1
PRINT@(58,5):PITCH
IF PITCH #1 AND PITCH #2 THEN GOTO 200
IF ALPHA(PITCH) THEN GOTO 200
300 PRINT@(5,7):"Enter Characters/Inch (5, 6, 6.6, 8.25, 10, 12, 13.2, 16.5) - ":@(-4):;INPUT CHARS,4
IF CHARS = '' THEN CHARS = 10
PRINT@(67,7):CHARS
IF CHARS #5 AND CHARS #6 AND CHARS #6.6 AND CHARS #8.25 AND CHARS #10 AND CHARS #12 AND CHARS #13.2 AND CHARS #16.5 THEN GOTO 300
IF ALPHA(CHARS) THEN GOTO 300
400 PRINT @(5,9):"Enter Lines/Inch (2,3,4,6,8, OR 12) - ":@(-4):;INPUT LINES,2
IF LINES = '' THEN LINES = 6
PRINT@(43,9):LINES
IF LINES #2 AND LINES #3 AND LINES #4 AND LINES #6 AND LINES #8 AND LINES #12 THEN GOTO 400
IF ALPHA(LINES) THEN GOTO 400
500 PRINT@(5,11):"Enter Number of Lines per Page - ":@(-4):;INPUT NUM.LINES,3
IF NUM.LINES = '' THEN NUM.LINES = 66
PRINT@(38,11):NUM.LINES
IF NUM.LINES < 1 THEN GOTO 500
IF ALPHA(NUM.LINES) THEN GOTO 500
*****************************************
*SETUP PITCHES
*****************************************
PRINTER ON
IF PITCH = 1 THEN PRINT FONTPITCHES
IF PITCH = 2 THEN PRINT ALLPITCHES
PRINTER OFF
****************************************
*SETUP PRINT QUALITY
****************************************
PRINTER ON
IF QUALITY = 1 THEN PRINT LETTERQUALITY
IF QUALITY = 2 THEN PRINT DRAFTQUALITY
PRINTER OFF
****************************************
*SETUP LINES PER INCH
****************************************
PRINTER ON
IF LINES = 2 THEN PRINT TWOLINES
IF LINES = 3 THEN PRINT THREELINES
IF LINES = 4 THEN PRINT FOURLINES
IF LINES = 6 THEN PRINT SIXLINES
IF LINES = 8 THEN PRINT EIGHTLINES
IF LINES = 12 THEN PRINT TWELVELINES
PRINTER OFF
****************************************
*SETUP CHARACTERS PER INCH
****************************************
PRINTER ON
IF CHARS = 5 THEN PRINT CPI5
IF CHARS = 6 THEN PRINT CPI6
IF CHARS = 6.6 THEN PRINT CPI6.6
IF CHARS = 8.25 THEN PRINT CPI8.25
IF CHARS = 10 THEN PRINT CPI10
IF CHARS = 12 THEN PRINT CPI12
IF CHARS = 13.2 THEN PRINT CPI13.2
IF CHARS = 16.5 THEN PRINT CPI16.5
PRINTER OFF
****************************************
*PRINT THE SETUP
****************************************
PRINTER ON
IF PITCH = 1 THEN PITCH = "FONT"
IF PITCH = 2 THEN PITCH = "ALL"
IF QUALITY = 1 THEN QUALITY = "LETTER"
IF QUALITY = 2 THEN QUALITY = "DRAFT"
PRINT "LINES/INCH - ":LINES
PRINT "LINES/PAGE - ":NUM.LINES
PRINT "CHARACTERS/INCH - ":CHARS
PRINT "QUALITY - ":QUALITY
PRINT "PITCH SELECT - ":PITCH
PRINTER OFF