Date: Sat, 30 Jan 1999 10:06:18 -0500 (EST) From: Brian Feldman <green@unixhelp.org> To: Nik Clayton <nik@nothing-going-on.demon.co.uk> Cc: Greg Lehey <grog@lemis.com>, Garrett Wollman <wollman@khavrinen.lcs.mit.edu>, chat@FreeBSD.ORG Subject: Re: You are not expected to understand this (was: btokup().. patch to STYLE(9) (fwd)) Message-ID: <Pine.BSF.4.05.9901300959500.28645-100000@janus.syracuse.net> In-Reply-To: <19990130090229.A19159@catkin.nothing-going-on.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 30 Jan 1999, Nik Clayton wrote: > On Sat, Jan 30, 1999 at 10:57:42AM +1030, Greg Lehey wrote: > > > The comment was actually ``You are not expected to understand this'', > > > and it was in v7's swtch(). > > > > Almost. From the Sixth Edition, /usr/sys/ken/slp.c, the end of > > swtch(): > > <snip> > > FWIW, there's a similar comment in sys/i386/boot/biosboot/io.c and > sys/pci/ncr.c. What am I not expected to understand about the one in io.c? tw_chars is most likely ('|' | '/' << 8 | '-' << 16 | '\\' << 24) (I sure hope I got operator precedence right, if not, then tw_chars is int = *(int *)"|/-\\"). tw_chars = (tw_chars >> 8) | ((tw_chars & (unsigned long)0xFF) << 24); would simply change tw_chars from "|/-\\" to "/-\\|" and so on. I think that someone made too much out of this to be quoting Ken. > > I have memories of a particularly hairy piece of code somewhere in the > time/date libraries, with the comment "You are expected not to understand > this", but I can't find it now. > > N > -- > Bagel: The carbohydrate with the hole > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9901300959500.28645-100000>