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_main.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-06  |  1.5 KB  |  62 lines

  1. /* exp_main.h - defn's for main and its subroutines */
  2.  
  3. #include <stdio.h>
  4. #include "tcl.h"
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. extern FILE *exp_cmdfile;
  11. extern int exp_cmdlinecmds;
  12. extern int exp_interactive;
  13. extern int exp_is_debugging;
  14.  
  15. #ifdef TCL_DEBUGGER
  16. extern int exp_tcl_debugger_available;
  17. #endif
  18.  
  19. /* support for Standard C and C++ prototypes */
  20. #ifdef __cplusplus
  21. #define EXP_PROTOTYPES
  22. #define EXP_VARARGS    ...
  23. #else
  24. #define EXP_VARARGS    , ...
  25. #ifdef __STDC__
  26. #define EXP_PROTOTYPES
  27. #endif
  28. #endif
  29.  
  30. #ifdef EXP_PROTOTYPES
  31. #define EXP_PROTO(x)    x
  32. #ifdef EXP_DEFINE_FNS
  33. /* when functions are really being defined, we have to use va_alist as arg */
  34. #define EXP_PROTOV(x)    va_alist
  35. #else
  36. #define EXP_PROTOV(x)    x
  37. #endif
  38. #else
  39. #define EXP_PROTO(x)    ()
  40. #define EXP_PROTOV(x)    ()
  41. #endif
  42.  
  43. /* Put double parens around macro args so they all look like a single arg */
  44. /* to preprocessor.  That way, don't need a different macro for functions */
  45. /* with a different number of arguments. */
  46.  
  47. void exp_init EXP_PROTO((Tcl_Interp *));
  48. void exp_parse_argv EXP_PROTO((Tcl_Interp *,int argc,char **argv));
  49. int  exp_interpreter EXP_PROTO((Tcl_Interp *));
  50. void exp_interpret_cmdfile EXP_PROTO((Tcl_Interp *,FILE *));
  51. void exp_interpret_rcfiles EXP_PROTO((Tcl_Interp *,int my_rc,int sys_rc));
  52.  
  53. char *exp_cook EXP_PROTO((char *s,int *len));
  54.             /* app-specific exit handler */
  55. extern void  (*exp_app_exit)EXP_PROTO((Tcl_Interp *));
  56.  
  57. void exp_exit EXP_PROTO((Tcl_Interp *,int status));
  58.  
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62.