Module Name: src Committed By: christos Date: Mon Jan 28 17:29:44 UTC 2019
Modified Files: src/share/misc: style Log Message: document how we want to use __nothing To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/share/misc/style Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/misc/style diff -u src/share/misc/style:1.53 src/share/misc/style:1.54 --- src/share/misc/style:1.53 Mon May 23 07:41:06 2016 +++ src/share/misc/style Mon Jan 28 12:29:44 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: style,v 1.53 2016/05/23 11:41:06 salazar Exp $ */ +/* $NetBSD: style,v 1.54 2019/01/28 17:29:44 christos Exp $ */ /* * The revision control tag appears first, with a blank line after it. @@ -30,7 +30,7 @@ #include <sys/cdefs.h> __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: style,v 1.53 2016/05/23 11:41:06 salazar Exp $"); +__RCSID("$NetBSD: style,v 1.54 2019/01/28 17:29:44 christos Exp $"); /* * VERY important single-line comments look like this. @@ -154,6 +154,16 @@ enum enumtype { } et; /* + * Sometimes we want a macro to be conditionally defined for debugging + * and expand to nothing (but still as statement) when we are not debugging: + */ +#ifdef FOO_DEBUG +# define DPRINTF(...) printf(__VA_ARGS__) +#else +# define DPRINTF(...) __nothing +#endif + +/* * When declaring variables in structures, declare them organized by use in * a manner to attempt to minimize memory wastage because of compiler alignment * issues, then by size, and then by alphabetical order. E.g, don't use