aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9term
Commit message (Collapse)AuthorAgeFilesLines
* all: remove need for `-fcommon`Dan Cross2025-07-251-8/+8
| | | | | | | | | | Use `extern` where appropriate so that we can remove `-fcommon` on macOS and others. On macOS, `-fcommon` generates a number of linker warnings. I've tested building on macOS, Linux, FreeBSD, NetBSD, OpenBSD and illumos. I am not in a position to test on AIX or other more esoteric platforms, however.
* acme: shift button 3 for reverse searchRuss Cox2024-06-151-1/+21
| | | | | An experiment. Let's see if it's any good. Also document the Mac conventions in devdraw(3).
* 9term: Skip unnecessary ioctl call on AIX.Ben Huntsman2021-08-302-1/+2
|
* 9term: add threadmaybackgroundRuss Cox2020-12-301-0/+6
|
* 9term: use openpty on NetBSDNicola Girardi2020-12-301-0/+16
| | | | Fixes #376.
* all: fix #includes for AIX, add a few AIX "implementation" filesBen Huntsman2020-05-072-0/+4
|
* malloc: remove lockingDan Cross2020-01-161-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>
* Trivial changes: whitespace and modes.Dan Cross2020-01-1011-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>
* 9term: add a "look" menu item (#299)Fazlul Shahriar2020-01-073-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
* 9term: make 9term -l invoke $SHELL with -lRuss Cox2018-11-141-1/+6
|
* 9term: fix getpts on FreeBSD 11.2 (#199)Xiao-Yong2018-11-131-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.
* 9term: Set TERM_PROGRAM to termprogMartin Kühl2018-03-231-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.
* 9term: re-enable sys: child note for child processesRuss Cox2017-11-271-0/+1
| | | | | | Fixes #6. Change-Id: Id9950f59c7970575866a7c22a69bfbf3a271f2bb
* 9term: fix getpts on macOS 10.13David du Colombier2017-10-131-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.
* 9term: Add missing parentheses, preventing buffer overflow.Ray Lai2017-04-081-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>
* 9term: c nitsRuss Cox2017-01-092-2/+3
| | | | | | Change-Id: Ia18ebb28f24bc69f404004896f9ce54ddb53faf9 Reviewed-on: https://plan9port-review.googlesource.com/2782 Reviewed-by: Russ Cox <rsc@swtch.com>
* cmd/9term: A hack because I'm constantly getting confused about ^C vs fn+deleteDave Presotto2017-01-093-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>
* 9term, win: work around bsd linker nonsenseRuss Cox2017-01-061-2/+2
| | | | | | Change-Id: Ifcef0636ee1e1fd0f9b06a8d1a99d58fae831318 Reviewed-on: https://plan9port-review.googlesource.com/2780 Reviewed-by: Russ Cox <rsc@swtch.com>
* 9term, mc: conspire to handle hidpi displaysRuss Cox2017-01-061-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>
* win: local \r cancellationRuss Cox2015-11-101-1/+14
| | | | | | Change-Id: I4becec052af58c5a52b777004867eb23023b9403 Reviewed-on: https://plan9port-review.googlesource.com/1391 Reviewed-by: Russ Cox <rsc@google.com>
* 9term, win: better \r handling (thanks, git)Russ Cox2015-11-102-1/+31
| | | | | | Change-Id: I75563b911b54d8957d2d004b9c27d0a2f8f043b3 Reviewed-on: https://plan9port-review.googlesource.com/1390 Reviewed-by: Russ Cox <rsc@google.com>
* all: DragonFly port.Shenghou Ma2014-02-272-1/+2
| | | | | | | | Fix compilation problems, libdraw still doesn't work right yet. LGTM=rsc R=rsc https://codereview.appspot.com/67820046
* 9term: set TERM=dumb instead of TERM=9termRuss Cox2013-08-064-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
* 9term: adjust to dpi changesRuss Cox2012-11-261-15/+23
| | | | | R=rsc http://codereview.appspot.com/6847105
* 9term: fix hold mode delayRuss Cox2011-10-131-0/+1
|
* mergeRuss Cox2011-10-124-10/+25
|
* 9term: hold mode back doorRuss Cox2011-10-112-16/+23
| | | | | R=rsc http://codereview.appspot.com/5248056
* 9term: fix insertDavid Swasey2011-09-121-2/+2
| | | | | | R=rsc CC=plan9port.codebot http://codereview.appspot.com/4952066
* win: hide not just passwords but also passphrasesMathieu Lonjaret2011-08-261-1/+1
| | | | | | R=rsc, nicolesimons1986 CC=plan9port.codebot http://codereview.appspot.com/4957042
* 9term: home/end like acmeRuss Cox2011-08-022-2/+19
| | | | | R=rsc http://codereview.appspot.com/4830052
* 9term, acme: autoscrollRuss Cox2011-04-275-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
* win: another attempt at input modesRuss Cox2010-10-131-5/+28
| | | | | R=rsc http://codereview.appspot.com/2476042
* win: add cook/nocookRuss Cox2010-09-101-5/+14
| | | | | R=rsc http://codereview.appspot.com/2162042
* 9term, win: better echo cancellationRuss Cox2010-09-036-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
* 9term: fix getpts on linuxAnthony Martin2010-06-281-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
* 9term: add -c to force cooked modeDavid Swasey2010-05-191-1/+4
| | | | | | R=rsc CC=codebot http://codereview.appspot.com/1044043
* 9term: cut, snarf, and paste with keyboard on MacDavid Swasey2010-04-131-0/+16
| | | | | | R=rsc CC=codebot http://codereview.appspot.com/854042
* win: scrollEoghan Sherry2010-03-191-0/+3
| | | | | | R=rsc CC=codebot http://codereview.appspot.com/643041
* win fixesFazlul Shahriar2010-01-051-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
* convert to 4-byte UTF-8 and 32-bit RuneRuss Cox2009-09-111-1/+1
| | | | http://codereview.appspot.com/116075
* 9term: allow scroll wheel in main windowTony Lainson2009-08-111-1/+1
| | | | http://codereview.appspot.com/105082
* mergeRuss Cox2009-06-091-1/+1
|
* win: better SIGPIPE handlingRuss Cox2009-01-061-10/+9
|
* win: another attempt at DELRuss Cox2008-11-131-1/+3
|
* win: handle DEL internally so that it always worksRuss Cox2008-11-131-0/+6
|
* win: implement Scroll and NoscrollRuss Cox2008-11-131-1/+13
|
* 9term: convert to new libframeRuss Cox2008-07-211-3/+1
|
* correct dump string (Fazlul Shahriar)rsc2007-04-171-1/+4
|
* better cleanuprsc2006-06-281-2/+5
|
* check initdraw returnrsc2006-06-251-1/+3
|