19b50d902SRodney W. Grimes# @(#)README 8.1 (Berkeley) 6/6/93 2*844518ffSMike Heffner# 39b50d902SRodney W. Grimes 49b50d902SRodney W. Grimescol - filter out reverse line feeds. 59b50d902SRodney W. Grimes 69b50d902SRodney W. GrimesOptions are: 79b50d902SRodney W. Grimes -b do not print any backspaces (last character written is printed) 89b50d902SRodney W. Grimes -f allow half line feeds in output, by default characters between 99b50d902SRodney W. Grimes lines are pushed to the line below 10*844518ffSMike Heffner -p force unknown control sequences to be passed through unchanged 119b50d902SRodney W. Grimes -x do not compress spaces into tabs. 129b50d902SRodney W. Grimes -l num keep (at least) num lines in memory, 128 are kept by default 139b50d902SRodney W. Grimes 149b50d902SRodney W. GrimesIn the 32V source code to col(1) the default behavior was to NOT compress 159b50d902SRodney W. Grimesspaces into tabs. There was a -h option which caused it to compress spaces 169b50d902SRodney W. Grimesinto tabs. There was no -x flag. 179b50d902SRodney W. Grimes 189b50d902SRodney W. GrimesThe 32V documentation, however, was consistent with the SVID (actually, V7 199b50d902SRodney W. Grimesat the time) and documented a -x flag (as defined above) while making no 209b50d902SRodney W. Grimesmention of a -h flag. Just before 4.3BSD went out, CSRG updated the manual 219b50d902SRodney W. Grimespage to reflect the way the code worked. Suspecting that this was probably 229b50d902SRodney W. Grimesthe wrong way to go, this version adopts the SVID defaults, and no longer 239b50d902SRodney W. Grimesdocuments the -h option. 249b50d902SRodney W. Grimes 259b50d902SRodney W. GrimesKnown differences between AT&T's col and this one (# is delimiter): 269b50d902SRodney W. Grimes Input AT&T col this col 279b50d902SRodney W. Grimes #\nabc\E7def\n# # def\nabc\r# # def\nabc\n# 289b50d902SRodney W. Grimes #a# ## #a\n# 299b50d902SRodney W. Grimes - last line always ends with at least one \n (or \E9) 309b50d902SRodney W. Grimes #1234567 8\n# #1234567\t8\n# #1234567 8\n# 319b50d902SRodney W. Grimes - single space not expanded to tab 329b50d902SRodney W. Grimes -f #a\E8b\n# #ab\n# # b\E9\ra\n# 339b50d902SRodney W. Grimes - can back up past first line (as far as you want) so you 349b50d902SRodney W. Grimes *can* have a super script on the first line 359b50d902SRodney W. Grimes #\E9_\ba\E8\nb\n# #\n_\bb\ba\n# #\n_\ba\bb\n# 369b50d902SRodney W. Grimes - always print last character written to a position, 379b50d902SRodney W. Grimes AT&T col claims to do this but doesn't. 389b50d902SRodney W. Grimes 399b50d902SRodney W. GrimesIf a character is to be placed on a line that has been flushed, a warning 409b50d902SRodney W. Grimesis produced (the AT&T col is silent). The -l flag (not in AT&T col) can 419b50d902SRodney W. Grimesbe used to increase the number of lines buffered to avoid the problem. 429b50d902SRodney W. Grimes 439b50d902SRodney W. GrimesGeneral algorithm: a limited number of lines are buffered in a linked 449b50d902SRodney W. Grimeslist. When a printable character is read, it is put in the buffer of 459b50d902SRodney W. Grimesthe current line along with the column it's supposed to be in. When 469b50d902SRodney W. Grimesa line is flushed, the characters in the line are sorted according to 479b50d902SRodney W. Grimescolumn and then printed. 48