/* automatically generated by pepy 8.0 #1 (big-screw), do not edit! */

#include "psap.h"

#ifndef lint
static char *pepyid = "pepy 8.0 #1 (big-screw) of Sat Jun 27 17:49:54 EDT 1992";
#endif

#define	advise	PY_advise

void	advise ();

/* Generated from module TESTDEBUG */
# line 25 "testdebug.py"

#ifndef	lint
static char *rcsid = "$Header: /xtel/isode/isode/pepy/RCS/testdebug.py,v 9.0 1992/06/16 12:25:01 isode Rel $";
#endif

/* LINTLIBRARY */


#include <stdio.h>


#ifndef PEPYPARM
#define PEPYPARM char *
#endif /* PEPYPARM */
extern PEPYPARM NullParm;
# line 41 "testdebug.py"

int	testdebug (pe, s)
register PE	pe;
register char	*s;
{
    char  *cp;
    register PS ps;
    static int debug = OK;
    
    switch (debug) {
	case NOTOK:
	    return;

	case OK:
	    if ((debug = (cp = getenv ("PEPYDEBUG")) && *cp ? atoi (cp)
							    : NOTOK) == NOTOK)
		return;
	    (void) fflush (stdout);
#ifndef lint
	    (void) fprintf (stderr, "testdebug made with %s\n", pepyid);
#endif
	    /* and fall... */

	default:
	    (void) fflush (stdout);
	    (void) fprintf (stderr, "%s\n", s);

	    if ((ps = ps_alloc (std_open)) == NULLPS)
		break;
	    if (std_setup (ps, stderr) != NOTOK)
		(void) pe2pl (ps, pe);
	    (void) fprintf (stderr, "--------\n");
	    ps_free (ps);
	    break;
    }
}

