/*
* Copyright 2001 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*LINTLIBRARY*/
#ifndef lint
static char
#endif /* not lint */
/*
* Terminal initialization routines.
*/
#include <unistd.h>
#include <string.h>
#include <sgtty.h>
#include "curses.ext"
#include <term.h>
/* forward declaration */
void zap(void);
static bool *sflags[] = {
&XX
};
static char *_PC,
**sstrs[] = {
};
/*
* This routine does terminal type initialization routines, and
* calculation of flags at entry. It is almost entirely stolen from
* Bill Joy's ex version 2.6.
*/
int
gettmode(void)
{
return (ERR);
savetty();
#ifdef DEBUG
#endif
return (OK);
}
int
{
int unknown;
#ifdef TIOCGWINSZ
#endif
#ifdef DEBUG
#endif
if (type[0] == '\0')
type = "xx";
unknown++;
}
#ifdef DEBUG
#endif
#ifdef TIOCGWINSZ
if (LINES == 0)
if (COLS == 0)
}
#endif
if (LINES == 0)
if (LINES <= 5)
LINES = 24;
if (COLS == 0)
if (COLS <= 4)
COLS = 80;
#ifdef DEBUG
#endif
zap(); /* get terminal description */
/*
* Handle funny termcap capabilities
*/
else
if (unknown)
return (ERR);
return (OK);
}
/*
* This routine gets all the terminal flags from the termcap database
*/
void
zap(void)
{
char *namp;
bool **fp;
char ***sp;
#ifdef DEBUG
char *cp;
#endif
namp = "ambsdadbeohchzinmimsncnsosulxbxnxtxsxx";
do {
#ifdef DEBUG
#endif
namp += 2;
} while (*namp);
namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9"
"hoicimipkdkekhklkrkskullmandnlpcrcscsesfsosrtatet"
"iucueupusvbvsveALDLUPDOLERI";
do {
#ifdef DEBUG
}
#endif
namp += 2;
} while (*namp);
if (XS)
else {
if (tgetnum("sg") > 0)
if (tgetnum("ug") > 0)
}
}
}
/*
* return a capability from termcap
*/
char *
{
}