keyserv.c
上传用户:tianjinjs
上传日期:2007-01-05
资源大小:309k
文件大小:5k
- /*
- * Keyserv.c A process that translates keypresses to
- * ANSI or VT102 escape sequences.
- * Communications with this process from minicom
- * goes through pipes, file descriptors 3 & 4.
- *
- * This file is part of the minicom communications package,
- * Copyright 1991-1995 Miquel van Smoorenburg.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
- #include "port.h"
- #include "minicom.h"
- /* Emulation modes */
- #define EVT100 1
- #define EANSI 2
- /* Pipe file descriptors */
- #define from_minicom 3
- #define to_minicom 4
- /* Set modes to normal */
- int keypadmode = NORMAL;
- int cursormode = NORMAL;
- char *_tptr = (char *)NULL; /* Pointer to termcap information */
- int mode = EVT100; /* Emulation mode selector */
- int parent; /* Process ID of minicom */
- jmp_buf mainloop; /* To jump to after a 'HELLO' signal */
- char **escseq; /* Translation table to use */
- static int argument; /* Argument to 'HELLO' command */
- static int esc_char = 1; /* Escape character (initially ^A) */
- static int bs_code = 8; /* Code that backspace key sends */
- extern int pendingkeys; /* From wkeys.c */
- char *st_vtesc[] = {
- "", "