blob: 8d34706ebd221942e9cc049ea7ae7a9b1a2a1e08 (
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
|
############################################################################
#
# File: blnk2tab.icn
#
# Subject: Program to convert strings of 2 or more blanks to tabs
#
# Author: Ralph E. Griswold
#
# Date: August 13, 1995
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This program converts strings of two or more blanks to tabs. It
# reads from standard input and writes to standard output.
#
############################################################################
procedure main(args)
local line
while line := read() do
line ? {
while writes(tab(find(" ")), "\t") do
tab(many(' '))
write(tab(0))
}
end
|