Commit Graph

37 Commits

Author SHA1 Message Date
John Hood 9a606c2f3d src/statesync/completeterminal.cc: fix bad iterator type 2018-08-03 17:32:07 -04:00
John Hood 8ac80db419 C++03 bound functions are not available in C++17; remove
This makes me a little sad, it's time to move to C++11 or greater.
2018-08-03 16:13:47 -04:00
John Hood b11d524bb7 Restore asserts and error handling
A couple of them got improved out of existence.
2017-08-23 15:09:43 -04:00
John Hood a40b67691a Remove various assert(constant) calls
These cause warnings from static checkers, and seem to lead to spurious
GCC7 -Wmaybe-uninitialized.
2017-08-06 23:12:05 -04:00
John Hood 93daa5ac3b Fix Debian GCC7 FTBFS: remove default constructors 2017-08-06 23:09:07 -04:00
John Hood b1a6f7c144 Eliminate unnecessary, trailing else conditional blocks. 2017-08-06 22:22:05 -04:00
John Hood 42d2b5d029 Use shared_ptr and references for Actions.
This slows terminal emulation slightly.
2017-08-02 22:07:02 -04:00
John Hood 9c55198635 Fix off-by-one error on timeouts for input history echo updates 2016-11-06 06:15:42 -05:00
John Hood dcd04850f0 Fix memory leak in window resize 2016-05-13 01:22:47 -04:00
John Hood 6abd4739de Const correctness and const-ref in Crypto and elsewhere. 2016-03-30 23:52:19 -04: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 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 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 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 026a3f0346 Resolve cppcheck issues.
Signed-off-by: John Hood <cgull@glup.org>
2015-06-10 23:50:56 -04:00
Anton Lundin 70a7c8024a We can't iterate over the object we are modifying
If subtract is called on itself, prefix and this is the same and the
iterator is invalid after modifying the underlaying object.

Instead just clear everyting.

Closes #354. Closes #355.
2012-11-30 19:55:15 -05:00
Ira Cooper deecf6bb2f Add limits.h to allow for illumos to compile.
Closes #331
2012-10-05 04:02:11 -04:00
Keith Winstein 92ecb99b71 Add OpenSSL licensing exception 2012-07-20 16:46:00 -04:00
Keith Winstein feb352c809 Optional verifier for round-trippability, and fix wrapping and tab bugs. 2012-04-16 09:09:20 -04:00
Keegan McAllister cd2d482484 Don't use *_t for our own typedefs
It's reserved by POSIX.

(closes #158 pull request)
2012-04-15 13:50:18 -04:00
Keegan McAllister 8bcc001b52 Remove Boost entirely 2012-04-15 13:49:15 -04:00
Keegan McAllister 8bc9aa33bf Remove boost::lambda from completeterminal.cc 2012-04-15 13:49:15 -04:00
Keegan McAllister 5320fbd346 Remove BOOST_AUTO from completeterminal.cc 2012-04-15 13:49:15 -04:00
Keegan McAllister d2434d1a79 Check compiler support for -fno-default-inline and -pipe
clang was spewing warnings about the unrecognized -fno-default-inline.  (Oddly,
it warns only with -c, not when compiling directly to an executable.)  For
completeness we also check -pipe, even though clang is OK with that one.

It should be fine to omit either flag.  gcc -fno-default-inline drops the
implicit 'inline' annotation on functions defined inside a class scope, but
'inline' is only a hint anyway.  -fno-default-inline does not change linkage.
-pipe is merely a compile speed optimization.
2012-04-13 12:27:27 -04:00
Keegan McAllister 349e2d20c8 Use the hardening flags
Closes #79.
2012-04-13 12:25:09 -04:00
Peter Iannucci c19bce27e6 Added missing flags in src/statesync/Makefile.am
(closes #93)
2012-04-06 23:34:45 -04:00
Keith Winstein b8457dd308 Use TERM env var / terminfo to decide whether to send ECH. Fixes tmux bug.
Closes #28 github issue.
2012-03-10 05:41:03 -05:00
Keith Winstein df5d163f9c Fix asserts with side-effects (per Keegan McAllister) 2012-03-08 10:50:19 -05:00
Anders Kaseorg edada5e1ea Don’t use $(builddir)
$(builddir) is always ., except apparently on automake 1.9 which
doesn’t define it.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-07 03:10:19 -05:00
Quentin Smith e8d14d35a6 Add boost and protobuf in the places where they are needed
[seph@directionless.org, andersk@mit.edu: add in even more places]
2012-03-07 03:05:36 -05:00
Anders Kaseorg aad760e7d6 Make warning CXXFLAGS configurable
This turns off -Werror by default except in the Debian package.
-Werror is inherently unportable and breaks things on OS X.  While it
can cause problems in Debian too, this is at least a little better.

It also turns off -pedantic in src/protobufs, because apparently
protoc output doesn’t compile with -pedantic on all platforms.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-07 03:05:35 -05:00
Keith Winstein e5c8c33f4f Fix timing of echo acks 2012-02-26 02:49:53 -05:00
Keith Winstein 3a92cd1393 Explicit echo ack protobuf with reliable semantics 2012-02-25 14:34:39 -05:00
Anders Kaseorg 689eedc271 Compile without --std=c++0x
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 21:29:51 -05:00
Anders Kaseorg 6c52c1d306 Purge ‘using namespace std’ from header files
std::bind and boost::lambda::bind don’t mix.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 20:22:12 -05:00
Keith Winstein 3781a290c8 Add copyright/license notices 2012-02-06 20:52:48 -05:00
Keith Winstein 38c9e99882 Separate modules by subdirectory 2012-02-06 18:26:45 -05:00