SUBROUTINE CMREAD(MXLINE, LINE,EOF) NOLINEUP C C READ INPUT CARD IMAGES AND PREPARE INPUT FOR CMSCAN C MOD 1982-AUG-06 -- JWB -- GET INPUT FROM UNIT CMUNIT C MOD 1982-OCT-07 -- JWB -- SUPPRESS COMMAND ECHO IF NOECHO SET C C INPUT-- C . MXLINE - MAXIMUM NUMBER OF CHARACTERS ALLOWED IN A LOGICAL LINE C C OUTPUTS-- C . LINE() - COMPLETED LINE - CHAR*1(MXLINE) C . EOF - = 0 IF NO EOF ON UNIT CMUNIT, C . = 1 IF EOF AND NO PARTIAL LINE, C . = 2 IF EOF BEFORE EXPECTED CONTINUATION CARD. C C RECOMMENDED USAGE-- C C PARAMETER (MXLINE = ) C PARAMETER (INUNIT = ) C CHARACTER*1 LINE(MXLINE) C INTEGER EOF C$ INCLUDE (SCANLIB.CMTABL) C *** SET NOECHO=0 TO ENABLE ECHO, =1 TO DISABLE *** C CMUNIT = INUNIT C DO UNTIL (EOF.GT.0) C : CALL CMREAD(MXLINE, LINE,EOF) C : IF (EOF.EQ.0) CALL CMSCAN(LINE) C END UNTIL C IF (EOF.GT.1) C : C INCLUDE (SCANLIB.PARAMS) INCLUDE (SCANLIB.CMTABL) C CHARACTER*1 LINE(1) INTEGER MXLINE, EOF CHARACTER*1 CARD(80) INTEGER LAST, COMPLT,NEWLST LOGICAL RDEOF C LAST = 0 DO UNTIL (RDEOF .OR. COMPLT.GT.0) READ (CMUNIT, 1000, RDEOF=END) CARD 1000 FORMAT(80A1) IF (.NOT.RDEOF) THEN IF (NOECHO.EQ.0) WRITE (ERUNIT,1001) CARD 1001 FORMAT(1X,80A1) CALL CMCONT(CARD,LAST,MXLINE, COMPLT,LINE,NEWLST) LAST = NEWLST ENDIF END UNTIL C IF (RDEOF) THEN EOF = 1 IF (LAST.GT.0) EOF = 2 ELSE EOF = 0 ENDIF C C MAKE SURE LINE ENDS WITH AT C NOTE THIS ROUTINE MODIFIES EOL -- AN ITEM IN /CMTABL/ C THIS IS THE ONLY MODIFICATION ALLOWED C EOL = LAST + 1 INDX = 0 DO FOR I=1,PNTBSZ IF (PNCODE(I).EQ.CMTERM) INDX = I END FOR LINE(EOL) = PUNTBL(INDX) RETURN END