1 /* expectcomm.h - public symbols common to both expect.h and expect_tcl.h
3 Written by: Don Libes, libes@cme.nist.gov, NIST, 12/3/90
5 Design and implementation of this program was paid for by U.S. tax
6 dollars. Therefore it is public domain. However, the author and NIST
7 would appreciate credit if this program or parts of it are used.
10 #ifndef _EXPECT_COMM_H
11 #define _EXPECT_COMM_H
13 /* common return codes for Expect functions */
14 /* The library actually only uses TIMEOUT and EOF */
15 #define EXP_ABEOF -1 /* abnormal eof in Expect */
16 /* when in library, this define is not used. */
17 /* Instead "-1" is used literally in the */
18 /* usual sense to check errors in system */
20 #define EXP_TIMEOUT -2
21 #define EXP_TCLERROR -3
22 #define EXP_FULLBUFFER -5
24 #define EXP_NOMATCH -7
25 #define EXP_CANTMATCH EXP_NOMATCH
26 #define EXP_CANMATCH -8
27 #define EXP_DATA_NEW -9 /* if select says there is new data */
28 #define EXP_DATA_OLD -10 /* if we already read data in another cmd */
30 #define EXP_RECONFIGURE -12 /* changes to indirect spawn id lists */
31 /* require us to reconfigure things */
33 /* in the unlikely event that a signal handler forces us to return this */
34 /* through expect's read() routine, we temporarily convert it to this. */
35 #define EXP_TCLRET -20
36 #define EXP_TCLCNT -21
37 #define EXP_TCLCNTTIMER -22
38 #define EXP_TCLBRK -23
39 #define EXP_TCLCNTEXP -24
40 #define EXP_TCLRETTCL -25
42 /* yet more TCL return codes */
43 /* Tcl does not safely provide a way to define the values of these, so */
44 /* use ridiculously different numbers for safety */
45 #define EXP_CONTINUE -101 /* continue expect command */
46 /* and restart timer */
47 #define EXP_CONTINUE_TIMER -102 /* continue expect command */
48 /* and continue timer */
49 #define EXP_TCL_RETURN -103 /* converted by interact */
50 /* and interpeter from */
51 /* inter_return into */
55 * Everything below here should eventually be moved into expect.h
56 * and Expect-thread-safe variables.
59 EXTERN char *exp_pty_error; /* place to pass a string generated */
60 /* deep in the innards of the pty */
61 /* code but needed by anyone */
62 EXTERN int exp_disconnected; /* proc. disc'd from controlling tty */
65 #endif /* _EXPECT_COMM_H */