Commit Graph

1337 Commits

Author SHA1 Message Date
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
Andrew Chin 8b5b7aedfa Make --help or -h work again
Also make --help go to stdout, but everywhere else print_help is used,
     go to stderr

Signed-off-by: Andrew Chin <achin@eminence32.net>
2015-11-01 01:09:00 -04:00
Anders Kaseorg f0f2aa7cce mosh.pl: Run ssh directly instead of via sh
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-11-01 01:07:21 -04:00
Anders Kaseorg 57e54c46bc Specify syntax = "proto2" to silence warning with protobuf 3
[libprotobuf WARNING google/protobuf/compiler/parser.cc:491] No syntax
specified for the proto file. Please use 'syntax = "proto2";' or
'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2
syntax.)

The release notes say a future release will turn this warning into an
error.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-10-31 23:55:26 -04:00
John Hood 0de4082e86 base64: remove a timing variation 2015-10-20 02:39:36 -04:00
John Hood 0eb614809a Add configurable support for Apple Common Crypto and Nettle libraries. 2015-10-16 19:00:42 -04:00
John Hood db311f92f7 Replace OpenSSL base64 impl with a simple direct impl.
Unit tests, too.
2015-10-16 19:00:42 -04:00
Florian Bruhin 1307dc4a0f Use the official way to get Trusty on Travis
See http://blog.travis-ci.com/2015-10-14-opening-up-ubuntu-trusty-beta/
2015-10-15 08:21:06 +02:00
John Hood 3c52091f4d Add window resizing test 2015-10-14 23:28:21 -04:00
John Hood 01749be642 Add test for behavior at column 80. 2015-10-14 23:28:21 -04:00
John Hood fb76563d33 Add multiline-scroll regression test 2015-10-14 23:28:21 -04:00
John Hood 14ae25ee2a Add test for unicode combining fallback assert, issue 667 2015-10-14 23:28:12 -04:00
John Hood 307b241f0d End to end test suite for Mosh sessions.
For original messy development history, see
https://github.com/cgull/mosh/tree/localhost
or
https://github.com/cgull/mosh/commit/e7feed48a4a271e2977f714f58acfa04cdaa5cca
2015-10-14 23:27:29 -04:00
John Hood 4a01dbdb06 .travis.yml: add OS X build, APT caching 2015-10-03 03:47:04 -04:00
John Hood 29112b410a configure: add --enable-warnings=distcheck
This disables -Werror everywhere but "Linux".
The heuristic is rather crude.
2015-10-03 03:46:17 -04:00
John Hood 5959342ac7 mosh-client: return meaningful exitstatus on network setup/teardown or other failure 2015-10-03 03:43:18 -04:00
John Hood 7fb542c874 Change SSH_CONNECTION fallback to allow IPv6 2015-10-03 03:43:18 -04:00
John Hood 448f9f1bab mosh: implement --local option for use without ssh 2015-10-03 03:43:18 -04:00
Keith Winstein 5a20626880 .travis.yml: Add auto-notifications to IRC 2015-09-23 23:48:18 -07:00
Keith Winstein 4b5389efe9 .travis.yml: opt in to Ubuntu 14.04 LTS beta CI infrastructure 2015-09-23 23:41:36 -07:00
Keith Winstein 7ec19a5bed terminal.cc: Remove overly-strong assertion on Unicode fallback
Fixes #667
2015-08-24 09:52:39 -07:00
Keith Winstein d1039d779e README.md: add Travis-CI build status (master branch) up top 2015-07-28 18:10:48 -07:00
Keith Winstein f673ddc2d0 Merge pull request #630 from andersk/travis
Add Travis CI configuration
2015-07-28 18:05:18 -07:00
Anders Kaseorg c5c1c4fae9 Add Travis CI configuration
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-07-28 18:51:58 -04:00
Anders Kaseorg 6adcbdcaf2 make distcheck: Enable -Werror and examples
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2015-07-28 18:51:58 -04:00
John Hood 3c3b356cb5 Bump version to 1.2.5.
Signed-off-by: John Hood <cgull@glup.org>
2015-07-12 12:48:22 -04:00
John Hood fce56ae6fe Improve Makefile generation of version files.
Remove bad automake dependency causing double execution.
Properly update the version in the non-Git case.
Git commands are now in a condition-expression, won't break build.
Test that we're in repo root (i.e., our own and not somebody else's).
Do `git describe --always` to handle shallow Git clones.

Signed-off-by: John Hood <cgull@glup.org>
2015-07-07 19:09:09 -04:00
John Hood 7f7a1beb0f Fix bad bash-completion directory in non pkg-config case.
Signed-off-by: John Hood <cgull@glup.org>
2015-06-28 16:13:35 -04:00
John Hood d988cad455 configure.ac: respect --prefix for bash completion
Signed-off-by: John Hood <cgull@glup.org>
2015-06-28 14:43:25 -04:00
John Hood 8905127ef6 Bump version to 1.2.4.95rc2 (1.2.5 release candidate.)
Signed-off-by: John Hood <cgull@glup.org>
2015-06-26 18:28:46 -04:00
John Hood dee1a2eecc Improve Debian bash-completion support
* Autoconf queries pkgconf for bash-completion dir-- resolves
  lintian's `package-install-into-obsolete-dir` diagnostic
* Use improved completion snippet from
  <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782169>
* Remove old /etc/bash_completion.d/mosh "conffile" with
  dh-maintscript + dpkg-maintscript-helper

Closes #628.

Signed-off-by: John Hood <cgull@glup.org>
2015-06-25 01:02:17 -04:00
John Hood 6a169dc7ea Revert "Update bash completion for Debian."
This reverts commit 05da49fc3f.
2015-06-24 00:28:23 -04:00