home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / OL.LZH / PROGS.LZH / UNPACK.ICN < prev    next >
Text File  |  1991-07-13  |  830b  |  32 lines

  1. ############################################################################
  2. #
  3. #    Name:    unpack.icn
  4. #
  5. #    Title:    Unpackage files
  6. #
  7. #    Author:    Ralph E. Griswold
  8. #
  9. #    Date:    May 27, 1989
  10. #
  11. ############################################################################
  12. #
  13. #     This program unpackages files produced by pack.icn.  See that program
  14. #  for information about limitations.
  15. #
  16. ############################################################################
  17. #
  18. #  See also:  pack.icn
  19. #
  20. ############################################################################
  21.  
  22. procedure main()
  23.    local line, out
  24.    while line := read() do {
  25.       if line == "##########" then {
  26.          close(\out)
  27.          out := open(name := read(),"w") | stop("cannot open ",name)
  28.          }
  29.       else write(out,line)
  30.       }
  31. end
  32.