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

83 lines
2.5 KiB
Brainfuck
Executable File

*******************************************************************************
*
* Check, set or unset bit to suspend disk writes.
*
* 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.
* 05/20/98 21718 LPC/WSM Initial coding.
*
*******************************************************************************
OP = ""
FF = ""
GET(ARG., 1) OP
GET(ARG., 2) FF
OP = UPCASE( OP )
IF UPCASE( FF ) = "FORCE" THEN FORCE.FLAG = 1 ELSE FORCE.FLAG = 0
BEGIN CASE
CASE OP = "OFF"
* Must be superuser
IF SYSTEM(27) # 0 THEN
PRINT "You must be super-user to run this program"
STOP
END
* Turn off file suspension
ASSIGN 0 to SYSTEM(43)
CASE OP = "ON"
* Must be superuser
IF SYSTEM(27) # 0 THEN
PRINT "You must be super-user to run this program"
STOP
END
* Warning
IF NOT( FORCE.FLAG) THEN
PRINT "This command will suspend file updates, no utility"
PRINT "that can modify the file structure should be running."
PRINT "Do you wish to proceed? ":
INPUT ANS
ANS = UPCASE( ANS )
IF ANS # "Y" AND ANS # "YES" THEN
STOP
END
END
* Turn on file suspension
ASSIGN 1 to SYSTEM(43)
* Warning
IF NOT( FORCE.FLAG) THEN
PRINT
PRINT "Make certain buffers have been flushed to the disk."
END
CASE OP = ""
IF SYSTEM(43) = 1 THEN
PRINT "Suspension of file updates is active"
END ELSE
PRINT "Suspension of file updates is inactive"
END
CASE 1
PRINT QUOTE( OP ): " is an invalid argument."
END CASE
END