Licensing Information
Open Source Used In Cisco DSP IP Cameras 409
static char *escapes = "E\033r\rn\nb\bt\tf\f\\\\";
/* Pointer for tgetstr() et al */
static char *term_entry;
static int is_malloced;
/* Table with speeds for padding. */
static short speeds[] = {
0, 50, 75, 110, 134, 150, -3, -6, -12, -18,
-20, -24, -36, -48, -72, -96, -192, -384, -576, -1152
};
/* Some (undocumented?) global variables. */
speed_t ospeed;
int tputs_baud_rate;
char PC;
int tgetent_bufsize = 1024;
/* We store a terminal description in a linked list. */
struct tc_ent {
struct tc_ent *next;
char cap[1];
};
/* Safe malloc. */
static void *xmalloc(int len)
{
void *x;
if ((x = malloc(len)) != NULL) return(x);
write(2, "Virtual memory exhausted.\n", 26);
exit(1);
}
/* Safe strdup() */
static char *strsave(char *s)
{
char *x;
x = xmalloc(strlen(s) + 1);
strcpy(x, s);
return(x);
}
/*
*Try to shrink a capability.
*/
static void shrinkcap(char *r, char *s)