home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / modcomp / bufemp. < prev    next >
Text File  |  1987-01-25  |  5KB  |  134 lines

  1.       SUBROUTINE BUFEMP(BUFFER,LEN)
  2. C
  3. C     ****************************************************************
  4. C
  5. C              KERMIT for the MODCOMP MAXIV operating system
  6. C
  7. C        Compliments of:
  8. C
  9. C                         SETPOINT, Inc.
  10. C                      10245 Brecksville Rd.
  11. C                      Brecksville, Ohio 44141
  12. C
  13. C
  14. C      KERMIT is a copyrighted protocol of Columbia Univ. The authors
  15. C      of this version hereby grant permission to copy this software
  16. C      provided that it is not used for an explicitly commercial
  17. C      purpose and that proper credit be given. SETPOINT, Inc. makes
  18. C      no warranty whatsoever regarding the accuracy of this package
  19. C      and will assume no liability resulting from it's use.
  20. C
  21. C     ****************************************************************
  22. C
  23. C     Abstract:  RECOVERS CONTROL CHARACTERS, STRIPS LINE FEEDS, AND
  24. C                CALLS DPUTCH TO WRITE OUT TO DISK
  25. C
  26. C     MODIFICATION HISTORY
  27. C
  28. C     BY            DATE     REASON            PROGRAMS AFFECTED
  29. C
  30. C     ****************************************************************
  31. C
  32. C     Author: BOB BORGESON          Version: A.0    Date: Oct-86
  33. C
  34. C     Calling Parameters:
  35. C
  36. C     R    BUFFER       - Data to be written to disk
  37. C     R    LEN          - Number of bytes to be written
  38. C
  39. C     ****************************************************************
  40. C
  41. C     Messages generated by this module :  None
  42. C
  43. C     ****************************************************************
  44. C
  45. C     Subroutines called directly :  CTL, DPUTCH
  46. C
  47. C     ****************************************************************
  48. C
  49. C     Files referenced :  None
  50. C
  51. C     ****************************************************************
  52. C
  53. C     Local variable definitions :
  54. C
  55. C     CH     - UFT FOR THE DISK FILE
  56. C
  57. C     ****************************************************************
  58. C
  59. C     Commons referenced :  KER, KERPAR
  60. C
  61. C     ****************************************************************
  62. C
  63. C     (*$END.DOCUMENT*)
  64. C
  65. C     ****************************************************************
  66. C     *                                                              *
  67. C     *         D I M E N S I O N   S T A T E M E N T S              *
  68. C     *                                                              *
  69. C     ****************************************************************
  70. C
  71.       IMPLICIT INTEGER (A-Z)
  72.       INTEGER*2   BUFFER(132)
  73. C
  74. C     ****************************************************************
  75. C     *                                                              *
  76. C     *         T Y P E   S T A T E M E N T S                        *
  77. C     *                                                              *
  78. C     ****************************************************************
  79. C
  80. C
  81. C     ****************************************************************
  82. C     *                                                              *
  83. C     *         C O M M O N   S T A T E M E N T S                    *
  84. C     *                                                              *
  85. C     ****************************************************************
  86. C
  87.       INCLUDE USL/KERCOM
  88.       INCLUDE USL/KERPMC
  89. C
  90. C     ****************************************************************
  91. C     *                                                              *
  92. C     *         E Q U I V A L E N C E   S T A T E M E N T S          *
  93. C     *                                                              *
  94. C     ****************************************************************
  95. C
  96. C
  97. C     ****************************************************************
  98. C     *                                                              *
  99. C     *         D A T A   S T A T E M E N T S                        *
  100. C     *                                                              *
  101. C     ****************************************************************
  102. C
  103. C
  104. C     ****************************************************************
  105. C
  106. C     Code starts here :
  107. C                                     !UFT  OF RECEIVING DISK FILE
  108.       CH=8
  109. C                                     !START WITH THE VERY FIRST CHARACT
  110.       I=1
  111. C                                     !PUT LEN CHARACTERS INTO DISK FILE
  112.   100 CONTINUE
  113.       IF(I.GT.LEN) GO TO 9000
  114. C                                     !GET THE NEXT CHARACTER FROM BUFFE
  115.          T=BUFFER(I)
  116. C                                     !IS THIS MY QUOTE CHARACTER
  117.          IF(T.NE.MYQUOTE)GO TO 200
  118. C                                     !INCREMENT THE COUNTER
  119.             I=I+1
  120. C                                     !GET NEXT CHARACTER FROM BUFFER
  121.             T=BUFFER(I)
  122. C                                     !IS THIS QUOTE CHARACTER THE
  123.             IF(T.NE.MYQUOTE)T=CTL(T)
  124. C                                     !ACTUAL QUOTE CHARACTER
  125.   200    CONTINUE
  126. C                                     !FILTER OUT LF
  127.          IF(T.NE.LF)CALL DPUTCH(T,CH)
  128.          I=I+1
  129.          GO TO 100
  130. C
  131.  9000 CONTINUE
  132.       RETURN
  133.       END
  134.