65 lines
2.1 KiB
Brainfuck
Executable File
65 lines
2.1 KiB
Brainfuck
Executable File
*******************************************************************************
|
|
*
|
|
* New System Admin - This routine creates a box, and then prompts a user
|
|
* for a text input.
|
|
*
|
|
* 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/15/96 18330 LDG Changed LEN() function to LENDP() for NLS DBCS.
|
|
* 05/13/91 8345 DTM changed print to tprint
|
|
* 05/09/91 8331 DTM Fixed Enter.box.b to handle F.4
|
|
* 2/26/91 7673 DTM Added new option, case.in, for case support
|
|
* 11/08/90 7393 DPB Much nicer ENTER.BOX.B
|
|
* 11/05/90 7393 DPB Routine first created and admin'd.
|
|
*******************************************************************************
|
|
|
|
SUBROUTINE ENTER.BOX.B(start.line, start.col, width, prmpt, invar, case.in)
|
|
|
|
*********************
|
|
* Center box
|
|
*********************
|
|
IF start.col = -1 THEN
|
|
start.col = 39-INT((width+LENDP(prmpt))/2)
|
|
END
|
|
*********************
|
|
* Do not center box
|
|
*********************
|
|
ELSE IF (start.col+width+LENDP(prmpt)+1) > 79 THEN
|
|
start.col = (79 - (width+LENDP(prmpt)+1))
|
|
END
|
|
|
|
CALL *DRAW.BOX.B(start.line,start.col,1,width+LENDP(prmpt),1)
|
|
loop:
|
|
TPRINT @(start.col+1, start.line+1):
|
|
invar=""
|
|
CALL *CINPUT.B(prmpt, invar, special,width-1,case.in)
|
|
|
|
BEGIN CASE
|
|
CASE special=8 ;* Escape was entered
|
|
invar = -1
|
|
GOTO end.part
|
|
CASE special=0 ;* Data was entered
|
|
GOTO end.part
|
|
CASE special=12
|
|
invar="*"
|
|
GOTO end.part
|
|
CASE 1 ;* Some other key entered
|
|
GOTO loop
|
|
END CASE
|
|
|
|
end.part:
|
|
CALL *DRAW.BOX.B(start.line, start.col, 1, width+LENDP(prmpt),0)
|
|
RETURN
|