Commit graph

1209 commits

Author SHA1 Message Date
Martin Lund
3a1eea216a
Merge pull request #91 from geo-stark/master
add serial lines manual control
2021-01-18 01:08:09 +01:00
Martin Lund
6c86faf6f9
Merge pull request #86 from sly74fr/feature/TimestampsInLogFile_#84
Resolved tio/tio#84: Added timestamps in log file if enabled.
2021-01-18 01:05:12 +01:00
Martin Lund
3195132fa1
Merge pull request #85 from Serkora/leflush
Flush every local echo-ed char
2021-01-18 01:04:27 +01:00
Jakob Haufe
93771ffab8
Make comparison POSIX compliant
String comparison with == is not POSIX compliant and can fail with e.g.
dash.

Fixes https://github.com/tio/tio/issues/115
2020-10-07 10:08:31 +02:00
Henrik Brix Andersen
6aff97100f Add bash completion of tty devices. 2020-08-13 11:35:16 +02:00
Henrik Brix Andersen
6df80fa503 Add -t/--timestamp to bash completion script. 2020-08-13 10:47:54 +02:00
Henner Zeller
31dccd6633 Local echo: show character by character even if stdout buffered.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
2020-05-25 19:59:20 -07:00
Björn Stenberg
71c1d7c540 Show error when failing to open a tty 2020-05-19 16:00:21 +02:00
Alban Bedel
4e5525a48f Fix out of tree builds
Out of tree builds are currently broken because $(top_srcdir)src/include
is not in the search path. In tree builds are working because autconf add
$(top_builddir)/src/include to the search path for the generated config.h.
As $(top_builddir) and $(top_srcdir) are identical during in tree builds
the search path still end up beeing somehow correct.

To fix this add -I$(srcdir)/include to the CPPFLAGS in Makefile.am.
2020-04-06 17:04:07 +02:00
Fabrice Fontaine
7a84120f7b src/setspeed2.c: fix redefinition of termio
Include ioctls.h and termbits.h from asm-generic instead of asm to avoid
the following build failure:

