diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-26 15:48:07 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2006-11-26 15:48:07 +0000 |
commit | cadf8f3ea5d9f1f7ee4dc2a307c7e972d630ce95 (patch) | |
tree | 742f4ca61067d67fd171c82cdb54387898ae89ac /app/xterm | |
parent | 42f2d2c8736348b3e97fd376417093efe27c9f5a (diff) |
OpenBSD local changes
Diffstat (limited to 'app/xterm')
-rw-r--r-- | app/xterm/Tekproc.c | 2 | ||||
-rw-r--r-- | app/xterm/XTerm.ad | 25 | ||||
-rw-r--r-- | app/xterm/data.h | 1 | ||||
-rw-r--r-- | app/xterm/main.c | 5 | ||||
-rw-r--r-- | app/xterm/ptyx.h | 3 | ||||
-rw-r--r-- | app/xterm/version.h | 2 | ||||
-rw-r--r-- | app/xterm/xterm.h | 8 | ||||
-rw-r--r-- | app/xterm/xterm.man | 19 |
8 files changed, 63 insertions, 2 deletions
diff --git a/app/xterm/Tekproc.c b/app/xterm/Tekproc.c index 7dcce862c..0532d393e 100644 --- a/app/xterm/Tekproc.c +++ b/app/xterm/Tekproc.c @@ -816,6 +816,8 @@ Tinput(void) #else /* VMS */ XFD_COPYSET(&Select_mask, &Tselect_mask); + if (need_cleanup) + Cleanup(0); if (Select(max_plus1, &Tselect_mask, NULL, NULL, NULL) < 0) { if (errno != EINTR) SysError(ERROR_TSELECT); diff --git a/app/xterm/XTerm.ad b/app/xterm/XTerm.ad index 4e2004094..dafef5f25 100644 --- a/app/xterm/XTerm.ad +++ b/app/xterm/XTerm.ad @@ -1,6 +1,7 @@ ! $XTermId: XTerm.ad,v 1.81 2006/06/24 14:34:45 tom Exp $ ! $XFree86: xc/programs/xterm/XTerm.ad,v 3.37 2006/04/10 00:34:36 dickey Exp $ +*scrollBar: true *saveLines: 1024 *SimpleMenu*BackingStore: NotUseful @@ -186,3 +187,27 @@ ! ! Alternatively, !*on2Clicks: regex [[:alpha:]]+://([[:alnum:]!#+,./=?@_~-]|(%[[:xdigit:]][[:xdigit:]]))+ + +! Uncomment this to have a login shell by default +!*VT100*login_shell: true + +!This can be useful if you have an IntelliMouse. It maps the button +!events generated by the wheel +*VT100*translations: #override \ + !Ctrl <Btn4Down>: scroll-back(1,halfpage) \n\ + !Lock Ctrl <Btn4Down>: scroll-back(1,halfpage) \n\ + !Lock @Num_Lock Ctrl <Btn4Down>: scroll-back(1,halfpage) \n\ + ! @Num_Lock Ctrl <Btn4Down>: scroll-back(1,halfpage) \n\ + <Btn4Down>: scroll-back(5,line) \n\ + !Ctrl <Btn5Down>: scroll-forw(1,halfpage) \n\ + !Lock Ctrl <Btn5Down>: scroll-forw(1,halfpage) \n\ + !Lock @Num_Lock Ctrl <Btn5Down>: scroll-forw(1,halfpage) \n\ + ! @Num_Lock Ctrl <Btn5Down>: scroll-forw(1,halfpage) \n\ + <Btn5Down>: scroll-forw(5,line) + +! Restore the traditional backarrow/delete key behaviour +! The delete key should generate DEL +*deleteIsDEL: true +! and the back arrow generates whatever the erase char is set to +*ptyInitialErase: true +*backarrowKeyIsErase: true diff --git a/app/xterm/data.h b/app/xterm/data.h index 04d835c81..24ff77f63 100644 --- a/app/xterm/data.h +++ b/app/xterm/data.h @@ -122,6 +122,7 @@ extern EventMode eventMode; extern XtermWidget term; + extern SIG_ATOMIC_T need_cleanup; #if defined(HAVE_XKB_BELL_EXT) diff --git a/app/xterm/main.c b/app/xterm/main.c index 90098fca0..d3618bc6d 100644 --- a/app/xterm/main.c +++ b/app/xterm/main.c @@ -772,8 +772,13 @@ static XtResource application_resources[] = Bres("sunFunctionKeys", "SunFunctionKeys", sunFunctionKeys, False), #endif #if OPT_INITIAL_ERASE +#ifndef __OpenBSD__ Bres("ptyInitialErase", "PtyInitialErase", ptyInitialErase, DEF_INITIAL_ERASE), Bres("backarrowKeyIsErase", "BackarrowKeyIsErase", backarrow_is_erase, DEF_BACKARO_ERASE), +#else + Bres("ptyInitialErase", "PtyInitialErase", ptyInitialErase, DEF_INITIAL_ERASE), + Bres("backarrowKeyIsErase", "BackarrowKeyIsErase", backarrow_is_erase, DEF_BACKARO_ERASE), +#endif #endif Bres("waitForMap", "WaitForMap", wait_for_map, False), Bres("useInsertMode", "UseInsertMode", useInsertMode, False), diff --git a/app/xterm/ptyx.h b/app/xterm/ptyx.h index 6314436a3..5c276d7dc 100644 --- a/app/xterm/ptyx.h +++ b/app/xterm/ptyx.h @@ -144,6 +144,9 @@ #undef USE_PTY_SEARCH #elif defined(PUCC_PTYD) #undef USE_PTY_SEARCH +#elif defined(__OpenBSD__) +#undef USE_PTY_SEARCH +#undef USE_PTY_DEVICE #elif (defined(sun) && defined(SVR4)) || defined(_ALL_SOURCE) || defined(__CYGWIN__) #undef USE_PTY_SEARCH #endif diff --git a/app/xterm/version.h b/app/xterm/version.h index b07306b02..b8ce4a47d 100644 --- a/app/xterm/version.h +++ b/app/xterm/version.h @@ -10,5 +10,5 @@ #define XTERM_PATCH 216 #ifndef __vendorversion__ -#define __vendorversion__ "XTerm" +#define __vendorversion__ "XTerm/OpenBSD" #endif diff --git a/app/xterm/xterm.h b/app/xterm/xterm.h index e8a2af52e..638d0463d 100644 --- a/app/xterm/xterm.h +++ b/app/xterm/xterm.h @@ -164,6 +164,8 @@ authorization. #endif #if defined(__OpenBSD__) +#define USE_UTMP_SETGID TRUE +#define USE_OPENPTY TRUE #define DEFDELETE_DEL TRUE #define DEF_BACKARO_ERASE TRUE #define DEF_INITIAL_ERASE TRUE @@ -174,6 +176,10 @@ authorization. #define OPT_SCO_FUNC_KEYS 1 #endif +#if defined(__OpenBSD__) +#define DEFDELETE_DEL TRUE +#endif + #if defined(__SCO__) || defined(SVR4) || defined(_POSIX_SOURCE) || defined(__QNX__) || defined(__hpux) || (defined(BSD) && (BSD >= 199103)) || defined(__CYGWIN__) #define USE_POSIX_WAIT #endif @@ -777,7 +783,7 @@ extern SIGNAL_T Exit (int /* n */); #endif #ifndef SIG_ATOMIC_T -#define SIG_ATOMIC_T int +#define SIG_ATOMIC_T volatile sig_atomic_t #endif #if OPT_WIDE_CHARS diff --git a/app/xterm/xterm.man b/app/xterm/xterm.man index fc5c82202..7331c6289 100644 --- a/app/xterm/xterm.man +++ b/app/xterm/xterm.man @@ -4647,3 +4647,22 @@ Jason Bacon, Stephen P. Wall, David Wexelblat, and Thomas Dickey (XFree86 Project). +.SH OPENBSD SPECIFICS +On OpenBSD, the following resources have different default values: +.TP 8 +.B deleteIsDEL: true +The Delete key generates \fB^?\fP. +.TP 8 +.B ptyInitialErase: true +The erase character for the tty is inherited from the parent +process setting, generally \fB^?\fP. +.TP 8 +.B backarrowKeyIsErase: true +The back arrow key is set to return the erase character defined in the +tty, generally \fB^?\fP. +.PP +Moreover, on OpenBSD the +.IR termcap(5) +entry for xterm defines the +.I kb +capability as \fB^?\fP |