From owner-freebsd-chat Sat Jan 30 07:06:43 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA01581 for freebsd-chat-outgoing; Sat, 30 Jan 1999 07:06:43 -0800 (PST) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA01574 for ; Sat, 30 Jan 1999 07:06:41 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.8.8/8.8.7) with ESMTP id KAA29013; Sat, 30 Jan 1999 10:06:18 -0500 (EST) Date: Sat, 30 Jan 1999 10:06:18 -0500 (EST) From: Brian Feldman X-Sender: green@janus.syracuse.net To: Nik Clayton cc: Greg Lehey , Garrett Wollman , chat@FreeBSD.ORG Subject: Re: You are not expected to understand this (was: btokup().. patch to STYLE(9) (fwd)) In-Reply-To: <19990130090229.A19159@catkin.nothing-going-on.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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(): > > > > 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