home *** CD-ROM | disk | FTP | other *** search
- /*
- * sccsid = @(#) local.h (v2.1 3/9/90)
- *
- * Local definitions for debugging.
- *
- * This file is included in several source files.
- * The caller must have either set or unset L_DEBUG
- * The macros with DEB end with no ";". The ";" is supplied in the
- * routines. This will result in some spurious stuff but the compiler
- * should ignore empty statements.
- * Unfortunately DI must include the ";". Don't supply one when calling.
- * This is because DI is the first declaration in a routine, and there
- * is no such thing as an empty declaration. If DI is undefined on BSD systems
- * one could do something like "int;", but this is confusing, so I drop it.
- */
-
- #ifdef L_DEBUG
- extern FILE * prot;
- # define DEB1(p1) fprintf(prot,p1,I)
- # define DEB2(p1,p2) fprintf (prot,p1,I,p2)
- # define DEB3(p1,p2,p3) fprintf (prot,p1,I,p2,p3)
- # define DEB4(p1,p2,p3,p4) fprintf (prot,p1,I,p2,p3,p4)
- # define DEB5(p1,p2,p3,p4,p5) fprintf (prot,p1,I,p2,p3,p4,p5)
- # define DEB6(p1,p2,p3,p4,p5,p6) fprintf (prot,p1,I,p2,p3,p4,p5,p6)
- # define FLUSH fflush (prot)
- # define DI(s) static char * I = s;
- #else
- # define DEB1(p1)
- # define DEB2(p1,p2)
- # define DEB3(p1,p2,p3)
- # define DEB4(p1,p2,p3,p4)
- # define DEB5(p1,p2,p3,p4,p5)
- # define DEB6(p1,p2,p3,p4,p5,p6)
- # define FLUSH
- # define DI(s)
- #endif
-