11590Srgrimes#	@(#)README	8.1 (Berkeley) 6/6/93
278384Smikeh#
378384Smikeh# $FreeBSD$
41590Srgrimes
51590Srgrimescol - filter out reverse line feeds.
61590Srgrimes
71590SrgrimesOptions are:
81590Srgrimes	-b	do not print any backspaces (last character written is printed)
91590Srgrimes	-f	allow half line feeds in output, by default characters between
101590Srgrimes		lines are pushed to the line below
1178384Smikeh	-p	force unknown control sequences to be passed through unchanged
121590Srgrimes	-x	do not compress spaces into tabs.
131590Srgrimes	-l num	keep (at least) num lines in memory, 128 are kept by default
141590Srgrimes
151590SrgrimesIn the 32V source code to col(1) the default behavior was to NOT compress
161590Srgrimesspaces into tabs.  There was a -h option which caused it to compress spaces
171590Srgrimesinto tabs.  There was no -x flag.
181590Srgrimes
191590SrgrimesThe 32V documentation, however, was consistent with the SVID (actually, V7
201590Srgrimesat the time) and documented a -x flag (as defined above) while making no
211590Srgrimesmention of a -h flag.  Just before 4.3BSD went out, CSRG updated the manual
221590Srgrimespage to reflect the way the code worked.  Suspecting that this was probably
231590Srgrimesthe wrong way to go, this version adopts the SVID defaults, and no longer
241590Srgrimesdocuments the -h option.
251590Srgrimes
261590SrgrimesKnown differences between AT&T's col and this one (# is delimiter):
271590Srgrimes	Input			AT&T col		this col
281590Srgrimes	#\nabc\E7def\n#		#   def\nabc\r#		#   def\nabc\n#
291590Srgrimes	#a#			##			#a\n#
301590Srgrimes		- last line always ends with at least one \n (or \E9)
311590Srgrimes	#1234567 8\n#		#1234567\t8\n#		#1234567 8\n#
321590Srgrimes		- single space not expanded to tab
331590Srgrimes     -f #a\E8b\n#		#ab\n#			# b\E9\ra\n#
341590Srgrimes		- can back up past first line (as far as you want) so you
351590Srgrimes		  *can* have a super script on the first line
361590Srgrimes	#\E9_\ba\E8\nb\n#	#\n_\bb\ba\n#		#\n_\ba\bb\n#
371590Srgrimes		- always print last character written to a position,
381590Srgrimes		  AT&T col claims to do this but doesn't.
391590Srgrimes
401590SrgrimesIf a character is to be placed on a line that has been flushed, a warning
411590Srgrimesis produced (the AT&T col is silent).   The -l flag (not in AT&T col) can
421590Srgrimesbe used to increase the number of lines buffered to avoid the problem.
431590Srgrimes
441590SrgrimesGeneral algorithm: a limited number of lines are buffered in a linked
451590Srgrimeslist.  When a printable character is read, it is put in the buffer of
461590Srgrimesthe current line along with the column it's supposed to be in.  When
471590Srgrimesa line is flushed, the characters in the line are sorted according to
481590Srgrimescolumn and then printed.
49