############################################################################ # # 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