#include <sys/time.h>
#endif
-MODULE_ID("$Id: control.c,v 1.8 2005/09/17 19:49:16 tom Exp $")
+MODULE_ID("$Id: control.c,v 1.9 2006/06/24 21:27:53 tom Exp $")
/* terminfo test program control subroutines */
#define RESULT_BLOCK 1024
static int blocks; /* number of result blocks available */
static struct test_results *results; /* pointer to next available */
-static struct test_results *pads[STRCOUNT]; /* save pad results here */
+static struct test_results **pads; /* save pad results here */
+
+static void
+alloc_arrays(void)
+{
+ if (pads == 0) {
+ pads = (struct test_results **)calloc(MAX_STRINGS, sizeof(struct test_results *));
+ }
+}
/*
** event_start(number)
struct test_results *r; /* Results of current test */
int ss_index[TT_MAX]; /* String index */
+ alloc_arrays();
if (tty_can_sync == SYNC_TESTED) {
bogus = tty_sync_error();
} else {
struct test_results *r; /* a result */
int delay;
+ alloc_arrays();
if ((r = pads[x])) {
sprintf(temp, "(%s)", strnames[x]);
ptext(temp);