REM B - Browser Option REM By David A. Green of DAG Consulting REM 1/10/99 REM Copyright 1995-2001 REM This software is free under the conditions that heading line one be NOT altered. REM There is NO warranty, and DAG Consulting CANNOT be held liable for its use. ! *#* COPY COPY.TOOLS.BP STANDARD.VARIABLES.1 (REPLACING PGM.NAME BY B, FN.NAME BY B, IO.OPEN.OPTS BY TERM.DATA) ;*#* Copied Source Follows (03-14-97) $INCLUDE STANDARD.COMMON.VARIABLES FROM COPY.TOOLS.BP $INCLUDE STANDARD.COMMON.APP.PROGRAMS FROM COPY.TOOLS.BP $INCLUDE STANDARD.VARIABLES.END FROM COPY.TOOLS.BP PGM.NAME='B'; FN.NAME ='B' CALL IO.OPEN('TERM.DATA',PASSWORDS) *#* EQUATE TRUE TO 1, FALSE TO 0 ! GOSUB INIT ! PERFORM "TERM 132,0" CAPTURING BUFF ;* Set term characteristics PERFORM CMD CAPTURING BUFF ;* Execute command and capture output ! IF BUFF THEN HDG<2> = CMD CALL SCROLL.INQ('I', '', HDG, 2, 1, ACTION, PARAMS, WORK.REC, 1) ;* Initialize LOOP REMOVE LINE FROM BUFF SETTING MORE.LINES ;* Extract a line of output GOSUB ADD.LINE.TO.BROWSER WHILE MORE.LINES REPEAT CALL SCROLL.INQ('F', '', CMD, 1, 1, ACTION, PARAMS, WORK.REC, 1) ;* Final Call END ! PERFORM "TERM ":MAX.COL:",":MAX.ROW CAPTURING BUFF ;* Reset term characteristics * STOP ;* Terminate Program ! INIT: HDG = "DAG Consulting - (480) 633-1725 - DGreen@DAGConsulting.com - www.dagconsulting.com" CMD = FIELD(@SENTENCE, " ", 2, 999) FN.NAME = FIELD(CMD, " ", 1) CLS = @(-1) ;* Turn off BPIOCP MAX.ROW = @CRTHIGH MAX.COL = @CRTWIDE RETURN ! ADD.LINE.TO.BROWSER: CALL SCROLL.INQ('N', LINE, HDG, 1, 1, ACTION, PARAMS, WORK.REC, 1) ;* Normal IF ACTION = "X" THEN MORE.LINES = FALSE RETURN