Commit Graph

1118 Commits

Author SHA1 Message Date
John Hood de30452498 Add .gitattributes and EOL normalization 2016-03-30 23:52:19 -04:00
John Hood 1de6575e59 mosh-server.cc: Do not start user shell until network session starts 2016-03-30 23:52:19 -04:00
John Hood 6fd570f81f Various fixes for Illumos Hipster 20151003. 2016-03-30 23:52:19 -04:00
John Hood dbbed24d83 Use server's $SSH_CONNECTION if ProxyCommand isn't run.
This is an alternate way to resolve #417 without affecting
backward compatibility.
2016-03-30 23:52:19 -04:00
John Hood 9dbf3b366d mosh.pl: use single quotes where appropriate 2016-03-30 23:52:19 -04:00
John Hood 389fc23205 Better, more flexible handling for IPv4/IPv6.
Add --family=auto/all.
Attempt connects to all available addresses.
Working error handling.

Fixes #629.
2016-03-30 23:52:19 -04:00
Keith Winstein 46aac1834a debian/control and debian/copyright: Fix lintian warnings 2016-03-25 21:53:53 -07:00
Keith Winstein 1e4ae5f58d Pull updates to debian/changelog from debian-package branch 2016-03-25 21:38:09 -07:00
Keith Winstein 510a5f36b5 build-package.sh: git-buildpackage is now "gbp buildpackage" 2016-03-25 18:30:40 -07:00
john hood a47917b976 configure.ac: Do s/-pthreads -lpthreads/-pthreads/ for protobuf
protobuf uses an obsolete automake pthreads detection macro,
which results in "pkgconfig --libs protobuf" returning
"-lprotobuf -pthread -lpthread" on Linux.  Remove
the unnecessary and dangerous -lpthread in that case.

Fixes #727, mosh-server crash in libutempter on Debian Sid.
2016-03-18 20:31:01 -04:00
Keith Winstein e7303e0b66 Eliminated "handled" field in Parser::Action
This field was used during development to measure the
coverage of the ANSI terminal parser against typical
terminal input sequences.

