FORTRAN IV-PLUS V02-51D		02:44:01    22-AUG-78		PAGE 1   

OUTEDT.FTN   	/TR:BLOCKS/WR


        C

        C

        C

        C	OUTEDT --  GET A LINE OF A FILE TO BE USED FOR OUTPUT

        C

        C

        C

        C

        C	COPYRIGHT (C) 1976

        C	DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

        C

        C	THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

        C	SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

        C	SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

        C	OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

        C	AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

        C	AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

        C	OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

        C

        C	THE INFORMATION IN THIS SOFTWARE  IS  SUBJECT TO CHANGE WITHOUT

        C	NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

        C	EQUIPMENT CORPORATION.

        C

        C	DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

        C	SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

        C

        C

        C	K.D. MORSE  22-NOV-76

        C

        C

        C

        C

        C	THIS SUBROUTINE GETS A LINE FOR OUTPUT FROM A FILE OPENED VIA

        C	THE ROUTINE OPNFIL.  IT THEN EDITS THE LINE BASED ON THE SWITCH

        C	VALUE PROVIDED BY THE CALLER.  IF AN ERROR OCCURS, THE VARIABLE

        C	IERR1 IS SET TO THE APPROPRIATE CODE.  THE EDIT MAY INCLUDE THE

        C	REPLACING UNPRINTABLE ASCII CHARACTERS WITH PERIODS.

        C

        C

        C

        C

        C  MODIFICATIONS:

        C

        C NO		DATE		PROGRAMMER		PURPOSE

        C --		-----		----------		-------

        C

        C

        C

        C

FORTRAN IV-PLUS V02-51D		02:44:01    22-AUG-78		PAGE 2   

OUTEDT.FTN   	/TR:BLOCKS/WR


         

        C

        C

        C  VARIABLES:

        C

        C

        C	IERR1--ERROR CODE BETWEEN FORTRAN ROUTINES, <1 = ERROR

        C	IERR2--ERROR CODE FROM MACRO ROUTINES, <1 = ERROR

        C	ILUN--CHANNEL ON WHICH FILE IS OPEN

        C	IRECSZ--SIZE OF INPUT BUFFER PROVIDED BY CALLER

        C	LENINP--LENGTH OF RECORD RETURNED TO CALLER

        C	OUTMOD--MODE OF OUTPUT DESIRED, 1 = ASCII, 2 = OCTAL, 3 = HEXADECIMAL

        C	RECORD--INPUT BUFFER TO RETURN RECORD TO CALLER

        C

        C

        C

        C

FORTRAN IV-PLUS V02-51D		02:44:01    22-AUG-78		PAGE 3   

OUTEDT.FTN   	/TR:BLOCKS/WR


         

0001    	SUBROUTINE OUTEDT(ILUN,RECORD,LENINP)

        C

0002    	COMMON MAP(100,2),NUMLIN,MAPTOP(2),LSTMAP(2),MLUN,

        	1IHOLD(30,2),NINCOR,IFREE(2),IFIRST(2),LAST(2),MAXBUF,

        	2BUFR,ISWTCH,COMCHR,NSWVAL(10),LSTMAT(2),IRECSZ,

        	3MRKPNT(4,2),INOUT,MAPEND(2),LINSIZ,MAPNAM,MNMLNG,MTYPE,MSTAT

        	4,IERR1,IERR2,IKIND,OLUN,MAPMRK(3,2),MPRINT,BARCHR

        C

        C

0003    	BYTE RECORD(1),SEMI,BLANK,TAB,FF,EXCLAM,COMCHR(16),BUFR(7680,2)

0004    	BYTE MAPNAM(12),BARCHR,OUTMOD

0005    	INTEGER OLUN

0006    	DATA SEMI/59/,BLANK/32/,TAB/9/,FF/12/,EXCLAM/33/

        C

        C	GET A RECORD.

        C

0007    	CALL GETREC(ILUN,RECORD,IRECSZ,LENINP,IERR2)

0008    	IF (IERR2.LE.0) GOTO 92

0009    	IF (LENINP .EQ. 0) GOTO 90

        C

        C	CHECK IF MODE IS ASCII. IF SO, EDIT LINE FOR UNPRINTABLE CHARACTERS

        C	AND REPLACE THEM WITH PERIODS.

        C

