Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!snorkelwacker!bloom-beacon!daemon From: scs@adam.mit.edu (Steve Summit) Newsgroups: comp.lang.c Subject: Re: setting tab stops Message-ID: <1990Jul20.023807.6391@athena.mit.edu> Date: 20 Jul 90 02:38:07 GMT References: <1037@rossignol.Princeton.EDU> Sender: daemon@athena.mit.edu (Mr Background) Reply-To: scs@adam.mit.edu (Steve Summit) Organization: Thermal Technologies, Inc. Lines: 14 In article <1037@rossignol.Princeton.EDU> tr@samadams.princeton.edu (Tom Reingold) writes: >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. >The assumption is that the terminal tabs at every eighth >position. Just use an obvious algorithm. It's more likely that you'll want to allow tab stops at arbitrary positions (i.e. not a power of two) than that you'll save significant time by using shifts and bitwise operators. Steve Summit scs@adam.mit.edu