* ring my bell
@ 1993-10-11 8:18 Arnold D. Robbins
0 siblings, 0 replies; only message in thread
From: Arnold D. Robbins @ 1993-10-11 8:18 UTC (permalink / raw)
To: sam-fans
Matty has the bell code in 9term disabled - you have to define BEEP and you
only get a bell if in Unix mode.
Me, I like to start a long running job and then echo '^G' when I'm done to
tell me I can come back to my system. So, here's a patch for 9term.c that
makes beeping a button 3 item, independent of the unix/plan 9 keyboard mode.
Not beeping is the default behaviour, so this won't affect you if you don't
want bells anyway.
And hey, if you consider this a trivial patch, don't apply it, but don't
bother to flame me about it. It makes my life easier. :-)
Arnold Robbins -- The Basement Computer | Laundry increases
Internet: arnold@skeeve.ATL.GA.US | exponentially in the
UUCP: { gatech, emory }!skeeve!arnold | number of children.
Bitnet: Forget it. Get on a real network. | -- Miriam Robbins
---------
*** 9term.h.orig Sat Sep 11 00:37:27 1993
--- 9term.h Mon Oct 11 04:05:03 1993
***************
*** 17,22 ****
--- 17,23 ----
extern int comm_fd;
extern int slave_fd;
extern int kbdmode;
+ extern int dobeep;
extern int utmpentry;
extern Rune intrchar;
*** 9term.c.orig Sat Sep 11 00:38:34 1993
--- 9term.c Mon Oct 11 04:11:09 1993
***************
*** 30,36 ****
mSCROLL
};
! static char *modenames[] = {"fwd","bkwd","suspend","view","review",0,0};
static Menu kmode = {modenames} ;
enum { mFWD,
mBKWD,
--- 30,36 ----
mSCROLL
};
! static char *modenames[] = {"fwd","bkwd","suspend","view","review",0,0,0};
static Menu kmode = {modenames} ;
enum { mFWD,
mBKWD,
***************
*** 37,46 ****
--- 37,48 ----
mSUSP,
mVIEW,
mREVIEW,
+ mBEEP,
mMODE
};
int kbdmode = PLAN9;
+ int dobeep = 0;
static Cursor whitearrow = {
{0, 0},
***************
*** 283,291 ****
FLUSHBUF();
*q++ = *p;
break;
- #ifdef BEEP
case 0x07:
! if (kbdmode == UNIX)
beep();
else {
if (q >= &buf[EMAXMSG]) /* buffer full? */
--- 285,292 ----
FLUSHBUF();
*q++ = *p;
break;
case 0x07:
! if (dobeep)
beep();
else {
if (q >= &buf[EMAXMSG]) /* buffer full? */
***************
*** 293,299 ****
*q++ = *p;
}
break;
- #endif
case '\b': /* backspace at output point */
if (q > buf)
q--;
--- 294,299 ----
***************
*** 432,437 ****
--- 432,438 ----
{
kmode.item[mMODE] = (kbdmode == PLAN9) ?"unix":"plan 9";
kmode.item[mSUSP] = suspended ? "resume" : "suspend";
+ kmode.item[mBEEP] = dobeep ? "nobeep" : "beep";
switch (menuhit(3, m, &kmode))
{
case mFWD:
***************
*** 451,456 ****
--- 452,460 ----
break;
case mREVIEW:
textset(text, _backnl(text, text->base, text->f.maxlines/2));
+ break;
+ case mBEEP:
+ dobeep = ! dobeep;
break;
case mMODE:
if (kbdmode == UNIX)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1993-10-11 8:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-10-11 8:18 ring my bell Arnold D. Robbins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).