home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / expect / expect-4.7 / exp_log.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-08  |  950 b   |  32 lines

  1. /* exp_log.h */
  2.  
  3. #include "exp_printify.h"
  4.  
  5. extern int loguser;    /* shared by cmdLoguser, cmdExpect and cmdSpawn */
  6.  
  7. /* special version of log for non-null-terminated strings which */
  8. /* never need printf-style formatting. */
  9. #define logn(buf,length)  { \
  10.               if (logfile) fwrite(buf,1,length,logfile); \
  11.               if (debugfile) fwrite(buf,1,length,debugfile); \
  12.               }
  13.  
  14. #define dprintify(x)    ((is_debugging || debugfile)?exp_printify(x):0)
  15. /* in circumstances where "debuglog(printify(...))" is written, call */
  16. /* dprintify instead.  This will avoid doing any formatting that would */
  17. /* occur before debuglog got control and decided not to do anything */
  18. /* because (is_debugging || debugfile) was false. */
  19.  
  20. void Log();
  21. void errorlog();
  22. void exp_debuglog();
  23. void nflog();
  24. void nferrorlog();
  25.  
  26. extern FILE *debugfile;
  27. extern FILE *logfile;
  28. extern int logfile_all;
  29. extern int loguser;
  30.  
  31. extern int is_debugging;    /* useful to know for avoid debug calls */
  32.