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