README revision 1591
1187517Sgonzo#	@(#)README	8.1 (Berkeley) 6/6/93
2187517Sgonzo
3187517Sgonzocol - filter out reverse line feeds.
4187517Sgonzo
5187517SgonzoOptions are:
6187517Sgonzo	-b	do not print any backspaces (last character written is printed)
7187517Sgonzo	-f	allow half line feeds in output, by default characters between
8187517Sgonzo		lines are pushed to the line below
9187517Sgonzo	-x	do not compress spaces into tabs.
10187517Sgonzo	-l num	keep (at least) num lines in memory, 128 are kept by default
11187517Sgonzo
12187517SgonzoIn the 32V source code to col(1) the default behavior was to NOT compress
13187517Sgonzospaces into tabs.  There was a -h option which caused it to compress spaces
14187517Sgonzointo tabs.  There was no -x flag.
15187517Sgonzo
16187517SgonzoThe 32V documentation, however, was consistent with the SVID (actually, V7
17187517Sgonzoat the time) and documented a -x flag (as defined above) while making no
18187517Sgonzomention of a -h flag.  Just before 4.3BSD went out, CSRG updated the manual
19187517Sgonzopage to reflect the way the code worked.  Suspecting that this was probably
20187517Sgonzothe wrong way to go, this version adopts the SVID defaults, and no longer
21187517Sgonzodocuments the -h option.
22187517Sgonzo
23187517SgonzoThe S5 -p flag is not supported because it isn't clear what it does (looks
24187517Sgonzolike a kludge introduced for a particular printer).
25187517Sgonzo
26187517SgonzoKnown differences between AT&T's col and this one (# is delimiter):
27187517Sgonzo	Input			AT&T col		this col
28187517Sgonzo	#\nabc\E7def\n#		#   def\nabc\r#		#   def\nabc\n#
29187517Sgonzo	#a#			##			#a\n#
30187517Sgonzo		- last line always ends with at least one \n (or \E9)
31187517Sgonzo	#1234567 8\n#		#1234567\t8\n#		#1234567 8\n#
32187517Sgonzo		- single space not expanded to tab
33187517Sgonzo     -f #a\E8b\n#		#ab\n#			# b\E9\ra\n#
34187517Sgonzo		- can back up past first line (as far as you want) so you
35187517Sgonzo		  *can* have a super script on the first line
36187517Sgonzo	#\E9_\ba\E8\nb\n#	#\n_\bb\ba\n#		#\n_\ba\bb\n#
37187517Sgonzo		- always print last character written to a position,
38187517Sgonzo		  AT&T col claims to do this but doesn't.
39232847Sgonzo
40232847SgonzoIf a character is to be placed on a line that has been flushed, a warning
41232847Sgonzois produced (the AT&T col is silent).   The -l flag (not in AT&T col) can
42232847Sgonzobe used to increase the number of lines buffered to avoid the problem.
43187517Sgonzo
44187517SgonzoGeneral algorithm: a limited number of lines are buffered in a linked
45199497Sgonzolist.  When a printable character is read, it is put in the buffer of
46187517Sgonzothe current line along with the column it's supposed to be in.  When
47187517Sgonzoa line is flushed, the characters in the line are sorted according to
48187517Sgonzocolumn and then printed.
49221257Sadrian