summaryrefslogtreecommitdiff
path: root/dviware/beebe/src/dbgopen.h
blob: af4b403d7baad8d787bf781de5232677d141c778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* -*-C-*- dbgopen.h */
/*-->dbgopen*/
/**********************************************************************/
/****************************** dbgopen *******************************/
/**********************************************************************/

/* This used to be a long in-line macro, but some compilers could not */
/* handle it. */

void
dbgopen(fp, fname, openmode)
FILE* fp;				/* file pointer */
char* fname;				/* file name */
char* openmode;				/* open mode flags */
{
    if (DBGOPT(DBG_OKAY_OPEN) && (fp != (FILE *)NULL))
    {
	(void)fprintf(stderr,"%%Open [%s] mode [%s]--[OK]",fname,openmode);
	NEWLINE(stderr);
    }
    if (DBGOPT(DBG_FAIL_OPEN) && (fp == (FILE *)NULL))
    {
	(void)fprintf(stderr,"%%Open [%s] mode [%s]--[FAILED]",fname,openmode);
	NEWLINE(stderr);
    }
}