setting tab stops

Tom Reingold tr at samadams.princeton.edu
Fri Jul 13 07:03:14 AEST 1990


This question is not relevant to C, but I saw a nice algorithm, and I
think I saw it in comp.lang.c.  Someone posted a very terse way of
calculating how many spaces to move given an input of tabs.  I think it
used the modulo operator and some bitwise operators.  It was far too
terse and elegant for me to think of.  Can someone express what I am
thinking of?  The assumption is that the terminal tabs at every eighth
position.
--
                                        Tom Reingold
                                        tr at samadams.princeton.edu
                                        rutgers!princeton!samadams!tr
                                        201-577-5814
                                        "Brew strength depends upon the
                                         amount of coffee used." -Black&Decker



More information about the Comp.lang.c mailing list