The "handled" field has not been read by any code since
commit 1ee54cd7 (February 2011). Eliminating the field
by popular request (closes #723).
2016-02-10 22:06:18 -08:00
Erick Matsen 8200d5bdf0 Typo fix in server-network-timeout.test 2016-01-16 17:50:45 -05:00
Anders Kaseorg c9ec54a004 debian: Update GitHub URLs from keithw/mosh to mobile-shell/mosh
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-01-16 17:50:45 -05:00
Anders Kaseorg f928435274 debian/rules: Allow parallel build
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-01-16 17:50:45 -05:00
Anders Kaseorg 8816493ec9 debian/rules: Use dh_perl -d
By informing Debhelper that the mosh wrapper script only uses modules in
perl-base (dh_perl -d), we cause ${perl:Depends} to change from ‘perl’
to empty, which silences this build warning:

dpkg-gencontrol: warning: package mosh: unused substitution variable ${perl:Depends}

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-01-16 17:50:45 -05:00
Anders Kaseorg 9cf54e388e debian/mosh.maintscript: Remove extra -- "$@"
That is already added by dh_installdeb, so it was being added twice.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-01-16 17:50:45 -05:00
John Hood 60e3d380b8 Fix Cygwin compile warning. 2016-01-16 12:56:39 -05:00
John Hood e0f0905778 pty-deadlock.test: use background write, not non-blocking reads
Non-blocking reads turn out not to work so well on Cygwin
which has an older version of bash.
2016-01-12 23:09:24 -05:00
John Hood e61b3bd014 Test changes for Cygwin compatibility. 2016-01-11 06:14:27 -05:00
John Hood 6b71351138 select.h: workaround and report Cygwin select() bug
Resolves #705.
2016-01-11 04:37:35 -05:00
John Hood ca21788c96 Remove usage of exceptional fdsets with select(). 2016-01-11 04:35:21 -05:00
John Hood 19f214e46d Remove AM_TESTS_REDIRECT hack; use VERBOSE=1 instead. 2015-12-24 22:27:17 -05:00
John Hood 2ac3bbeb9b Fix prediction unicode bug. Make all Cell members private.
Fixes #702.
2015-12-24 22:27:17 -05:00
John Hood 90a529b18a Fix broken compile on Ubuntu 12.04 2015-12-07 00:25:47 -05:00
John Hood 1d71895ff4 Add support for back tab (CSI CBT), and forward tab (CSI CHT) too.
Resolves #539.
2015-12-06 22:38:19 -05:00
john hood 8609f88207 mosh-server: Fix hang with ^S on OS X and FreeBSD.
Fixes #692.
2015-12-06 19:09:42 -05:00
John Hood 551b77f27e Remove display-posterizing code. It's been dead 3 years.
Signed-off-by: John Hood <cgull@glup.org>
2015-12-06 19:03:36 -05:00
John Hood 81f21fc7ac Don't send empty HostBytes strings.
This allows more Resize instructions to be elided.  It also keeps the
server from sending empty updates when the screen has been written but
not changed.
2015-12-06 17:47:11 -05:00
John Hood 1e003b0e76 mosh-server: skip redundant resize requests
This might reduce redraw activity on window resize, especially for
slow servers.
2015-12-06 17:47:11 -05:00
John Hood caab7a7d88 configure.ac: always enable distcheck warning errors 2015-12-06 17:47:11 -05:00
John Hood 44f9cca396 e2e-test: indentation cleanup, whitespace only 2015-12-06 17:47:11 -05:00
John Hood bc1e3cd541 e2e-test: Cleanup tmux sockets. 2015-12-06 17:47:11 -05:00
John Hood 992fec1f30 e2e-test: Add check for Instruction verification failures. 2015-12-06 17:47:11 -05:00
John Hood 484677289d Add test for rendering failures on text wrapping across frames 2015-12-06 17:47:11 -05:00
John Hood 65ced750e6 Test ASCII and ISO-8859-1 output. 2015-12-06 17:42:34 -05:00
John Hood 8681199957 Add VT100/color attributes tests. 2015-12-06 17:42:34 -05:00
John Hood e13011f318 add test for cursor motion optimization 2015-12-06 17:42:34 -05:00
John Hood e0f6eb78ef Improve roundtrip verification tests and debug dump.
Add another round-trip verification.  For both original and generated
state, generate a diff from an initial, empty state.  Verify that
these two diffs are the same.
2015-12-06 17:42:34 -05:00
John Hood 66634eb97c Move grapheme printing from FrameState::append_cell() to Framebuffer::Cell::print_grapheme(). 2015-12-06 17:42:34 -05:00
John Hood 0b51260540 Fix for UTF-8 roundtrip verification bug.
The problem was that the round-trip verification code copies the
current state, which may contain intermediate Parser state for
multibyte characters and ANSI escape sequences.  It then applies diffs
to that copy, which may appear as badly formed input.

Also removes some dead, never-used code.
2015-12-06 17:42:34 -05:00
john hood e4a99256cb Avoid wcwidth(), wcrtomb() and mbrtowc() on ASCII/ISO8859-1 characters.
ASCII <-> UTF has trivial mappings.  Avoid wcrtomb() and mbrtowc().

ISO-8859-1 is all narrow characters, and cheap to test for.  It might
be possible to cheaply test other popular UTF blocks and/or planes as
well.

These two changes get 2-3x faster input processing on Linux and
FreeBSD.  Performance improvement in actual usage is more modest but
still significant.
2015-12-06 17:42:34 -05:00
John Hood f5d814a9c4 Reduce character cell lookups in Emulator::print(). 2015-12-06 17:42:34 -05:00
John Hood 589d21bbf2 Add make_shared emulation for std::tr1::shared_ptr; use make_shared 2015-12-06 17:42:34 -05:00
John Hood b41bad918d Make Terminal::Framebuffer::Rows shared and copy-on-write.
* Support both std:: and std::tr1:: shared_ptr. FreeBSD 10 now uses C++11 by default.
* Remove Framebuffer pointers in STMClient
2015-12-06 17:42:34 -05:00
John Hood c090d257f2 Rework Terminal::Display to improve performance and treat passed Framebuffers as const.
* Refactor put_cell() and parts of new_frame(), and associated state, into put_row().
* Optimize display and line wrap handling code/output.
* Make last_frame a const ref, to eliminate a costly copy of the framebuffer on every screen refresh.
* In new_frame()'s scroll optimization, don't copy rows, use pointers instead.
* Don't check entire frame buffer for scrolling if first line hasn't scrolled.
* Add a generation counter on Row objects to allow quicker/better identification of scroll regions
* Use at() for bounds-checking on framebuffers, because they can be resized.
* Copy and resize scroll buffer on window resize.
2015-12-06 17:42:34 -05:00
John Hood 32afa96111 Change Framebuffer's containers/methods to improve performance.
* Reduce the size of Terminal::Cell.
* Change colors and attributes in Terminal::Rendition to bitfields/bitmask.
* Change Cells to use UTF-8 strings instead of vector<wchar_t>.  Store Rows in a vector instead of a deque.
* Add various Framebuffer::append() methods for more efficient passing of single and repeated characters.
* Change title/icon strings from deques to a vector typedef-- this is more for tidiness than any real performance.
2015-12-06 17:42:34 -05:00
John Hood 8fdcdc88cd Isolated algorithmic improvements.
* Fix inefficient STL use around Parser::UTF8Parser.
* Reduce typeid() usage, change some of it to a virtual method
* Do multiple-line scrolls as a single move
2015-12-06 17:42:34 -05:00
John Hood 3fa42cb8bb Support different IPv4 and IPv6 MTUs.
Closes #688.
2015-11-29 10:31:17 -05:00
John Hood b742e958b6 mosh-server: Support timeouts on lost connectivity to network client.
Closes #690.
2015-11-24 02:36:08 -05:00
Eli Young 4b8444988e Fix link URLs in patent grant
Ampersands (&) need to be replaced with &amp; to be valid HTML, even in
link targets.
2015-11-01 01:25:57 -04:00