home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / computervision / kermit.nextfile < prev    next >
Text File  |  2020-01-01  |  1KB  |  46 lines

  1. ;  7 aug 85 esj created
  2. ;--------------------------< nextfile >---------------------------------
  3.    E'F
  4.    E'O NEXTFILE.( FILEDESC, FNAME)
  5. ;-----------------------------------------------------------------------
  6. ; purpose
  7. ;  to get the next file name from the file specified in fd
  8. ;
  9. ; input
  10.    I'R FILEDESC(*)   ; descriptor of the file containing names
  11. ;
  12. ; output
  13.    I'R FNAME(*)      ; cgos format filename. fname will = 0 when there
  14.                      ; are no more files to be opened
  15. ;
  16. ; insert files
  17. /INCLUDE BYU.PROG.KERMIT.SYM.EQU.KERDEF
  18. ;
  19. ; local static storage
  20.    I'R CHAR
  21. ;
  22. ; global
  23. ;  none
  24. ;
  25. ;----------------------< start of code >--------------------------------
  26.    FNAME(0) = 0
  27.    R'T
  28.       E'E DGETCH.(CHAR, FILEDESC)
  29.       W'R CHAR .E. '0D' .OR. CHAR .E. -1
  30.          E'E PACKLINE.($! $, FNAME)
  31.          B'K
  32.       E'L
  33.       E'E PACKLINE.(CHAR,FNAME)
  34.    F'R
  35.  
  36. #  E'E TYPE.(0,0)
  37. #  E'E HEXDMP.(FNAME, FNAME+FNAME+1, FNAME, FNAME)
  38.  
  39.    W'R CHAR .E. -1
  40.       E'E CLOSTEXT.(FILEDESC)
  41.       FNAME = 0
  42.    E'L
  43.  
  44.    F'N  GOOD
  45.    E'N
  46.