In file included from setspeed2.c:24:0:
/home/naourr/work/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/asm/termbits.h:17:8: error: redefinition of 'struct termio'
 struct termio {
        ^~~~~~
In file included from /home/naourr/work/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/sys/ioctl.h:29:0,
                 from setspeed2.c:22:
/home/naourr/work/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/bits/ioctl-types.h:36:8: note: originally defined here
 struct termio
        ^~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/1a7418b9cd11374a250f7509d5bddcc864375e1c

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-12-27 21:41:47 +01:00
Erik Moqvist
ad7b11e6e8 Exit if output speed cannot be set. 2019-10-19 17:08:04 +02:00
Lars Kellogg-Stedman
c6af6c0804 fflush() after putchar() for print_hex and print_normal
In order for local echo to work properly, we have to either call
fflush(stdout) after every character or just disable line buffering.
This change calls fflush() after putchar().

Closes #92
2019-10-16 22:48:44 -04:00
Lars Kellogg-Stedman
4d4ee466f7 Disable line buffering in stdout
In order for local echo to work properly, we have to either call
fflush(stdout) after every character or just disable line buffering.
This change uses setbuf(stdout, NULL) to do the latter.

Closes #92
2019-10-08 22:06:05 -04:00
George Stark
5217d9842b dont show line state if ioctl failed 2019-09-19 17:39:01 +03:00
George Stark
04d92740f5 add serial lines manual control 2019-09-19 15:13:38 +03:00
Sylvain LAFRASSE
a84f762106 Resolved tio/tio#84: Added timestamps in log file if enabled. 2019-05-24 10:46:02 +02:00
arichi
fca5429ae7 Flush every local echo char
Flush stdout at every char in case it
happens to be buffered.
2019-05-13 23:53:08 +08:00
Martin Lund
39a8f63640 Add command to show version
The key sequence ctrl-t v will now show the version of tio.
2018-11-27 23:56:34 +01:00
Martin Lund
42eb14dd77 Align format of timestamps 2018-11-27 23:38:21 +01:00
Mariusz Midor
18c2f7847e Newline: handle booth NL and CR
Flag ONLCRNL expects code \n after press Enter, but on some systems \r is send instead.
2018-11-12 19:16:51 +01:00
Martin Lund
2223662ffd Bump version 2018-11-03 16:52:13 +01:00
Martin Lund
69479bdfda Update ChangeLog 2018-11-03 16:51:47 +01:00
Martin Lund
96a3d315d4 Update AUTHORS 2018-11-03 16:44:30 +01:00
Martin Lund
a5d1546024 Minor code style cleanups 2018-11-03 16:40:59 +01:00
Robey Pointer
f96ad43b1f add optional timestamps
with "-t" or "C-t T", toggle a timestamp prefix to each line.
2018-11-01 17:23:57 -07:00
Martin Lund
36691e8bdf Cleanup print macros 2018-10-21 02:14:18 +02:00
Martin Lund
14e70bd718 Flush output
Make sure output is transmitted immediately by flushing the output.
2018-10-21 02:07:55 +02:00
Martin Lund
bc0ae352b2
Merge pull request #78 from jwilk-forks/spelling
Fix typos
2018-09-17 09:58:11 +02:00
Jakub Wilk
ed8460e5be Fix typos 2018-09-17 09:23:45 +02:00
Martin Lund
2ce78b0993 Update AUTHORS 2018-09-04 21:11:15 +02:00
Martin Lund
7b65f413e4
Merge pull request #75 from sly74fr/master
Added macOS compatibility
2018-09-04 21:09:21 +02:00
Sylvain LAFRASSE
3a024ca529 Made O_NONBLOCK flag to open() call specific to macOS only. 2018-09-04 20:56:21 +02:00
Sylvain LAFRASSE
eb70da83ec Added macOS-related details. 2018-09-04 20:00:07 +02:00
Sylvain LAFRASSE
424c816118 Added O_NONBLOCK flag to open() call for macOS (10.13.6) compatibility. 2018-08-31 13:13:58 +02:00
Martin Lund
8db7bb56b5 Bump version 2018-06-26 19:09:31 +02:00
Martin Lund
c03de80e52 Update ChangeLog 2018-06-26 19:07:22 +02:00
Martin Lund
7245cdf240 Update date 2018-06-26 18:58:20 +02:00
Martin Lund
599d54c5bf Update AUTHORS 2018-06-24 16:42:51 +02:00
Martin Lund
0f17e7e0b0
Merge pull request #73 from hzeller/nicer-variables
Clarify the input/output variable names (No-op change)
2018-06-24 16:41:49 +02:00
Martin Lund
8e1e0c9b26
Merge pull request #71 from hzeller/local-echo
Provide local-echo option.
2018-06-24 16:31:21 +02:00
Henner Zeller
9965062fe2 Clarify the input/output variable names (No-op change) 2018-06-24 07:00:17 -07:00
Henner Zeller
776284e251 Organize options the same sequence they are mentiond in cmdline help. 2018-06-24 06:50:05 -07:00
Martin Lund
64f9f3a248
Merge pull request #72 from hzeller/cr-nl
Map CR->NL locally on output instead of using tio.c_oflag |= OCRNL.
2018-06-24 13:17:05 +02:00
Martin Lund
96cec154d4
Merge pull request #70 from hzeller/log-fast
Write to logfile as soon as we have the data, don't buffer.
2018-06-24 13:16:19 +02:00
Henner Zeller
0bc56c8a8f Update README. 2018-06-23 13:58:59 -07:00
Henner Zeller
ab451a984c Map CR->NL locally on output instead of using tio.c_oflag |= OCRNL.
This mostly is intended to have local echo output exactly what is sent
to the remote endpoint.
A nice side-effect is, that it also fixes tty-implementations, that can't
deal with the OCRNL flag on tio.c_oflag.
2018-06-23 13:47:06 -07:00
Henner Zeller
dabd2130a9 Provide local-echo option.
Can be switched on with -e on the command line.
Can be toggled with Ctrl t e while program is running.
2018-06-23 12:37:40 -07:00
Henner Zeller
763a09e172 Write to logfile as soon as we have the data, don't buffer.
Logfiles are important to see what happend, in particular if something
unexpected happened; so we want to make sure that the logfile is flushed
to disk.

Before this change, the logfile was typically written at the end in
a large chunk as the default (large) buffering applied. Now, characters are
written out ASAP, so it is possible to get a live-view with a
tail -f <logfile>
2018-06-23 11:42:23 -07:00
Martin Lund
08fd18e803 Update ChangeLog 2018-04-18 21:01:50 +02:00
Martin Lund
fff867f637 Update README 2018-04-18 20:51:27 +02:00