Date: Mon, 2 Aug 2004 10:48:52 -0400 (EDT) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: friar_josh@tcbug.org (Josh Paetzel) Cc: questions@freebsd.org Subject: Re: Way OT programming question Message-ID: <200408021448.i72EmqP22346@clunix.cl.msu.edu> In-Reply-To: <200408011829.58952.friar_josh@tcbug.org> from "Josh Paetzel" at Aug 01, 2004 06:29:58 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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 <sys/cdefs.h> > __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 > _______________________________________________
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408021448.i72EmqP22346>