mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 15:26:23 -05:00
8fc7449839
ansi.c:255:6: warning: symbol 'ansihello' was not declared. Should it be static? epath.h:11:6: warning: symbol 'pathname' was not declared. Should it be static? display.c:36:7: warning: symbol 'vscreen' was not declared. Should it be static? display.c:38:7: warning: symbol 'pscreen' was not declared. Should it be static? display.c:927:5: warning: symbol 'updateline' was not declared. Should it be static? evar.h:20:6: warning: symbol 'uv' was not declared. Should it be static? evar.h:24:6: warning: symbol 'envars' was not declared. Should it be static? evar.h:128:7: warning: symbol 'funcs' was not declared. Should it be static? fileio.c:14:6: warning: symbol 'ffp' was not declared. Should it be static? fileio.c:15:5: warning: symbol 'eofflag' was not declared. Should it be static? ibmpc.c:505:6: warning: symbol 'ibmhello' was not declared. Should it be static? isearch.c:36:5: warning: symbol 'saved_get_char' was not declared. Should it be static? isearch.c:37:5: warning: symbol 'eaten_char' was not declared. Should it be static? isearch.c:41:5: warning: symbol 'cmd_buff' was not declared. Should it be static? isearch.c:42:5: warning: symbol 'cmd_offset' was not declared. Should it be static? isearch.c:43:5: warning: symbol 'cmd_reexecute' was not declared. Should it be static? line.c:21:6: warning: symbol 'ykbuf' was not declared. Should it be static? line.c:22:5: warning: symbol 'ykboff' was not declared. Should it be static? lock.c:17:6: warning: symbol 'lname' was not declared. Should it be static? lock.c:18:5: warning: symbol 'numlocks' was not declared. Should it be static? vmsvt.c:521:6: warning: symbol 'hellovms' was not declared. Should it be static? vt52.c:181:6: warning: symbol 'vt52hello' was not declared. Should it be static? Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
186 lines
3.0 KiB
C
186 lines
3.0 KiB
C
/* VT52.C
|
|
*
|
|
* The routines in this file
|
|
* provide support for VT52 style terminals
|
|
* over a serial line. The serial I/O services are
|
|
* provided by routines in "termio.c". It compiles
|
|
* into nothing if not a VT52 style device. The
|
|
* bell on the VT52 is terrible, so the "beep"
|
|
* routine is conditionalized on defining BEL.
|
|
*
|
|
* modified by Petri Kutvonen
|
|
*/
|
|
|
|
#define termdef 1 /* don't define "term" external */
|
|
|
|
#include <stdio.h>
|
|
#include "estruct.h"
|
|
#include "edef.h"
|
|
|
|
#if VT52
|
|
|
|
#define NROW 24 /* Screen size. */
|
|
#define NCOL 80 /* Edit if you want to. */
|
|
#define MARGIN 8 /* size of minimim margin and */
|
|
#define SCRSIZ 64 /* scroll size for extended lines */
|
|
#define NPAUSE 100 /* # times thru update to pause */
|
|
#define BIAS 0x20 /* Origin 0 coordinate bias. */
|
|
#define ESC 0x1B /* ESC character. */
|
|
#define BEL 0x07 /* ascii bell character */
|
|
|
|
extern int ttopen(); /* Forward references. */
|
|
extern int ttgetc();
|
|
extern int ttputc();
|
|
extern int ttflush();
|
|
extern int ttclose();
|
|
extern int vt52move();
|
|
extern int vt52eeol();
|
|
extern int vt52eeop();
|
|
extern int vt52beep();
|
|
extern int vt52open();
|
|
extern int vt52rev();
|
|
extern int vt52cres();
|
|
extern int vt52kopen();
|
|
extern int vt52kclose();
|
|
|
|
#if COLOR
|
|
extern int vt52fcol();
|
|
extern int vt52bcol();
|
|
#endif
|
|
|
|
/*
|
|
* Dispatch table. All the
|
|
* hard fields just point into the
|
|
* terminal I/O code.
|
|
*/
|
|
TERM term = {
|
|
NROW - 1,
|
|
NROW - 1,
|
|
NCOL,
|
|
NCOL,
|
|
MARGIN,
|
|
SCRSIZ,
|
|
NPAUSE,
|
|
&vt52open,
|
|
&ttclose,
|
|
&vt52kopen,
|
|
&vt52kclose,
|
|
&ttgetc,
|
|
&ttputc,
|
|
&ttflush,
|
|
&vt52move,
|
|
&vt52eeol,
|
|
&vt52eeop,
|
|
&vt52beep,
|
|
&vt52rev,
|
|
&vt52cres
|
|
#if COLOR
|
|
, &vt52fcol,
|
|
&vt52bcol
|
|
#endif
|
|
#if SCROLLCODE
|
|
, NULL
|
|
#endif
|
|
};
|
|
|
|
vt52move(row, col)
|
|
{
|
|
ttputc(ESC);
|
|
ttputc('Y');
|
|
ttputc(row + BIAS);
|
|
ttputc(col + BIAS);
|
|
}
|
|
|
|
vt52eeol()
|
|
{
|
|
ttputc(ESC);
|
|
ttputc('K');
|
|
}
|
|
|
|
vt52eeop()
|
|
{
|
|
ttputc(ESC);
|
|
ttputc('J');
|
|
}
|
|
|
|
vt52rev(status)
|
|
/* set the reverse video state */
|
|
int status; /* TRUE = reverse video, FALSE = normal video */
|
|
|
|
{
|
|
/* can't do this here, so we won't */
|
|
}
|
|
|
|
vt52cres()
|
|
{ /* change screen resolution - (not here though) */
|
|
return (TRUE);
|
|
}
|
|
|
|
spal()
|
|
{ /* change palette string */
|
|
/* Does nothing here */
|
|
}
|
|
|
|
#if COLOR
|
|
vt52fcol()
|
|
{ /* set the forground color [NOT IMPLIMENTED] */
|
|
}
|
|
|
|
vt52bcol()
|
|
{ /* set the background color [NOT IMPLIMENTED] */
|
|
}
|
|
#endif
|
|
|
|
vt52beep()
|
|
{
|
|
#ifdef BEL
|
|
ttputc(BEL);
|
|
ttflush();
|
|
#endif
|
|
}
|
|
|
|
vt52open()
|
|
{
|
|
#if V7 | BSD
|
|
register char *cp;
|
|
char *getenv();
|
|
|
|
if ((cp = getenv("TERM")) == NULL) {
|
|
puts("Shell variable TERM not defined!");
|
|
exit(1);
|
|
}
|
|
if (strcmp(cp, "vt52") != 0 && strcmp(cp, "z19") != 0) {
|
|
puts("Terminal type not 'vt52'or 'z19' !");
|
|
exit(1);
|
|
}
|
|
#endif
|
|
ttopen();
|
|
}
|
|
|
|
vt52kopen()
|
|
{
|
|
}
|
|
|
|
vt52kclose()
|
|
{
|
|
}
|
|
|
|
|
|
#if FNLABEL
|
|
fnclabel(f, n)
|
|
/* label a function key */
|
|
int f, n; /* default flag, numeric argument [unused] */
|
|
|
|
{
|
|
/* on machines with no function keys...don't bother */
|
|
return (TRUE);
|
|
}
|
|
#endif
|
|
#else
|
|
|
|
static void vt52hello(void)
|
|
{
|
|
}
|
|
|
|
#endif
|