0010    	IF (OUTMOD .NE. 1) GOTO 100

0011    	DO 50 I=1,LENINP

0012    	IF ((RECORD(I) .GE. 32) .AND. (RECORD(I) .LT. 127)) GOTO 50

0013    	IF ((RECORD(I) .GE. 9) .AND. (RECORD(I) .LE. 13)) GOTO 50

0014    	RECORD(I)=46

0015    50	CONTINUE

0016    	GOTO 100

        C

        C	MUST CLEAR BUFFER AS HAD A BLANK LINE.

        C

0017    90	DO 91 I=1,512

0018    91	RECORD(I)=0

0019    	GOTO 100

0020    92	IERR1=-(10+4*ILUN)

0021    100	RETURN

0022    	END

FORTRAN IV-PLUS V02-51D		02:44:01    22-AUG-78		PAGE 4   

OUTEDT.FTN   	/TR:BLOCKS/WR


PROGRAM SECTIONS



NUMBER	 NAME	    SIZE		ATTRIBUTES



  1	$CODE1	000334   110		RW,I,CON,LCL

  3	$IDATA	000026    11		RW,D,CON,LCL

  4	$VARS	000010     4		RW,D,CON,LCL

  5	$TEMPS	000002     1		RW,D,CON,LCL

  6	.$$$$.	037222  8009		RW,D,OVR,GBL





ENTRY POINTS



 NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS   



 OUTEDT	      1-000000





VARIABLES



 NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS   



 BARCHR	L*1   6-037220	 BLANK	L*1   4-000001	 EXCLAM	L*1   4-000004	 FF	L*1   4-000003	 I	I*2   4-000006

 IERR1	I*2   6-037172	 IERR2	I*2   6-037174	 IKIND	I*2   6-037176	 ILUN	I*2   F-000002*	 INOUT	I*2   6-037140

 IRECSZ	I*2   6-037116	 ISWTCH	I*2   6-037044	 LENINP	I*2   F-000006*	 LINSIZ	I*2   6-037146	 MAXBUF	I*2   6-001042

 MLUN	I*2   6-000632	 MNMLNG	I*2   6-037164	 MPRINT	I*2   6-037216	 MSTAT	I*2   6-037170	 MTYPE	I*2   6-037166

 NINCOR	I*2   6-001024	 NUMLIN	I*2   6-000620	 OLUN	I*2   6-037200	 OUTMOD	L*1   4-000005	 SEMI	L*1   4-000000

 TAB	L*1   4-000002





ARRAYS



 NAME   TYPE  ADDRESS	    SIZE 	DIMENSIONS



 BUFR	L*1   6-001044	036000  7680	(7680,2)

 COMCHR	L*1   6-037046	000020     8	(16)

 IFIRST	I*2   6-001032	000004     2	(2)

 IFREE	I*2   6-001026	000004     2	(2)

 IHOLD	I*2   6-000634	000170    60	(30,2)

 LAST	I*2   6-001036	000004     2	(2)

 LSTMAP	I*2   6-000626	000004     2	(2)

 LSTMAT	I*2   6-037112	000004     2	(2)

 MAP	I*2   6-000000	000620   200	(100,2)

 MAPEND	I*2   6-037142	000004     2	(2)

 MAPMRK	I*2   6-037202	000014     6	(3,2)

 MAPNAM	L*1   6-037150	000014     6	(12)

 MAPTOP	I*2   6-000622	000004     2	(2)

 MRKPNT	I*2   6-037120	000020     8	(4,2)

 NSWVAL	I*2   6-037066	000024    10	(10)

 RECORD	L*1   F-000004*	000001     0	(1)





LABELS



 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	



FORTRAN IV-PLUS V02-51D		02:44:01    22-AUG-78		PAGE 5   

OUTEDT.FTN   	/TR:BLOCKS/WR


 50	 1-000210	 90	 1-000234	 91	    **   	 92	 1-000302	 100	 1-000332





FUNCTIONS AND SUBROUTINES REFERENCED



 GETREC





TOTAL SPACE ALLOCATED = 037616  8135



NO FPP INSTRUCTIONS GENERATED



OBJ$:OUTEDT,LIS$:OUTEDT/-SP=SRC$:OUTEDT

