Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lll-winken!uunet!mcvax!hp4nl!botter!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re^2: Bit Switching - How? Message-ID: <2295@solo11.cs.vu.nl> Date: 13 Apr 89 00:13:11 GMT References: <2345@van-bc.UUCP> <486@lakart.UUCP> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 12 dg@lakart.UUCP (David Goodenough) writes: \#define swap(a, b, n) ((a) ^= ((b) & (n)), (b) ^= ((a) & (n)), \ \ (a) ^= ((b) & (n))) This one still suffers from the following: swap(*p, *q, ~0); where p and q point at the same location. -- "If it isn't aesthetically pleasing, |Maarten Litmaath @ VU Amsterdam: it's probably wrong." (jim@bilpin). |maart@cs.vu.nl, mcvax!botter!maart