aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9term
AgeCommit message (Collapse)AuthorFilesLines
2021-02-18Merge remote-tracking branch 'upstream/master'HEADmasterPetter Rodhelind2-0/+22
2020-12-309term: add threadmaybackgroundRuss Cox1-0/+6
2020-12-309term: use openpty on NetBSDNicola Girardi1-0/+16
Fixes #376.
2020-06-18Merge remote-tracking branch 'upstream/master'Petter Rodhelind2-0/+4
2020-05-07all: fix #includes for AIX, add a few AIX "implementation" filesBen Huntsman2-0/+4
2020-02-11Merge remote-tracking branch 'upstream/master'Petter Rodhelind1-10/+0
2020-01-16malloc: remove lockingDan Cross1-10/+0
The issue manifests in fork: POSIX fork mandates that a fork'd process is created with a single thread. If a multithreaded program forks, and some thread was in malloc() when the fork() happened, then in the child the lock will be held but there will be no thread to release it. We assume the system malloc() must already know how to deal with this and is thread-safe, but it won't know about our custom spinlock. Judging that this is no longer necessary (the lock code was added 15 years ago) we remove it. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-14Merge remote-tracking branch 'upstream/master'Petter Rodhelind11-113/+139
2020-01-10Trivial changes: whitespace and modes.Dan Cross11-113/+107
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
2020-01-079term: add a "look" menu item (#299)Fazlul Shahriar3-0/+32
Add a menu item which functions similar to acme's `Look` command. This is copied from 9front. See: https://code.9front.org/hg/plan9front/rev/1f1596dbca51 https://code.9front.org/hg/plan9front/rev/d2de1d2f7b48
2019-01-07Merge remote-tracking branch 'upstream/master'Petter Rodhelind2-1/+22
2018-11-149term: make 9term -l invoke $SHELL with -lRuss Cox1-1/+6
2018-11-139term: fix getpts on FreeBSD 11.2 (#199)Xiao-Yong1-0/+16
Opening /dev/ptyXX files fails on recent FreeBSD versions. Following the same fix being applied to Linux, OpenBSD, and Darwin, we use openpty to open a pseudoterminal in openpts.
2018-04-20Merge remote-tracking branch 'upstream/master'Petter Rodhelind1-0/+1
2018-03-239term: Set TERM_PROGRAM to termprogMartin Kühl1-0/+1
TERM_PROGRAM is the customary way to identify which kind of terminal emulator program one uses on macOS. This change sets TERM_PROGRAM to termprog since both variables are used for the same purpose.
2017-11-27Merge remote-tracking branch 'upstream/master'Petter Rodhelind1-0/+1
2017-11-279term: re-enable sys: child note for child processesRuss Cox1-0/+1
Fixes #6. Change-Id: Id9950f59c7970575866a7c22a69bfbf3a271f2bb
2017-11-069term: Fix ptys in MacOS High Sierra.Petter Rodhelind1-9/+12
2017-10-269term: Use acme colors.Petter Rodhelind1-3/+6
2017-10-139term: fix getpts on macOS 10.13David du Colombier1-0/+16
Since macOS 10.13, opening the /dev/ptyXX files always return ENOENT. Consequently, we changed getpts to use openpty to open a pseudoterminal, like on Linux and OpenBSD. Fixes #90. Fixes #110.
2017-04-089term: Add missing parentheses, preventing buffer overflow.Ray Lai1-1/+1
(el-sr) is the string length and (sizeof wdir - strlen(name) - 20) is the buffer size. When the string length is greater than the buffer size, the beginning of the string is supposed to be trimmed to fit in the buffer size. Unfortunately a pair of parentheses were missing, pointing sr outside the buffer, and the for loop below then reads outside the buffer. For certain binary data printed in a window, it causes a segfault. Change-Id: Iffeaa348260ee2a5a36d9577308fb8d1c1688d05 Reviewed-on: https://plan9port-review.googlesource.com/1540 Reviewed-by: Gleydson Soares <gsoares@gmail.com>
2017-01-099term: c nitsRuss Cox2-2/+3
Change-Id: Ia18ebb28f24bc69f404004896f9ce54ddb53faf9 Reviewed-on: https://plan9port-review.googlesource.com/2782 Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-09cmd/9term: A hack because I'm constantly getting confused about ^C vs fn+deleteDave Presotto3-0/+11
Since Google (and a lot of the outside) is so engrained with using ^C as interrupt, I'd like to be able to use it in 9term if I've stty'd my intr to ^C. Without this, hitting ^C still works but if the program behind the window isn't reading from /dev/cons, it won't take effect till after I hit a newline which is often very confusing. I know this is a hack since it only works if I stty intr ^C but that seems the only other character that gets used anyways. Change-Id: I0597e63b2d7628f5668c648e6dba6f281e4b27fd Reviewed-on: https://plan9port-review.googlesource.com/2742 Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-069term, win: work around bsd linker nonsenseRuss Cox1-2/+2
Change-Id: Ifcef0636ee1e1fd0f9b06a8d1a99d58fae831318 Reviewed-on: https://plan9port-review.googlesource.com/2780 Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-069term, mc: conspire to handle hidpi displaysRuss Cox1-0/+8
9term now uses the low bit of ws.ws_ypixel to signal whether this is a hidpi display, and mc adjusts the font it uses for columnation accordingly. Makes 'lc' work right on hidpi displays. Change-Id: I52928871ffb7f4c6fd6722f3d59f1836379148c6 Reviewed-on: https://plan9port-review.googlesource.com/2760 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-11-10win: local \r cancellationRuss Cox1-1/+14
Change-Id: I4becec052af58c5a52b777004867eb23023b9403 Reviewed-on: https://plan9port-review.googlesource.com/1391 Reviewed-by: Russ Cox <rsc@google.com>
2015-11-109term, win: better \r handling (thanks, git)Russ Cox2-1/+31
Change-Id: I75563b911b54d8957d2d004b9c27d0a2f8f043b3 Reviewed-on: https://plan9port-review.googlesource.com/1390 Reviewed-by: Russ Cox <rsc@google.com>
2014-02-27all: DragonFly port.Shenghou Ma2-1/+2
Fix compilation problems, libdraw still doesn't work right yet. LGTM=rsc R=rsc https://codereview.appspot.com/67820046
2013-08-069term: set TERM=dumb instead of TERM=9termRuss Cox4-1/+13
Everyone seems to assume that TERM != dumb implies ANSI escape codes are okay. In fact, many people assume that unconditionally, but it is easier to argue back about TERM=dumb than TERM=9term. This applies to acme win too, because they share the code. Set termprog=9term or termprog=win for clients who need to know. R=rsc CC=r https://codereview.appspot.com/12532043
2012-11-269term: adjust to dpi changesRuss Cox1-15/+23
R=rsc http://codereview.appspot.com/6847105
2011-10-139term: fix hold mode delayRuss Cox1-0/+1
2011-10-12mergeRuss Cox4-10/+25
2011-10-119term: hold mode back doorRuss Cox2-16/+23
R=rsc http://codereview.appspot.com/5248056
2011-09-129term: fix insertDavid Swasey1-2/+2
R=rsc CC=plan9port.codebot http://codereview.appspot.com/4952066
2011-08-26win: hide not just passwords but also passphrasesMathieu Lonjaret1-1/+1
R=rsc, nicolesimons1986 CC=plan9port.codebot http://codereview.appspot.com/4957042
2011-08-029term: home/end like acmeRuss Cox2-2/+19
R=rsc http://codereview.appspot.com/4830052
2011-04-279term, acme: autoscrollRuss Cox5-35/+12
Ignore scroll/noscroll window setting. Instead, scroll when the write begins in or immediately after the displayed window content. In the new scrolling discipline, executing "Noscroll" is replaced by typing Page Up or using the mouse to scroll higher in the buffer, and executing "Scroll" is replaced by typing End or using the mouse to scroll to the bottom of the buffer. R=r, r2 http://codereview.appspot.com/4433060
2010-10-13win: another attempt at input modesRuss Cox1-5/+28
R=rsc http://codereview.appspot.com/2476042
2010-09-10win: add cook/nocookRuss Cox1-5/+14
R=rsc http://codereview.appspot.com/2162042
2010-09-039term, win: better echo cancellationRuss Cox6-61/+129
Also just drop \r from output. It's a losing battle to keep turning it off. R=rsc http://codereview.appspot.com/2128042
2010-06-289term: fix getpts on linuxAnthony Martin1-0/+5
Openpty uses grantpt internally and its behavior is unspecified when a handler is set to catch SIGCHLD. Fixes issue 37. http://code.swtch.com/plan9port/issues/37 R=rsc CC=codebot http://codereview.appspot.com/1209049
2010-05-199term: add -c to force cooked modeDavid Swasey1-1/+4
R=rsc CC=codebot http://codereview.appspot.com/1044043
2010-04-139term: cut, snarf, and paste with keyboard on MacDavid Swasey1-0/+16
R=rsc CC=codebot http://codereview.appspot.com/854042
2010-03-19win: scrollEoghan Sherry1-0/+3
R=rsc CC=codebot http://codereview.appspot.com/643041
2010-01-05win fixesFazlul Shahriar1-6/+26
- don't exit from a "child" note unless rc exited (code copied from 9term.c) - ignore writes to the tag; specifically " Send Noscroll" at startup. R=rsc CC=codebot http://codereview.appspot.com/181115
2009-09-11convert to 4-byte UTF-8 and 32-bit RuneRuss Cox1-1/+1
http://codereview.appspot.com/116075
2009-08-119term: allow scroll wheel in main windowTony Lainson1-1/+1
http://codereview.appspot.com/105082
2009-06-09mergeRuss Cox1-1/+1
2009-01-06win: better SIGPIPE handlingRuss Cox1-10/+9
2008-11-13win: another attempt at DELRuss Cox1-1/+3