1
#!/bin/sh /usr/share/dpatch/dpatch-run
2
## 13-implict-defs.dpatch by LaMont Jones <lamont@debian.org>
4
## DP: Fix implicit definitions throughout (Closes: #441115).
8
diff -Naur expect-5.43.orig/Dbg.c expect-5.43/Dbg.c
9
--- expect-5.43.orig/Dbg.c 2002-03-23 04:11:54.000000000 +0000
10
+++ expect-5.43/Dbg.c 2007-10-10 10:00:12.000000000 +0000
19
diff -Naur expect-5.43.orig/exp_chan.c expect-5.43/exp_chan.c
20
--- expect-5.43.orig/exp_chan.c 2007-10-10 10:00:23.000000000 +0000
21
+++ expect-5.43/exp_chan.c 2007-10-10 10:00:12.000000000 +0000
27
#include "exp_rename.h"
29
#include "exp_command.h"
30
+#include "exp_event.h"
33
static int ExpBlockModeProc _ANSI_ARGS_((ClientData instanceData,
34
diff -Naur expect-5.43.orig/exp_clib.c expect-5.43/exp_clib.c
35
--- expect-5.43.orig/exp_clib.c 2007-10-10 10:00:23.000000000 +0000
36
+++ expect-5.43/exp_clib.c 2007-10-10 10:00:12.000000000 +0000
38
would appreciate credit if this program or parts of it are used.
43
#include "expect_cf.h"
47
#include <stdlib.h> /* for malloc */
52
+#include "exp_command.h"
53
#define TclRegError exp_TclRegError
57
* end of regexp definitions and code
62
* following stolen from tcl8.0.4/generic/tclPosixStr.c
71
* end of excerpt from tcl8.0.X/generic/tclPosixStr.c
72
diff -Naur expect-5.43.orig/exp_command.c expect-5.43/exp_command.c
73
--- expect-5.43.orig/exp_command.c 2007-10-10 10:00:23.000000000 +0000
74
+++ expect-5.43/exp_command.c 2007-10-10 10:00:12.000000000 +0000
84
/* objects to including varargs.h twice, just */
90
#include "expect_tcl.h"
92
#include "exp_command.h"
94
#include "exp_event.h"
95
+#include "exp_tty_in.h"
99
diff -Naur expect-5.43.orig/exp_command.h expect-5.43/exp_command.h
100
--- expect-5.43.orig/exp_command.h 2007-10-10 10:00:23.000000000 +0000
101
+++ expect-5.43/exp_command.h 2007-10-10 10:00:12.000000000 +0000
103
would appreciate credit if this program or parts of it are used.
106
+#ifndef __EXP_COMMAND_H
107
+#define __EXP_COMMAND_H
109
#ifdef HAVE_SYS_WAIT_H
110
/* ISC doesn't def WNOHANG unless _POSIX_SOURCE is def'ed */
111
# ifdef WNOHANG_REQUIRES_POSIX_SOURCE
116
-#include <tclPort.h>
117
+#include "tclPort.h"
119
#define EXP_CHANNELNAMELEN (16 + TCL_INTEGER_SPACE)
122
char name[EXP_CHANNELNAMELEN+1]; /* expect and interact set variables
123
to channel name, so for efficiency
125
- int fdin; /* input fd */
126
- int fdout; /* output fd - usually the same as fdin, although
127
+ long fdin; /* input fd - may be used for storing ClientData, a pointer */
128
+ long fdout; /* output fd - usually the same as fdin, although
129
may be different if channel opened by tcl::open */
130
Tcl_Channel channel_orig; /* If opened by someone else, i.e. tcl::open */
131
- int fd_slave; /* slave fd if "spawn -pty" used */
132
+ long fd_slave; /* slave fd if "spawn -pty" used */
134
/* this may go away if we find it is not needed */
135
/* it might be needed by inherited channels */
137
EXTERN void exp_init_send _ANSI_ARGS_((void));
138
EXTERN void exp_init_unit_random _ANSI_ARGS_((void));
139
EXTERN void exp_init_sig _ANSI_ARGS_((void));
140
+EXTERN void exp_ecmd_remove_state_direct_and_indirect _ANSI_ARGS_((Tcl_Interp *interp,ExpState *esPtr));
141
EXTERN void expChannelInit _ANSI_ARGS_((void));
142
EXTERN int expChannelCountGet _ANSI_ARGS_((void));
145
EXTERN int expStateAnyIs _ANSI_ARGS_((ExpState *));
146
EXTERN int expDevttyIs _ANSI_ARGS_((ExpState *));
147
EXTERN int expStdinOutIs _ANSI_ARGS_((ExpState *));
148
+EXTERN int expStdinoutIs _ANSI_ARGS_((ExpState *esPtr));
149
EXTERN ExpState * expStdinoutGet _ANSI_ARGS_((void));
150
EXTERN ExpState * expDevttyGet _ANSI_ARGS_((void));
152
+EXTERN int Exp_StringCaseMatch _ANSI_ARGS_((char *string, char *pattern, int nocase, int *offset));
154
/* generic functions that really should be provided by Tcl */
155
EXTERN int expSizeGet _ANSI_ARGS_((ExpState *));
156
EXTERN int expSizeZero _ANSI_ARGS_((ExpState *));
157
+#endif /* __EXP_COMMAND_H */
158
diff -Naur expect-5.43.orig/exp_glob.c expect-5.43/exp_glob.c
159
--- expect-5.43.orig/exp_glob.c 2002-03-23 04:11:54.000000000 +0000
160
+++ expect-5.43/exp_glob.c 2007-10-10 10:00:12.000000000 +0000
167
#include "expect_cf.h"
171
+int Exp_StringCaseMatch2(
172
+ register CONST char *string,
173
+ register CONST char *pattern,
176
/* The following functions implement expect's glob-style string matching */
177
/* Exp_StringMatch allow's implements the unanchored front (or conversely */
178
/* the '^') feature. Exp_StringMatch2 does the rest of the work. */
179
diff -Naur expect-5.43.orig/exp_inter.c expect-5.43/exp_inter.c
180
--- expect-5.43.orig/exp_inter.c 2004-08-18 02:03:00.000000000 +0000
181
+++ expect-5.43/exp_inter.c 2007-10-10 10:00:12.000000000 +0000
183
#include "exp_rename.h"
184
#include "exp_prog.h"
185
#include "exp_command.h"
186
+#include "exp_event.h"
189
typedef struct ThreadSpecificData {
190
diff -Naur expect-5.43.orig/exp_main_exp.c expect-5.43/exp_main_exp.c
191
--- expect-5.43.orig/exp_main_exp.c 2007-10-10 10:00:23.000000000 +0000
192
+++ expect-5.43/exp_main_exp.c 2007-10-10 10:00:12.000000000 +0000
195
#include "expect_cf.h"
199
#include "expect_tcl.h"
201
diff -Naur expect-5.43.orig/exp_main_sub.c expect-5.43/exp_main_sub.c
202
--- expect-5.43.orig/exp_main_sub.c 2007-10-10 10:00:23.000000000 +0000
203
+++ expect-5.43/exp_main_sub.c 2007-10-10 10:00:12.000000000 +0000
206
#include "expect_cf.h"
210
#ifdef HAVE_INTTYPES_H
211
# include <inttypes.h>
212
diff -Naur expect-5.43.orig/exp_main_tk.c expect-5.43/exp_main_tk.c
213
--- expect-5.43.orig/exp_main_tk.c 2007-10-10 10:00:23.000000000 +0000
214
+++ expect-5.43/exp_main_tk.c 2007-10-10 10:00:12.000000000 +0000
217
#include <string.h> /* strrchr(3) */
219
+#include "tclInt.h" /* Internal definitions for Tcl. */
225
#include "expect_tcl.h"
229
+#include "exp_command.h"
230
+#include "exp_log.h"
232
#if (TCL_MAJOR_VERSION < 8) || ((TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 4))
234
* The following variable is a special hack that is needed in order for
237
EXTERN int Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp));
239
+int Tk_Init2(Tcl_Interp *interp);
243
*----------------------------------------------------------------------
245
* Invoke platform-specific initialization.
248
- code = TkpInit(interp, 0);
249
+ code = TkpInit(interp);
253
diff -Naur expect-5.43.orig/exp_trap.c expect-5.43/exp_trap.c
254
--- expect-5.43.orig/exp_trap.c 2007-10-10 10:00:23.000000000 +0000
255
+++ expect-5.43/exp_trap.c 2007-10-10 10:00:12.000000000 +0000
257
#include "exp_prog.h"
258
#include "exp_command.h"
260
+#include "exp_event.h"
264
diff -Naur expect-5.43.orig/exp_tty.c expect-5.43/exp_tty.c
265
--- expect-5.43.orig/exp_tty.c 2004-05-07 16:23:26.000000000 +0000
266
+++ expect-5.43/exp_tty.c 2007-10-10 10:00:12.000000000 +0000
268
#include "exp_tty_in.h"
269
#include "exp_command.h"
271
+#include "exp_win.h"
273
static int is_raw = FALSE;
274
static int is_noecho = FALSE;
275
diff -Naur expect-5.43.orig/exp_tty.h expect-5.43/exp_tty.h
276
--- expect-5.43.orig/exp_tty.h 2002-02-12 02:00:55.000000000 +0000
277
+++ expect-5.43/exp_tty.h 2007-10-10 10:00:12.000000000 +0000
279
int exp_tty_raw_noecho();
282
+EXTERN int exp_tty_cooked_echo _ANSI_ARGS_((Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo));
285
int exp_tty_set_simple();
286
diff -Naur expect-5.43.orig/exp_tty_in.h expect-5.43/exp_tty_in.h
287
--- expect-5.43.orig/exp_tty_in.h 2002-02-12 02:00:55.000000000 +0000
288
+++ expect-5.43/exp_tty_in.h 2007-10-10 10:00:12.000000000 +0000
290
#define __EXP_TTY_IN_H__
292
#include "expect_cf.h"
297
#include "sys/types.h"
298
diff -Naur expect-5.43.orig/exp_win.c expect-5.43/exp_win.c
299
--- expect-5.43.orig/exp_win.c 2002-02-12 02:00:55.000000000 +0000
300
+++ expect-5.43/exp_win.c 2007-10-10 10:00:12.000000000 +0000
302
# include <sys/ptem.h>
303
#endif /* HAVE_SYS_PTEM_H */
305
-#include "exp_tty.h"
307
+#include "exp_tty_in.h"
311
diff -Naur expect-5.43.orig/exp_win.h expect-5.43/exp_win.h
312
--- expect-5.43.orig/exp_win.h 2002-02-12 02:00:56.000000000 +0000
313
+++ expect-5.43/exp_win.h 2007-10-10 10:00:12.000000000 +0000
317
/* exp_win.h - window support
319
Written by: Don Libes, NIST, 10/25/93
321
would appreciate credit if you use this file or parts of it.
324
-int exp_window_size_set();
325
-int exp_window_size_get();
326
+EXTERN int exp_window_size_set _ANSI_ARGS_((int fd));
327
+EXTERN int exp_window_size_get _ANSI_ARGS_((int fd));
329
-void exp_win_rows_set();
330
-void exp_win_rows_get();
331
-void exp_win_columns_set();
332
-void exp_win_columns_get();
334
-void exp_win2_rows_set();
335
-void exp_win2_rows_get();
336
-void exp_win2_columns_set();
337
-void exp_win2_columns_get();
338
+EXTERN void exp_win_rows_set _ANSI_ARGS_((char *rows));
339
+EXTERN void exp_win_rows_get _ANSI_ARGS_((char *rows));
340
+EXTERN void exp_win_columns_set _ANSI_ARGS_((char *columns));
341
+EXTERN void exp_win_columns_get _ANSI_ARGS_((char *columns));
343
+EXTERN void exp_win2_rows_set _ANSI_ARGS_((int fd, char *rows));
344
+EXTERN void exp_win2_rows_get _ANSI_ARGS_((int fd, char *rows));
345
+EXTERN void exp_win2_columns_set _ANSI_ARGS_((int fd, char *columns));
346
+EXTERN void exp_win2_columns_get _ANSI_ARGS_((int fd, char *columns));
348
+#endif /* __EXP_WIN_H */
349
diff -Naur expect-5.43.orig/expect.c expect-5.43/expect.c
350
--- expect-5.43.orig/expect.c 2007-10-10 10:00:23.000000000 +0000
351
+++ expect-5.43/expect.c 2007-10-10 10:00:12.000000000 +0000
354
#include <sys/types.h>
360
#include <ctype.h> /* for isspace */
366
+#include "exp_tty_in.h"
367
#include "exp_rename.h"
368
#include "exp_prog.h"
369
#include "exp_command.h"
371
#include "exp_event.h"
372
-#include "exp_tty.h"
373
#include "exp_tstamp.h" /* this should disappear when interact */
374
/* loses ref's to it */
376
diff -Naur expect-5.43.orig/pty_termios.c expect-5.43/pty_termios.c
377
--- expect-5.43.orig/pty_termios.c 2007-10-10 10:00:23.000000000 +0000
378
+++ expect-5.43/pty_termios.c 2007-10-10 10:00:12.000000000 +0000
387
#if defined(SIGCLD) && !defined(SIGCHLD)
388
#define SIGCHLD SIGCLD
392
#include "expect_cf.h"
395
+#include "exp_tty_in.h"
396
#include "exp_int.h" /* expErrnoMsg() prototype */
403
-#include "exp_tty_in.h"
404
#include "exp_rename.h"
411
-static int ttyname_checked(int fd) {
412
+static char * ttyname_checked(int fd) {