tldm-universe/Ardent/UV/APP.PROGS/GETPU.B
2024-09-09 17:51:08 -04:00

55 lines
1.8 KiB
Brainfuck
Executable File

*******************************************************************************
*
* uniVerse port of PI/open !GETPU subroutine
*
* 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.
*
*******************************************************************************
*
* Maintenance log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 10/05/95 16881 PGW Added check for PU$FONTNAME for Windows NT.
* 10/27/93 12299 LA Changed to use printerio opcode
* 11/12/92 9705 PVW Port PI/open GETPU subroutine to uniVerse.
*
*******************************************************************************
$OPTIONS INFORMATION
SUBROUTINE GETPU (KEY, UNIT, VALUE, CODE)
$INCLUDE UNIVERSE.INCLUDE GETPU.H
$INCLUDE UNIVERSE.INCLUDE PRINTERIO.H
CODE = 0
UNUSED = ''
VALUE = ''
PRINTERIO PK$GETPU, KEY, VALUE, UNIT, CODE, UNUSED, UNUSED, UNUSED
IF (KEY = PU$FORM) OR (KEY = PU$BANNER) OR (KEY = PU$LOCATION) OR (KEY = PU$FONTNAME) THEN
IF CODE THEN VALUE = ''
ELSE VALUE = TRIMB(VALUE)
END ELSE IF (KEY = PU$SPOOLFLAGS) THEN
* 4294967296 is 2**32. The calculations using these numbers are
* necessary because SPOOLFLAGS is handled in the underlying code as
* and unsigned 32 bit quantity. Therefore if bit 1 is set, the
* number returned will be negative.
IF VALUE LT 0 THEN VALUE += 4294967296
END ELSE
IF (KEY = PU$CONNECT) AND (VALUE = PU$DISCONNECT) THEN VALUE = ''
END
RETURN
END