home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
modcomp
/
bufemp.
< prev
next >
Wrap
Text File
|
1987-01-25
|
5KB
|
134 lines
SUBROUTINE BUFEMP(BUFFER,LEN)
C
C ****************************************************************
C
C KERMIT for the MODCOMP MAXIV operating system
C
C Compliments of:
C
C SETPOINT, Inc.
C 10245 Brecksville Rd.
C Brecksville, Ohio 44141
C
C
C KERMIT is a copyrighted protocol of Columbia Univ. The authors
C of this version hereby grant permission to copy this software
C provided that it is not used for an explicitly commercial
C purpose and that proper credit be given. SETPOINT, Inc. makes
C no warranty whatsoever regarding the accuracy of this package
C and will assume no liability resulting from it's use.
C
C ****************************************************************
C
C Abstract: RECOVERS CONTROL CHARACTERS, STRIPS LINE FEEDS, AND
C CALLS DPUTCH TO WRITE OUT TO DISK
C
C MODIFICATION HISTORY
C
C BY DATE REASON PROGRAMS AFFECTED
C
C ****************************************************************
C
C Author: BOB BORGESON Version: A.0 Date: Oct-86
C
C Calling Parameters:
C
C R BUFFER - Data to be written to disk
C R LEN - Number of bytes to be written
C
C ****************************************************************
C
C Messages generated by this module : None
C
C ****************************************************************
C
C Subroutines called directly : CTL, DPUTCH
C
C ****************************************************************
C
C Files referenced : None
C
C ****************************************************************
C
C Local variable definitions :
C
C CH - UFT FOR THE DISK FILE
C
C ****************************************************************
C
C Commons referenced : KER, KERPAR
C
C ****************************************************************
C
C (*$END.DOCUMENT*)
C
C ****************************************************************
C * *
C * D I M E N S I O N S T A T E M E N T S *
C * *
C ****************************************************************
C
IMPLICIT INTEGER (A-Z)
INTEGER*2 BUFFER(132)
C
C ****************************************************************
C * *
C * T Y P E S T A T E M E N T S *
C * *
C ****************************************************************
C
C
C ****************************************************************
C * *
C * C O M M O N S T A T E M E N T S *
C * *
C ****************************************************************
C
INCLUDE USL/KERCOM
INCLUDE USL/KERPMC
C
C ****************************************************************
C * *
C * E Q U I V A L E N C E S T A T E M E N T S *
C * *
C ****************************************************************
C
C
C ****************************************************************
C * *
C * D A T A S T A T E M E N T S *
C * *
C ****************************************************************
C
C
C ****************************************************************
C
C Code starts here :
C !UFT OF RECEIVING DISK FILE
CH=8
C !START WITH THE VERY FIRST CHARACT
I=1
C !PUT LEN CHARACTERS INTO DISK FILE
100 CONTINUE
IF(I.GT.LEN) GO TO 9000
C !GET THE NEXT CHARACTER FROM BUFFE
T=BUFFER(I)
C !IS THIS MY QUOTE CHARACTER
IF(T.NE.MYQUOTE)GO TO 200
C !INCREMENT THE COUNTER
I=I+1
C !GET NEXT CHARACTER FROM BUFFER
T=BUFFER(I)
C !IS THIS QUOTE CHARACTER THE
IF(T.NE.MYQUOTE)T=CTL(T)
C !ACTUAL QUOTE CHARACTER
200 CONTINUE
C !FILTER OUT LF
IF(T.NE.LF)CALL DPUTCH(T,CH)
I=I+1
GO TO 100
C
9000 CONTINUE
RETURN
END