Home | History | Annotate | Line # | Download | only in col
      1  1.1.1.2  glass #	@(#)README	8.1 (Berkeley) 6/6/93
      2      1.1    cgd 
      3      1.1    cgd col - filter out reverse line feeds.
      4      1.1    cgd 
      5      1.1    cgd Options are:
      6      1.1    cgd 	-b	do not print any backspaces (last character written is printed)
      7      1.1    cgd 	-f	allow half line feeds in output, by default characters between
      8      1.1    cgd 		lines are pushed to the line below
      9      1.1    cgd 	-x	do not compress spaces into tabs.
     10      1.1    cgd 	-l num	keep (at least) num lines in memory, 128 are kept by default
     11      1.1    cgd 
     12      1.1    cgd In the 32V source code to col(1) the default behavior was to NOT compress
     13      1.1    cgd spaces into tabs.  There was a -h option which caused it to compress spaces
     14      1.1    cgd into tabs.  There was no -x flag.
     15      1.1    cgd 
     16      1.1    cgd The 32V documentation, however, was consistent with the SVID (actually, V7
     17      1.1    cgd at the time) and documented a -x flag (as defined above) while making no
     18      1.1    cgd mention of a -h flag.  Just before 4.3BSD went out, CSRG updated the manual
     19      1.1    cgd page to reflect the way the code worked.  Suspecting that this was probably
     20      1.1    cgd the wrong way to go, this version adopts the SVID defaults, and no longer
     21      1.1    cgd documents the -h option.
     22      1.1    cgd 
     23      1.1    cgd The S5 -p flag is not supported because it isn't clear what it does (looks
     24      1.1    cgd like a kludge introduced for a particular printer).
     25      1.1    cgd 
     26      1.1    cgd Known differences between AT&T's col and this one (# is delimiter):
     27      1.1    cgd 	Input			AT&T col		this col
     28      1.1    cgd 	#\nabc\E7def\n#		#   def\nabc\r#		#   def\nabc\n#
     29      1.1    cgd 	#a#			##			#a\n#
     30      1.1    cgd 		- last line always ends with at least one \n (or \E9)
     31      1.1    cgd 	#1234567 8\n#		#1234567\t8\n#		#1234567 8\n#
     32      1.1    cgd 		- single space not expanded to tab
     33      1.1    cgd      -f #a\E8b\n#		#ab\n#			# b\E9\ra\n#
     34      1.1    cgd 		- can back up past first line (as far as you want) so you
     35      1.1    cgd 		  *can* have a super script on the first line
     36      1.1    cgd 	#\E9_\ba\E8\nb\n#	#\n_\bb\ba\n#		#\n_\ba\bb\n#
     37      1.1    cgd 		- always print last character written to a position,
     38      1.1    cgd 		  AT&T col claims to do this but doesn't.
     39      1.1    cgd 
     40      1.1    cgd If a character is to be placed on a line that has been flushed, a warning
     41      1.1    cgd is produced (the AT&T col is silent).   The -l flag (not in AT&T col) can
     42      1.1    cgd be used to increase the number of lines buffered to avoid the problem.
     43      1.1    cgd 
     44      1.1    cgd General algorithm: a limited number of lines are buffered in a linked
     45      1.1    cgd list.  When a printable character is read, it is put in the buffer of
     46      1.1    cgd the current line along with the column it's supposed to be in.  When
     47      1.1    cgd a line is flushed, the characters in the line are sorted according to
     48      1.1    cgd column and then printed.
     49