diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2011-09-03 14:05:23 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2011-09-03 14:05:23 +0200 |
commit | bdf45bc45637eefdbdee913465729f9d31d6c255 (patch) | |
tree | 9b6538c483ad6c2b38177068d5c5730397c9f292 /comm.c | |
parent | 14a4b00c9ef680b78469333291270e4c276f100d (diff) | |
download | screen-upstream/3.9.5.tar.gz |
Imported Upstream version 3.9.5upstream/3.9.5
Diffstat (limited to 'comm.c')
-rw-r--r-- | comm.c | 352 |
1 files changed, 208 insertions, 144 deletions
@@ -3,6 +3,15 @@ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) * Copyright (c) 1987 Oliver Laumann * +#ifdef HAVE_BRAILLE + * Modified by: + * Authors: Hadi Bargi Rangin bargi@dots.physics.orst.edu + * Bill Barry barryb@dots.physics.orst.edu + * + * Modifications Copyright (c) 1995 by + * Science Access Project, Oregon State University. +#endif + * * 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, or (at your option) @@ -28,196 +37,251 @@ RCS_ID("$Id: comm.c,v 1.10 1993/11/30 19:28:07 mlschroe Exp $ FAU") #include "acls.h" #include "comm.h" +#define bcopy :-( /* or include screen.h here */ + /* Must be in alpha order ! */ struct comm comms[RC_LAST + 1] = { #ifdef MULTIUSER - { "acladd", ARGS_ONE }, - { "aclchg", ARGS_THREE }, - { "acldel", ARGS_ONE }, - { "aclgrp", ARGS_ONE }, -#endif - { "activity", ARGS_ONE }, - { "aka", NEED_FORE|ARGS_ZEROONE }, /* TO BE REMOVED */ - { "allpartial", NEED_DISPLAY|ARGS_ONE }, - { "at", NEED_DISPLAY|ARGS_TWO|ARGS_ORMORE }, - { "autodetach", ARGS_ONE }, + { "acladd", ARGS_1234 }, + { "aclchg", ARGS_23 }, + { "acldel", ARGS_1 }, + { "aclgrp", ARGS_12 }, + { "aclumask", ARGS_1|ARGS_ORMORE }, +#endif + { "activity", ARGS_1 }, +#ifdef MULTIUSER + { "addacl", ARGS_1234 }, +#endif + { "allpartial", NEED_DISPLAY|ARGS_1 }, + { "at", NEED_DISPLAY|ARGS_2|ARGS_ORMORE }, + { "autodetach", ARGS_1 }, #ifdef AUTO_NUKE - { "autonuke", NEED_DISPLAY|ARGS_ONE }, + { "autonuke", NEED_DISPLAY|ARGS_1 }, #endif - { "bell", ARGS_ZEROONE }, - { "bell_msg", ARGS_ZEROONE }, - { "bind", ARGS_ONE|ARGS_ORMORE }, + +#ifdef HAVE_BRAILLE +/* keywords for braille display (bd) */ + { "bd_bc_down", ARGS_0 }, + { "bd_bc_left", ARGS_0 }, + { "bd_bc_right", ARGS_0 }, + { "bd_bc_up", ARGS_0 }, + { "bd_bell", ARGS_01 }, + { "bd_braille_table", ARGS_01 }, + { "bd_eightdot", ARGS_01 }, + { "bd_info", ARGS_01 }, + { "bd_link", ARGS_01 }, + { "bd_lower_left", ARGS_0 }, + { "bd_lower_right", ARGS_0 }, + { "bd_ncrc", ARGS_01 }, + { "bd_port", ARGS_01 }, + { "bd_scroll", ARGS_01 }, + { "bd_skip", ARGS_01 }, + { "bd_start_braille", ARGS_01 }, + { "bd_type", ARGS_01 }, + { "bd_upper_left", ARGS_0 }, + { "bd_upper_right", ARGS_0 }, + { "bd_width", ARGS_01 }, +#endif + + { "bell", ARGS_01 }, + { "bell_msg", ARGS_01 }, + { "bind", ARGS_1|ARGS_ORMORE }, #ifdef MAPKEYS - { "bindkey", ARGS_ZERO|ARGS_ORMORE }, + { "bindkey", ARGS_0|ARGS_ORMORE }, #endif - { "break", NEED_FORE|ARGS_ZEROONE }, + { "break", NEED_FORE|ARGS_01 }, + { "breaktype", NEED_FORE|ARGS_01 }, #ifdef COPY_PASTE - { "bufferfile", ARGS_ZEROONE }, + { "bufferfile", ARGS_01 }, #endif - { "c1", NEED_FORE|ARGS_ZEROONE }, - { "charset", NEED_FORE|ARGS_ONE }, - { "chdir", ARGS_ZEROONE }, - { "clear", NEED_FORE|ARGS_ZERO }, -#ifdef MULTI - { "clone", NEED_DISPLAY|ARGS_ONE|ARGS_ORMORE }, + { "c1", NEED_FORE|ARGS_01 }, + { "caption", ARGS_12 }, +#ifdef MULTIUSER + { "chacl", ARGS_23 }, +#endif + { "charset", NEED_FORE|ARGS_1 }, + { "chdir", ARGS_01 }, + { "clear", NEED_FORE|ARGS_0 }, + { "colon", NEED_DISPLAY|ARGS_01 }, + { "command", NEED_DISPLAY|ARGS_0 }, +#ifdef COPY_PASTE + { "compacthist", ARGS_01 }, #endif - { "colon", NEED_DISPLAY|ARGS_ZEROONE }, - { "command", NEED_DISPLAY|ARGS_ZERO }, - { "console", NEED_FORE|ARGS_ZEROONE }, + { "console", NEED_FORE|ARGS_01 }, #ifdef COPY_PASTE - { "copy", NEED_FORE|ARGS_ZERO }, - { "crlf", ARGS_ZEROONE }, + { "copy", NEED_FORE|ARGS_0 }, + { "crlf", ARGS_01 }, #endif - { "debug", ARGS_ZEROONE }, + { "debug", ARGS_01 }, #ifdef AUTO_NUKE - { "defautonuke", ARGS_ONE }, -#endif - { "defc1", ARGS_ONE }, - { "defcharset", ARGS_ZEROONE }, - { "defescape", ARGS_ONE }, - { "defflow", ARGS_ONETWO }, - { "defgr", ARGS_ONE }, - { "defhstatus", ARGS_ZEROONE }, + { "defautonuke", ARGS_1 }, +#endif + { "defbreaktype", ARGS_01 }, + { "defc1", ARGS_1 }, + { "defcharset", ARGS_01 }, + { "defescape", ARGS_1 }, + { "defflow", ARGS_12 }, + { "defgr", ARGS_1 }, + { "defhstatus", ARGS_01 }, #ifdef KANJI - { "defkanji", ARGS_ONE }, + { "defkanji", ARGS_1 }, #endif #if defined(UTMPOK) && defined(LOGOUTOK) - { "deflogin", ARGS_ONE }, + { "deflogin", ARGS_1 }, #endif - { "defmode", ARGS_ONE }, - { "defmonitor", ARGS_ONE }, - { "defobuflimit", ARGS_ONE }, + { "defmode", ARGS_1 }, + { "defmonitor", ARGS_1 }, + { "defobuflimit", ARGS_1 }, #ifdef COPY_PASTE - { "defscrollback", ARGS_ONE }, -#endif - { "defwrap", ARGS_ONE }, - { "defwritelock", ARGS_ONE }, - { "detach", NEED_DISPLAY|ARGS_ZERO }, - { "digraph", NEED_DISPLAY|ARGS_ZEROONE }, - { "displays", NEED_DISPLAY|ARGS_ZERO }, - { "dumptermcap", NEED_FORE|ARGS_ZERO }, - { "echo", ARGS_ONETWO }, - { "escape", NEED_DISPLAY|ARGS_ONE }, + { "defscrollback", ARGS_1 }, +#endif + { "defshell", ARGS_1 }, + { "defsilence", ARGS_1 }, + { "defslowpaste", ARGS_1 }, + { "defwrap", ARGS_1 }, + { "defwritelock", ARGS_1 }, +#ifdef DETACH + { "detach", NEED_DISPLAY|ARGS_0 }, +#endif + { "digraph", NEED_DISPLAY|ARGS_01 }, + { "displays", NEED_DISPLAY|ARGS_0 }, + { "dumptermcap", NEED_FORE|ARGS_0 }, + { "echo", ARGS_12 }, + { "escape", NEED_DISPLAY|ARGS_1 }, #ifdef PSEUDOS - { "exec", NEED_FORE|ARGS_ZERO|ARGS_ORMORE }, -#endif - { "flow", NEED_FORE|ARGS_ZEROONE }, - { "gr", NEED_FORE|ARGS_ZEROONE }, - { "hardcopy", NEED_FORE|ARGS_ZERO }, - { "hardcopy_append", ARGS_ONE }, - { "hardcopydir", ARGS_ONE }, - { "hardstatus", NEED_DISPLAY|ARGS_ZEROONE }, - { "height", NEED_DISPLAY|ARGS_ZEROONE }, - { "help", NEED_DISPLAY|ARGS_ZERO }, + { "exec", NEED_FORE|ARGS_0|ARGS_ORMORE }, +#endif + { "fit", NEED_DISPLAY|ARGS_0 }, + { "flow", NEED_FORE|ARGS_01 }, + { "focus", NEED_DISPLAY|ARGS_0 }, + { "gr", NEED_FORE|ARGS_01 }, + { "hardcopy", NEED_FORE|ARGS_0 }, + { "hardcopy_append", ARGS_1 }, + { "hardcopydir", ARGS_1 }, + { "hardstatus", ARGS_012 }, + { "height", NEED_DISPLAY|ARGS_01 }, + { "help", NEED_DISPLAY|ARGS_0 }, #ifdef COPY_PASTE - { "history", NEED_FORE|ARGS_ZERO }, + { "history", NEED_FORE|ARGS_0 }, #endif - { "info", NEED_DISPLAY|ARGS_ZERO }, + { "hstatus", NEED_FORE|ARGS_1 }, + { "info", NEED_DISPLAY|ARGS_0 }, #ifdef KANJI - { "kanji", NEED_FORE|ARGS_ONETWO }, + { "kanji", NEED_FORE|ARGS_12 }, #endif - { "kill", NEED_FORE|ARGS_ZERO }, - { "lastmsg", NEED_DISPLAY|ARGS_ZERO }, - { "license", NEED_DISPLAY|ARGS_ZERO }, + { "kill", NEED_FORE|ARGS_0 }, + { "lastmsg", NEED_DISPLAY|ARGS_0 }, + { "license", NEED_DISPLAY|ARGS_0 }, #ifdef LOCK - { "lockscreen", NEED_DISPLAY|ARGS_ZERO }, + { "lockscreen", NEED_DISPLAY|ARGS_0 }, #endif - { "log", NEED_FORE|ARGS_ZEROONE }, - { "logfile", ARGS_ZEROONE }, + { "log", NEED_FORE|ARGS_01 }, + { "logfile", ARGS_012 }, #if defined(UTMPOK) && defined(LOGOUTOK) - { "login", NEED_FORE|ARGS_ZEROONE }, + { "login", NEED_FORE|ARGS_01 }, #endif + { "logtstamp", ARGS_012 }, #ifdef MAPKEYS - { "mapdefault", NEED_DISPLAY|ARGS_ZERO }, - { "mapnotnext", NEED_DISPLAY|ARGS_ZERO }, - { "maptimeout", ARGS_ZEROONE }, + { "mapdefault", NEED_DISPLAY|ARGS_0 }, + { "mapnotnext", NEED_DISPLAY|ARGS_0 }, + { "maptimeout", ARGS_01 }, #endif #ifdef COPY_PASTE - { "markkeys", ARGS_ONE }, + { "markkeys", ARGS_1 }, #endif - { "meta", NEED_DISPLAY|ARGS_ZERO }, - { "monitor", NEED_FORE|ARGS_ZEROONE }, - { "msgminwait", ARGS_ONE }, - { "msgwait", ARGS_ONE }, + { "meta", NEED_DISPLAY|ARGS_0 }, + { "monitor", NEED_FORE|ARGS_01 }, + { "msgminwait", ARGS_1 }, + { "msgwait", ARGS_1 }, #ifdef MULTIUSER - { "multiuser", ARGS_ONE }, + { "multiuser", ARGS_1 }, #endif #ifdef NETHACK - { "nethack", ARGS_ONE }, + { "nethack", ARGS_1 }, +#endif + { "next", NEED_DISPLAY|ARGS_0 }, +#ifdef MULTI + { "nonblock", NEED_DISPLAY|ARGS_01 }, #endif - { "next", NEED_DISPLAY|NEED_FORE|ARGS_ZERO }, - { "number", NEED_FORE|ARGS_ZEROONE }, - { "obuflimit", NEED_DISPLAY|ARGS_ZEROONE }, - { "other", NEED_DISPLAY|NEED_FORE|ARGS_ZERO }, - { "partial", NEED_FORE|ARGS_ZEROONE }, + { "number", NEED_FORE|ARGS_01 }, + { "obuflimit", NEED_DISPLAY|ARGS_01 }, + { "only", NEED_DISPLAY|ARGS_0 }, + { "other", NEED_DISPLAY|ARGS_0 }, + { "partial", NEED_FORE|ARGS_01 }, #ifdef PASSWORD - { "password", ARGS_ZEROONE }, + { "password", ARGS_01 }, #endif #ifdef COPY_PASTE - { "paste", NEED_DISPLAY|ARGS_ZEROONETWO }, - { "pastefont", ARGS_ZEROONE }, -#endif - { "pow_break", NEED_FORE|ARGS_ZEROONE }, -#ifdef POW_DETACH - { "pow_detach", NEED_DISPLAY|ARGS_ZERO }, - { "pow_detach_msg", ARGS_ZEROONE }, -#endif - { "prev", NEED_DISPLAY|NEED_FORE|ARGS_ZERO }, - { "printcmd", ARGS_ZEROONE }, - { "process", NEED_DISPLAY|ARGS_ZEROONE }, - { "quit", ARGS_ZERO }, + { "paste", NEED_DISPLAY|ARGS_012 }, + { "pastefont", ARGS_01 }, +#endif + { "pow_break", NEED_FORE|ARGS_01 }, +#if defined(DETACH) && defined(POW_DETACH) + { "pow_detach", NEED_DISPLAY|ARGS_0 }, + { "pow_detach_msg", ARGS_01 }, +#endif + { "prev", NEED_DISPLAY|ARGS_0 }, + { "printcmd", ARGS_01 }, + { "process", NEED_DISPLAY|ARGS_01 }, + { "quit", ARGS_0 }, #ifdef COPY_PASTE - { "readbuf", NEED_DISPLAY|ARGS_ZERO }, + { "readbuf", NEED_DISPLAY|ARGS_0 }, #endif - { "readreg", ARGS_ZEROONETWO }, - { "redisplay", NEED_DISPLAY|ARGS_ZERO }, - { "register", ARGS_TWO }, + { "readreg", ARGS_012 }, + { "redisplay", NEED_DISPLAY|ARGS_0 }, + { "register", ARGS_2 }, + { "remove", NEED_DISPLAY|ARGS_0 }, #ifdef COPY_PASTE - { "removebuf", ARGS_ZERO }, + { "removebuf", ARGS_0 }, #endif - { "reset", NEED_FORE|ARGS_ZERO }, - { "screen", ARGS_ZERO|ARGS_ORMORE }, + { "reset", NEED_FORE|ARGS_0 }, + { "screen", ARGS_0|ARGS_ORMORE }, #ifdef COPY_PASTE - { "scrollback", NEED_FORE|ARGS_ONE }, -#endif - { "select", ARGS_ZEROONE }, - { "sessionname", ARGS_ZEROONE }, - { "setenv", ARGS_ZEROONETWO }, - { "shell", ARGS_ONE }, - { "shellaka", ARGS_ONE }, /* TO BE REMOVED */ - { "shelltitle", ARGS_ONE }, - { "silence", NEED_FORE|ARGS_ZEROONE }, - { "silencewait", ARGS_ONE }, - { "sleep", ARGS_ONE }, - { "slowpaste", ARGS_ONE }, - { "sorendition", ARGS_ZEROONETWO }, - { "startup_message", ARGS_ONE }, - { "stuff", NEED_DISPLAY|ARGS_ONE }, + { "scrollback", NEED_FORE|ARGS_1 }, +#endif + { "select", ARGS_01 }, + { "sessionname", ARGS_01 }, + { "setenv", ARGS_012 }, + { "shell", ARGS_1 }, + { "shelltitle", ARGS_1 }, + { "silence", NEED_FORE|ARGS_01 }, + { "silencewait", ARGS_1 }, + { "sleep", ARGS_1 }, + { "slowpaste", NEED_FORE|ARGS_01 }, + { "sorendition", ARGS_012 }, + { "split", NEED_DISPLAY|ARGS_0 }, + { "startup_message", ARGS_1 }, + { "stuff", NEED_DISPLAY|ARGS_12 }, +#ifdef MULTIUSER + { "su", NEED_DISPLAY|ARGS_012 }, +#endif #ifdef BSDJOBS - { "suspend", NEED_DISPLAY|ARGS_ZERO }, -#endif - { "term", ARGS_ONE }, - { "termcap", ARGS_TWOTHREE }, - { "termcapinfo", ARGS_TWOTHREE }, - { "terminfo", ARGS_TWOTHREE }, - { "time", ARGS_ZERO }, - { "title", NEED_FORE|ARGS_ZEROONE }, - { "unsetenv", ARGS_ONE }, - { "vbell", ARGS_ZEROONE }, - { "vbell_msg", ARGS_ZEROONE }, - { "vbellwait", ARGS_ONE }, - { "version", ARGS_ZERO }, - { "wall", NEED_DISPLAY|ARGS_ONE|ARGS_ORMORE }, - { "width", NEED_DISPLAY|ARGS_ZEROONE }, - { "windows", NEED_DISPLAY|ARGS_ZERO }, - { "wrap", NEED_FORE|ARGS_ZEROONE }, + { "suspend", NEED_DISPLAY|ARGS_0 }, +#endif + { "term", ARGS_1 }, + { "termcap", ARGS_23 }, + { "termcapinfo", ARGS_23 }, + { "terminfo", ARGS_23 }, + { "time", ARGS_0 }, + { "title", NEED_FORE|ARGS_01 }, + { "umask", ARGS_1|ARGS_ORMORE }, + { "unsetenv", ARGS_1 }, + { "vbell", ARGS_01 }, + { "vbell_msg", ARGS_01 }, + { "vbellwait", ARGS_1 }, + { "verbose", ARGS_01 }, + { "version", ARGS_0 }, + { "wall", NEED_DISPLAY|ARGS_1}, + { "width", ARGS_01 }, + { "windows", NEED_DISPLAY|ARGS_0 }, + { "wrap", NEED_FORE|ARGS_01 }, #ifdef COPY_PASTE - { "writebuf", NEED_DISPLAY|ARGS_ZERO }, + { "writebuf", NEED_DISPLAY|ARGS_0 }, #endif - { "writelock", NEED_FORE|ARGS_ZEROONE }, - { "xoff", NEED_DISPLAY|ARGS_ZERO }, - { "xon", NEED_DISPLAY|ARGS_ZERO }, - { "zombie", ARGS_ZEROONE } + { "writelock", NEED_FORE|ARGS_01 }, + { "xoff", NEED_DISPLAY|ARGS_0 }, + { "xon", NEED_DISPLAY|ARGS_0 }, + { "zombie", ARGS_01 } }; |