[go: up one dir, main page]

File: exp_log.h

package info (click to toggle)
dejagnu 1.3-8
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 6,980 kB
  • ctags: 2,855
  • sloc: ansic: 41,277; exp: 9,037; sh: 2,765; makefile: 2,431; lisp: 1,403; tcl: 1,242
file content (29 lines) | stat: -rw-r--r-- 1,117 bytes parent folder | download | duplicates (2)
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
27
28
29
/* exp_log.h */

#include "expect_comm.h"
#include "exp_printify.h"

/* special version of log for non-null-terminated strings which */
/* never need printf-style formatting. */
#define logn(buf,length)  { \
			  if (logfile) fwrite(buf,1,length,logfile); \
			  if (debugfile) fwrite(buf,1,length,debugfile); \
			  }

#define dprintify(x)	((is_debugging || debugfile)?exp_printify(x):0)
/* in circumstances where "debuglog(printify(...))" is written, call */
/* dprintify instead.  This will avoid doing any formatting that would */
/* occur before debuglog got control and decided not to do anything */
/* because (is_debugging || debugfile) was false. */

EXTERN void exp_errorlog EXP_PROTOV(EXP_VARARGS(char *, arg1));
EXTERN void exp_log EXP_PROTOV(EXP_VARARGS(int, arg1));
EXTERN void exp_debuglog EXP_PROTOV(EXP_VARARGS(char *, arg1));
EXTERN void exp_nflog EXP_PROTO((char *buf, int force_stdout));
EXTERN void exp_nferrorlog EXP_PROTO((char *buf, int force_stdout));

extern FILE *debugfile;
extern FILE *logfile;
extern int logfile_all;

extern int is_debugging;	/* useful to know for avoid debug calls */