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