From owner-freebsd-questions@FreeBSD.ORG Mon Aug 2 14:49:05 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A5B116A4CE for ; Mon, 2 Aug 2004 14:49:05 +0000 (GMT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3EA443D31 for ; Mon, 2 Aug 2004 14:49:04 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id i72EmqP22346; Mon, 2 Aug 2004 10:48:52 -0400 (EDT) From: Jerry McAllister Message-Id: <200408021448.i72EmqP22346@clunix.cl.msu.edu> To: friar_josh@tcbug.org (Josh Paetzel) Date: Mon, 2 Aug 2004 10:48:52 -0400 (EDT) In-Reply-To: <200408011829.58952.friar_josh@tcbug.org> from "Josh Paetzel" at Aug 01, 2004 06:29:58 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: questions@freebsd.org Subject: Re: Way OT programming question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Aug 2004 14:49:05 -0000 > > I've been muddling through some of the source files for FreeBSD > 5.2.1-RELEASE, and I've noticed that a large number of .c files > in /usr/src have something similar to below in them: > > #ifndef lint > #if 0 > static char sccsid[] = "@(#)cat.c 8.2 (Berkeley) 4/27/95"; > #endif > #endif /* not lint */ > #include > __FBSDID("$FreeBSD: src/bin/cat/cat.c,v 1.29 2003/04/30 17:40:28 > obrien Exp $"); > > 1) Isn't 'if 0' always negative? In a boolean usage like above, yes. Anyway, FALSE usually gets defined to be 0. So, the above piece of code is disabled - sort of commented out, so to speak. > 2) What is the __FBSDID line doing? Looks like it sets or checks some version information. Guess I could look it up, but then, so could you. ////jerry > > -- > Thanks, > > Josh Paetzel > _______________________________________________