File: NEWS

package info (click to toggle)
tio 3.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,128 kB
  • sloc: ansic: 6,868; makefile: 3
file content (2510 lines) | stat: -rw-r--r-- 61,195 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
=== tio v3.9 (2025-04-13) ===



Changes since tio v3.8 (2024-11-30):

 * Fix parsing of timestamp options

 * codeql: Upgrade to upload-artifact@v4

 * Update plaintext man page

 * Add character mapping examples

 * Fix pattern matching memory corruption

Samuel Holland:

 * Don't add null characters to the expect buffer

   They prevent regexec() from seeing the remainder of the buffer.

V:

 * Disable stdout buffering globally

   This makes it possible to pipe output to other programs cleanly.

Lubov66:

 * docs: edited the license date

Jakob Haufe:

 * Manpage: Fix backslash encoding

   Literal backslash needs to be written as \e.



Changes since tio v3.7 (2024-08-31):

 * Rename git version to simply version

 * Clean up lua API

   Rename modem_send() to send()
   Rename send to write()

 * Zero initialize buffer in read_string()

 * Use version from git

 * Fix memory leak in base62_encode()

 * Fix name declaration conflict with socket send()

 * Add clang-format spec

Keith Hill:

 + Add system timestamps to lua read() and new lua read_line() per global options
 + Add missing timestamp-format epoch
 + Update send_ to use fsync and tcdrain like normal tty_sync does
 + Rework read_line to save partial line at timeout
 + Simplified read_line to reduce cyclomatic complexity
 + renamed example files read.lua and read_line.lua
 + moved #define READ_LINE_SIZE to top of file
 + renamed g_linebuf to linebuf, and moved it into read_line as a static variable



Changes since tio v3.6 (2024-07-19):

 * Remove unnecessary sync in line input mode

   This caused a problem for some highly timing sensitive modem read-eval-print
   loops because the input line and line termination characters (cr/nl) would be
   shifted out on the UART with too big delay inbetween because of two
   syncs.

 * Fix socket send call on platforms without MSG_NOSIGNAL

   To fix build issue encountered on MacOS Catalina but may apply to other
   platforms.

Steve Marple:

 * Add "epoch" timestamp option

   Add an option that prints the timestamp as the number of seconds since
   the Unix epoch.

Tomka Gergely:

 * The log-directory options is not read from the configuration file.



Changes since tio v3.5 (2024-06-29):

 * Add configuration file include directive

   To include the contents of another configuration file simply do e.g.:

   [include raspberrypi.conf]

   Also, included file can include other files which can include other
   files etc.

   This feature is useful for managing many configuration files and sharing
   configuration files with others.

 * Mention how to list key commands in help output

 * Fix hex output mode when using normal input mode

   In this combination of modes the input character was not forwarded to
   the tty device. This fix makes sure it is forwarded.

 * Fix uptime on MacOS

   On MacOS the birth time is apparently not available so we use
   modification time instead.

 * Improve warning upon failing connect

   Add device path to warning when connect fails.

 * Fix crashy search_reset() on macOS

 * Clean up shadow variable

 * Clean up readline code

 * Improve listing of long device names

 * Fix listing of serial devices on macOS

Heinrich Schuchardt:

 * Print correct 'Done' timestamp for X- and Y-modem transfers

   Call tio_printf() after completing xymodem_send().

Robert Lipe:

 * Recompute listing_device_name_length_max for MacOS case, too.



Changes since tio v3.4:

 * Clarify input and output direction of map flags

 * Rename mapping flag MSB2LSB to IMSB2LSB

   This is the correct naming since we are changing the input bit order on
   input from the serial device.

 * Add OIGNCR mapping flag

   Ignores CR on output to serial device.

 * Fix line input mode ignoring characters ABCD

 * Fix tainted print

Jakob Haufe:

 * Fix typos



Changes since tio v3.3:

 * Update configuration output

 * Clean up script run interaction text

 * Fix unbounded writes

 * Add history and editing feature to line input mode

   Use up and down arrow keys to navigate history.

   Use left and right arrow keys to move cursor back and forth.

   We try mimic the behaviour of GNU readline which we can not use because
   we also need to react to key commands.

 * Reuse socket address

   To avoid having to wait for socket timeout when restarting server.

 * Fix line input mode

   Fix so that ABCD are no longer ignored.

 * Make sure ICRNL, IGNCR, INLCR take effect
 
 * Include correct header for poll()

 * Add group write permission to xymodem received file

 * Fix missing open() flags in xymodem_receive()

Vyacheslav Patkov:

 * Show current mappings in the configuration printout

 * Use "ctrl-t m" to change mappings interactively

 * Prompt for Lua script or shell command in interactive session

Eliot Alan Foss:

 * Added support to receive XMODEM-CRC files from the connected serial port.



Changes since tio v3.2:

 * Force destructive backspace when using local echo

   Only takes effect in normal output mode.

 * Fix local-echo in configuration file

 * Clean up includes

 * Force socket write operation to ignore any signals

 * Man page cleanup



Changes since tio v3.1:

 * Do not print error when using --list with broken config file

 * Clean up completion script

 * Add option '--exec <command>' for running shell command

   Runs shell command with I/O redirected to device.

 * Make sure all error output is directed to stderr

 * Fix shadow variables

 * Update man page

 * Fix build on older GNU/Linux systems without statx

 * Fix line ending in --list output

 * Print location of configuration file in --list output

 * Fix alignment of profile listing



Changes since tio v3.0:

 * Improve --list feature on non-linux platform

 * List available profiles in --list output

 * Always message when saving log file

 * Add support for using TID as device in config file

 * Fix use of invalid flag with regexec()

 * Fix potential buffer overflow in match_and_replace()

 * Fix profile autocompletion

 * Remove inih dependency from CI builds

 * Replace use of stat() with fstat()

   For better security.

 * Fix hexN output mode

 * Update pattern matching example

 * Fix submenu response when invalid key hit

 * Replace inih with glib key file parser

   After including the use of glib we might as well replace inih
   with the glib key file parser.

   All configuration file parsing has been reworked and also the options
   parsing has been cleaned up, resulting in better and stricter
   configuration file and option value checks.

   Compared to old, configuration files now requires any default
   configurations to be put in a group/section named [default].

   Configuration file keywords such as "enable", "disable", "on",
   "off", "yes", "no", "0", "1" have been retired. Now only "true" and
   "false" apply to boolean configuration options. This is done to simplify
   things and avoid any confusion.

   The pattern option feature has been reworked so now the user can now
   access the full match string and any matching subexpression using the
   %mN syntax.

   For example:

   [usb devices]
   pattern = usb([0-9]*)
   device = /dev/ttyUSB%m1

   Then when using tio:
   $ tio usb12

      %m0 = 'usb12'  // Full match string
      %m1 = 12       // First match subexpression

   Which results in device = /dev/ttyUSB12

 * Remove CircleCI

   Replaced with github workflow CI.

 * Add github workflow for Ubuntu build

 * Enable extended pattern matching

   So that the exclude options can also work as include using special
   pattern syntax.

   For example, to only include /dev/ttyUSB* devices simply do:

   $ tio --exclude-devices=!(/dev/ttyUSB*) --list

   See the man page of fnmatch() for all available extended pattern
   options.

 * Update lua read() description

Rui Chen:

 * fix: add build patch for `FNM_EXTMATCH`

 * feat: add macOS workflow

 * fix: add macOS build patch for `fs_get_creation_time`



Changes since tio v2.8:

 * Simplify lua line manipulation API

   Collapses lua high(), low(), toggle(), config_high(), config_low(),
   config_apply() into one simple function:

   set{<line>=<state>, ...}

   Line can be any of DTR, RTS, CTS, DSR, CD, RI.

   State is high, low, or toggle.

   Example:
   script = set{DTR=high, RTS=low}; msleep(100); set{DTR=low, RTS=high}; msleep(100); set{RTS=low}

   Notice the use of {} instad of () when calling the set function. This is
   required to pass parameters by name in lua.

 * Disable DEC Special Graphics at exit if vt100

   If a vt100 terminal receives the Shift In character '\016' it will
   enable the 7 bit DEC Special Graphics character set used for line drawing.

   For most users this can happen due to line noise from the tty device and
   will likely mess up your terminal even after tio exits.

   To better handle this we want to make sure that tio disables this mode
   by sending the Shift Out character '\017' at exit.

   This mechanism will only activate if environment variable TERM assumes
   value "vt100".

 * Add hexN output mode

   Adds support for hexN mode where N is a number in the range 1 to 4096
   which defines how many hex values will be printed before a line break.

   In short, it defines the width of the hex output.

   In this mode, if timestamps are enabled they will be added to each hex
   line.

 * Rename sub-config to profile

   Because better naming.

 * Use lua io.write() instead of print()

   io.write() gives better output control as print() is hardcoded to always
   print a newline.

 * Add new ways to manage serial devices

    * Rename --list-devices to --list

    * Rename --no-autoconnect to --no-reconnect

    * Switch -l and -L options

      * -l now lists available serial devices

      * -L enables log to file

    * Add option --auto-connect <strategy>

      * Supported strategies:

        * "new" - Waits to connect first new appearing serial device

        * "latest" - Connects to latest registered serial device

        * "direct" - Connect directly to specified serial device (default)

    * Add options to exclude serial devices from auto connect strategy by
      pattern

      * Supported exclude options:

        * --exclude-devices <pattern>

          Example: '--exclude-devices "/dev/ttyUSB2,/dev/ttyS?"'

        * --exclude-drivers <pattern>

          Example: '--exclude-drivers "cdc_acm"'

        * --exclude-tids <pattern>

          Example: '--exclude-tids "yW07,bCC2"'

        * Patterns support '*' and '?'

    * Connect to same port/device combination via unique topology ID (TID)

      * Topology ID is a 4 digit base62 encoded hash of a device topology
        string coming from the Linux kernel. This means that whenever you
        plug in the same e.g. USB serial port device to the same USB hub
        port connected via the exact same hub topology all the way to your
        computer, you will get the same unique TID.

      * Useful for stable reconnections when serial device has no serial
        device by ID

      * For now, only tested on Linux.

    * Reworked and improved listing of serial devices to show serial devices:

      * By device

        * Including TID, uptime, driver, and description.

        * Sorted by uptime (newest device listed last)

      * By unique topology ID

      * By ID

      * By path

    * Add script interface 'list = tty_search()' for searching for serial
      devices.

 * Clean up timestamp enum definition

 * Add missing options to show configuration

 * Update description of mute option

 * Add lua read_string() function

 * Don't forget to log output in lua expect()

 * Generalize automatic login example for Linux

 * Fix log output in hex output mode

 * Add timeout based timestamps in hex output mode

   This change reintroduces timestamping in hex output mode but based on
   timeout instead of new lines which made no sense. This means that
   timestamps will only be printed when timeout time has elapsed with no
   output activity from serial device.

   Adds option --timestamp-timeout <ms> for setting the timeout value in
   milliseconds.

   Defaults to 200 ms.

 * Improve switched messages

 * Extend lua expect() to also return matched string

 * Add automatic login script example

 * Organize examples directory

 * Introduce basic line input mode

 * Cleanup global variable name shadowing

Davis C:

 * Updated login example with new expect logic

 * Reset buffer size at start of expect

 * Return 1 when `expect` matches



Changes since tio v2.7:

 * Rework resolve_config_file()

 * Rework line_pulse_duration_option_parse()

   Introduce proper sscanf() checks.

 * Rework rs485_parse_config()

   Introduce proper sscanf() checks.

 * Clean up file descriptor name shadowing

 * Add missing header guard

 * Upgrade inih subproject

 * Remove options --response-wait, --response-timeout

   Remove options and rework input handling so it is possible to do the
   same thing but via script which is much more flexible.

   These options were always a bit of a hardcoded solution. With the new
   script expect feature we can wait for any type of response.

   For example, pipe command to serial device and wait for line response within 1 second:

   $ echo "*IDN?" | tio /dev/ttyACM0 --script "expect('\r\n', 1000)" --mute

 * Add lua exit(code)

 * Add timeout feature to expect()

 * Add lua expect(string)

   Add simple expect functionality.

   The expect(string) function will wait for input from the tty device and
   only return when there is a string match. Regular expressions are
   supported.

   Example:

   script = expect('password:'); send('my_password\n')

 * Add lua send(string)

 * Add lua modem_send(file,protocol)

 * Fix xymodem error messages

 * Rework x/y-modem transfer command

   Remove ctrl-t X option and instead introduce submenu to ctrl-t x option
   for picking which xmodem protocol to use.

 * Update README

 * Cleanup options

 * Add independent input and output mode

   Replaces -x, --hexadecimal option with --input-mode and --output-mode
   so it is possible to select hex or normal mode for both input and output
   independently.

   To obtain same behavior as -x, --hexadecimal use the following
   configuration:

   input-mode = hex
   output-mode = hex

 * Fix file descriptor handling on macOS

 * Add tty line configuration script API

   On some platforms calling high()/low() to switch line states result in
   costly system calls which makes it impossible to switch two or more tty
   lines simultaneously.

   To help solve this timing issue we introduce a tty line state
   configuration API which can be used instead of using
   high()/low().

   Using config_low(line) and config_high(line) one can set up a new line
   state configuration for multiple lines and then use config_apply() to
   finally apply the configuration. This will result in only one system
   call to instruct the serial port drive to switch all the configured line
   states which should help ensure that the lines are switched
   simultaneously.

   Example:

   script = config_high(DTR); config_low(RTS); config_apply()

 * Add ONULBRK mapping flag

   Add ONULBRK mapping to map nul (zero) to send break signal on output.

   This is useful if one needs to e.g. send the break signal to the tty
   device when connected via socket.

 * Add --log-directory option

   For specifying directory path in which to save automatically named log
   files.

 * Add Lua scripting feature

   Add support for running Lua scripts that can manipulate the tty control
   lines. Script is activated automatically on connect or manually via in
   session key command.

   The Lua scripting feature opens up for many possibilities in the future
   such as adding expect like functionality to easily and programatically
   interact with the connected device.

 * Invert line states to reflect true electrical level

 * Add support for disabling prefix key handling

   To disable prefix key input handing simply set prefix-ctrl-key to
   'none'.

   Based on original patch from Sebastian Krahmer.

 * Add meson man pages install option

   Defaults to installing man pages.

HiFiPhile:

 * Poll on serial port read instead of delay.

 * Add Xmodem-CRC support.

 * CYGWIN: Fix port auto connection.

Mingjie Shen:

 * Check return values of sscanf()

   Failing to check that a call to 'sscanf' actually writes to an output
   variable can lead to unexpected behavior at reading time.

Jakob Haufe:

 * Support NO_COLOR env variable as per no-color.org

 * Fix troff warning

   .eo/.ec sections seemingly need explicit empty lines using .sp

   Otherwise, troff complains:

   troff:<standard input>:535: warning: expected numeric expression, got '\'
   troff:<standard input>:538: warning: expected numeric expression, got '\'
   troff:<standard input>:541: warning: expected numeric expression, got '\'

Fredrik Svedberg:

 * Add map FF to ESC-c on input

   Added map of form feed to ESC-c on input for terminals that
   do not clear screen on ^L but do on ESC-c.

Brian:

 * Add CodeQL Workflow for Code Security Analysis

Sylvain LAFRASSE:

 * Fix double call of tty_disconnect() on macOS/Darwin.



Changes since tio v2.6:

Paul Ruizendaal:

 * Add xmodem and ymodem file send support

HiFiPhile:

 * tty_stdin_input_thread(): write to pipe only if byte_count > 0.

 * Ignore EINTR error.

 * CYGWIN: Add support for "COM*" naming.

Wes Koerber:

 * chore: reorder log-strip and log-append

   reorder to maintain consistency with documentation

 * chore: update readme, bash completion, man page

 * fix: support --log-append in cli options



Changes since tio v2.5:

 * Remove warning when using pattern option

 * Add --log-append option

   Add --log-append option which makes tio append to any existing log file.

   This also changes the default behavior of tio from appending to
   overwriting any existing log file. Now you have to use this new option
   to make tio append.

 * Update man page

 * Update README

 * Fix line termination for response wait feature

   The response wait feature waited for a line response, a string
   terminated with either CR or NL. However, some devices may send a CR and
   then their line content and then NL. This means tio will quit before
   receiving and printing the line response. To solve this we simply ignore
   the CR character and only consider lines terminated with a NL character.

   This should work for all devices as lines are AFAIK always terminated
   with either CRNL or a NL.

 * Update tty device listing configuration

   Cleanup and add FreeBSD tty device listing support.

Braden Young:

 * Move map variables to tty to keep them all in one spot

 * Configure socket mapping flags from tty parsing logic. Remove duplicate parsing logic in socket

 * Support input mapping modes for sockets

Josh Soref:

 * Various spelling fixes

Peter van Dijk:

 * avoid "warning: unused parameter" on setspeed stub

 * use right /dev/ path on Haiku

Bill Hass:

 * Update README with details on snap confinement



Changes since tio v2.4:

 * Update configuration file documentation

   Rename .tiorc to .tioconfig, tiorc to config, etc.

 * Add support for $HOME/.tioconfig

    Replaces what used to be $HOME/.tiorc

 * Fix double prefix key regression

Vyacheslav Patkov:

 * Better error checking in config file, rename the file

   Accept "true", "enable", "on", "yes", "1" as true values, their
   counterparts as false ones. Check integer values for errors and range.
   Warn about ignored (e.g. misspelled) options.

   Check getenv() return value for NULL.

   Rename "tiorc" to "config", as it's a static INI file, not an executable
   "run commands".



Changes since tio v2.3:

 * Add threaded input handling

   To make tio more responsive to quit and I/O flush key command when main I/O
   thread is blocked on output.

 * Fix so that is it possible to quit tio in tio etc.

   Fix regression so that it is possible to send the prefix key code to the
   remote tio session without local tio session reacting to same key code
   (quitting etc.).

 * Add key command to toggle log on/off

    Add key command 'ctrl-t f' which will toggle log on/off.

    If no log filename has been specified via the 'log-filename' option then
    tio will automatically generate a new log filename every time the log
    feature is toggled on. Meaning, when toggled multiple times, multiple
    log files will be generated.

    However, if a log filename has been specified, tio will only write and
    append to that same file.



Changes since tio v2.2:

 * Add mute feature

   This will make tio go fully silent and not print anything.

 * Rename config variable 'tty' to 'device'

 * Deprecate tty config keyword but keep it around for now

 * Update show config

 * Update example tiorc



Changes since tio v2.1:

 * Add shell completion of sub-configuration names

   Does not work with sub configuration names that contains one or more
   white spaces.

 * Beautify help

 * Fix error message

 * Simplify configfile implementation



Changes since tio v2.0:

 * Fix output line delay

   Apply output line delay on lines ending with \n.

   On most systems lines ends with \n or \r\n.

 * Do not print timestamps in hex mode

 * Improve input mechanism in hex mode

   Print the 2 character hex code that you input in hex mode but then
   delete it before sending. This way it is easier to keep track of what
   you are inputting. It basically mimics the ctrl-shift-u input mechanism
   that is used to input unicode.

 * Add support for sending prefix character to serial device

   Do so by inputting prefix key twice, e.g. input ctrl-t ctrl-t to send
   ctrl-t character to serial device.

 * Clean up indentation

 * Update example tiorc

Attila Veghelyi:

 * Add bit reverse order feature



Changes since tio v1.47:

 * Handle stale unix socket file

   Delete existing unix socket file if it is tested to be stale, meaning no
   one is listening on it.

 * Add visual or audible alert support on connect/disconnect

   The feature is detailed via the following option:

    --alert none|bell|blink

      Set alert action on connect/disconnect.

      It will sound the bell once or blink once on successful connect.
      Likewise it will sound the bell twice or blink twice on disconnect.

      Default value is "none" for no alert.

 * Add experimental RS-485 support

   Many modern RS-485 serial devices such as the ones from FTDI already
   operate in RS-485 mode by default and will work with tio out of the box.
   However, there are some RS-232/485 devices which need to be switched
   from e.g. RS-232 to RS-485 mode to operate accordingly on the physical
   level.

   This commit implements the switching mechanism and interface required to
   enable RS-485 mode. It only works on Linux and with serial devices which
   use device drivers that support the Linux RS-485 control interface.

   The RS-485 feature is detailed via the following options:

    --rs-485                           Enable RS-485 mode
    --rs-485-config <config>           Set RS-485 configuration

   Set the RS-485 configuration using the following key or key value pair
   format in the configuration field:

    RTS_ON_SEND=value             Set logical level (0 or 1) for RTS pin when sending
    RTS_AFTER_SEND=value          Set logical level (0 or 1) for RTS pin after sending
    RTS_DELAY_BEFORE_SEND=value   Set RTS delay (ms) before sending
    RTS_DELAY_AFTER_SEND=value    Set RTS delay (ms) after sending
    RX_DURING_TX                  Receive data even while sending data

   If defining more than one key or key value pair, they must be comma
   separated.

   Example use:

     $ tio /dev/ttyUSB0 --rs-485 --rs-r485-config=RTS_DELAY_AFTER_SEND=50,RX_DURING_TX

 * Add line response feature

   Add a simple line response feature to make it possible to send e.g. a
   command string to your serial device and easily receive and parse a line
   response.

   This is a convenience feature for simple request/response interaction
   based on lines. For more advanced interaction the socket feature should
   be used instead.

   The line response feature is detailed via the following options:

    -r, --response-wait

   Wait for line response then quit. A line is considered any string ending
   with either CR or NL character. If no line is received tio will quit
   after response timeout.

   Any tio text is automatically muted when piping a string to tio while in
   response mode to make it easy to parse the response.

    --response-timeout <ms>

   Set timeout [ms] of line response (default: 100).

   Example:

   Sending a string (SCPI command) to a test instrument (Korad PSU) and
   print line response:

    $ echo "*IDN?" | tio /dev/ttyACM0 --response-wait
    KORAD KD3305P V4.2 SN:32477045

 * Fix potential sscanf() overflow

 * Only print version on '--version'

 * Remove duplicate show config entry of DTR pulse duration

 * Remove MacPorts instructions

   Remove instructions for MacPorts because the port has no maintainer and
   the port build definition is broken (missing dependency on libinih etc.).

   It is recommended to use brew instead.

Peter Collingbourne:

 * Ignore SIGPIPE signals

   If the remote end of a socket is closed between when an input character
   is received from the serial port and when it is written to the socket,
   tio will receive a SIGPIPE signal when writing the character to the
   socket, which will terminate the program. To prevent this, ignore the
   signal, which will cause write(2) to return -EPIPE, causing tio to close
   the socket.



Changes since tio v1.46:

 * Enable log feature when using --log-filename

   No reason to not assume that the user wants to enable log when the
   --log-filename is used. This way uses can skip the use of --log to
   enable log.

 * Enable line buffering of log

   Replace flushing/writing of log at every log write operation with line
   buffering, meaning log will be written line by line to make it more I/O
   friendly but still update frequently.

 * Avoid invalid hex character messages when switching hex mode

 * Force flushing of log writes

 * Renamed tty_flush() to tty_sync()

 * Fix sync output to serial port

   Using fsync() on filedescriptors for serial ports can not be relied on.
   Add use of tcdrain() to make sure data has been written by the serial
   port before proceeding.

   This fixes a problem with tio sometimes not writing piped input data to
   the serial port before exiting which results in the pending writes being
   cancelled / flushed.

 * Clean up tty_flush()

 * Force frequent sync on tty_flush()

 * Update README

 * Update example tiorc

 * Quit from non-interactive mode using ctrl-c

   When piping to tio it will automatically enter "non-interactive" mode
   which means it will not react to any input key sequences but simple read
   the input stream and write it to the tty device.

   This also means that ctrl-t q can not be used to quit and so tio would
   hang forever when used in non-interactive mode.

   This change allows to send the standard termination signal by pressing
   ctrl-c on tio in non-interactive mode to make it quit.

 * Make sure we flush output buffer to tty when piping to tio

 * Do not return false read error when piping to tio

 * Show error message when reading port settings fail

Victor Oliveira

 * add MacPorts install instructions



Changes since tio v1.45:

 * Rework toggle and pulse feature to support all lines

   Replace existing toggle and pulse key commands with the following
   generalized key commands which allows to toggle or pulse all serial port
   lines:

    ctrl-t g   Toggle serial port line
    ctrl-t p   Pulse serial port line

   When used, user will be asked which serial line to toggle or pulse.

   Also introduce --line-pulse-duration option for setting specific pulse
   duration in milliseconds for each serial line using a key value pair
   format. Each key represents a serial line. The following keys are
   available: DTR, RTS, CTS, DSR, DCD, RI.

   Example:

    $ tio /dev/ttyUSB0 --line-pulse-duration DTR=200,RTS=300,RI=50
    
   Likewise, the pulse duration can also be set via configuration file
   using the line-pulse-duration variable:
    
    line-pulse-duration = DTR=200,RTS=300,RI=50

 * Upgrade inih wrap to r56

 * Optimization

 * Add example configuration file


Ralph Siemsen:

 * Fix relative timestamps

   Fix the display of relative timestamps. The hack of subtracting 3600
   only works if you happen to be in a time zone that is one hour away from
   UTC. When subtracting two time values, the result is an absolute
   quantity (interval). These should be displayed as-is; without local time
   zone nor daylight saving correction. Hence gmtime() instead of
   localtime().



Changes since tio v1.44:

 * Introduce bold color option

   Introduce "bold" color option which only apply bold color formatting to
   existing system color.

   Also make "bold" the default color option.

   Fixes all white issue with black on white tio text.

 * Update README

 * Change 'ctrl-t T' to 'ctrl-t t' for timestamp toggle

 * Add support for remapping prefix key

   Make it possible to remap the prefix key (default: ctrl-t) by setting
   the prefix-ctrl-key variable in the configuration file.

   Allowed values are in the range a..z.

   Example, to set the prefix key to ctrl-a simply do:

   prefix-ctrl-key = a

 * Add plaintext man page

Rui Chen:

 * docs: add homebrew installation note

 * fix macOS build

 * fix compilation error



Changes since tio v1.43:

 * Simplify arbitrary baudrate code

 * Cleanup error printing routines

   Clean up so that only the following error related printing functions are
   used: tio_error_printf(), tio_error_printf_silent(),
   tio_warning_printf().

   A session mode switch is introduced for error printing so that it will
   print error messages with better formatting depending on in or out of
   session.

 * Update README

 * Clean up man page

 * Add support for space parity

 * Rename EOL delay to Output line delay

 * Replace -U,--upcase with mapping flag OLTU

 * Simplify tty_write()

Robert Snell:

 * Additional commands: EOL delay, lower to upper translation, added mark parity

   Added command line options:
   -O, --eol-delay to have a separate delay for end of line
   -U, --upper to enable translation of lower case alpha to upper case

   Added ability to set mark parity.
   Added ctrl-t U key sequence to allow enable/disable lower case alpha to
   upper case during a session.
   Updated Man page with command line options, ctrl-t sequences and
   configuration file options.
   Updated README.md, with above information.



Changes since tio v1.42:

 * Add '24hour-delta' timestamp option

   When enabled this option will timestamp new lines with the time elapsed
   since the line before.

   This is a very useful feature to identify which events takes the most
   time.

 * Improve description of socket option

 * Rename ChangeLog to NEWS

 * Update README

 * Update man page

George Joseph:

 * Add Pulse DTR command

   MCUs like the ESP32 can be reset if the serial port DTR line is
   pulsed for a short time.  You could just type CTRL-t d CTRL-t d
   but that's a little awkward since you have to lift your finger
   off the CTRL key to type the Ds.  Now you can just type CTRL-T D.

   * Added new command "D" to pulse the DTR line.  I.E.  Toggle its
     state twice with a configurable duration between toggles.

   * Added new config/command line option "--dtr-pulse-duration"
     to set the duration between the DTR state toggles.  The default
     is 100ms.



Changes since tio v1.41:

 * Update man page

ZeroMemoryEx:

 * Handle malloc failure

Sylvain LAFRASSE:

 * Add missing 'string.h' include.



Changes since tio v1.40:

 * Rename --hex-mode to --hexadecimal

 * Enable buffered writing

   Read block of bytes from input and process same block for output.  This
   will speed things up by reducing I/O overhead.

 * Enable buffered reading

   Read block of bytes from input and process byte by byte for output. This
   will speed things up by reducing I/O overhead.

 * Refactoring

 * Cleanup stdout flushing

   Flushing is not needed since we disabled buffering of stdout.

 * Simplify stdout_configure() code

 * Simplify stdin_configure() code

 * Update man page

 * Update README



Changes since tio v1.39:

 * Add config support for log-strip

 * Add config support for hex-mode

 * Rename --hex to --hex-mode

 * Fix completion for -e, --local-echo

 * Ignore newlines in hex output

 * Fix newline in warning_printf()

 * Fix ansi_printf_raw() in no color mode

 * Enter non-interactive mode when piping to tio

   Add support for a non interactive mode which allows other application to
   pipe data to tio which then forwards the data to the connected serial
   device.

   Non interactive means that tio does not react to interactive key commands
   in the incoming stream. This allows users to pipe binary data directly
   to the connected serial device.

   Example use:

   $ cat commands.txt | tio /dev/ttyUSB0

 * Also strip backspace from log

   To make log strip feature consistent so that we remove all unprintable
   control characters and escape sequences.

 * Socket code cleanup

 * Cleanup man page

 * Rename --log-filename to --log-file

Yin Fengwei:

 * Allow strip escape sequence characters from log file

   The log without escape key stripped is like:

    ^M[12:47:17] ACRN:\>
    ^M[12:47:17] ACRN:\>lasdfjklsdjf
    ^M
    ^M[12:47:18] Error: Invalid command.
    ^M[12:47:19] ACRN:\>
    ^M[12:47:26] ACRN:\>
    ^M[12:47:26] ACRN:\>sdafkljsdkaljfklsadjflksdjafjsda^H ^H^H...
    ^M
    ^M[12:47:31] Error: Invalid command.

   After strip escape key, the log is like:

    [12:49:18] ACRN:\>
    [12:49:19] ACRN:\>
    [12:49:19] ACRN:\>ls

    [12:49:19] Error: Invalid command.
    [12:49:19] ACRN:\>
    [12:49:19] ACRN:\>dfaslhj

    [12:49:24] Error: Invalid command.

   Beside escape key, it also handle backspace key as well.



Changes since tio v1.38:

 * Improve key command response for local echo and timestamp

 * Fix invalid hex character error message

 * Make sure only matched config section is parsed

 * Add support for "disable" keyword in config file

 * Unify error message formating

 * Cleanup list devices code

 * Fix command-line tty-device|config parsing

   Allow user to add options on both sides of the provided config argument.

   For example:

    $ tio -b 9600 am64-evm -e

   Before, tio only allowed adding arguments after the config argument.

   Implemented as simple as possible by introducing two stage option parsing.

 * Update bash completion

 * Add support for IPv4 and IPv6 network sockets

   Add support for IPv4 and IPv6 network sockets via socket syntax
   "inet:<port>" and "inet6:<port>" respectively.

   For example, to listen and redirect serial device I/O to a host bound
   IPv4 socket simply do:

    $ tio /dev/ttyUSB0 --socket inet:4444

   To connect do e.g.:

    $ nc 127.0.0.1 4444

   Likewise, for IPv6 do:

    $ tio /dev/ttyUSB0 --socket inet6:4444

   To connect do e.g.:

    $ nc ::1 4444

   If port is 0 or no port is provided default port 3333 is used.

 * Fix tio deleting unix socket file

   If tio has a unix file socket open, a second tio instance of tio may
   delete the socket file. This change fixes so that it will not be deleted
   and tio will instead error and complain about conflicting socket file.

 * Rework color option

   Rework the color option to support setting ANSI color code values
   ranging from 0..255 or "none" for no color or "list" to print a list of
   available ANSI colors codes.

   Also, disables color when piping.

 * Remove print of hex mode status at startup

 * Remove newline option in hex mode

 * Fix configfile memory leaks

 * Remove command-line option inconsistencies

   Optional arguments, as parsed by the getopt_long mechanism, are
   inherently inconsistent with how you define required arguments.

   To avoid confusion we decide to avoid this inconsistency by replacing
   optional options with additional options with required arguments.

 * Replace '1' with 'enable' in config files

 * Convert errors to warnings

g0mb4:

 * Extended hexadecimal mode.

   While in hex mode (ctrl-t h) you can output hexadecimal values.
   E.g.: to send 0x0A you have to type 0A (always 2 characters).

   Added option -x, --hex to start in hexadecimal mode.

   Added option --newline-in-hex to interpret newline characters in hex mode.
   This is disabled by default, because, in my opinion, hex stream is
   fundamentally different from text, so a "new line" is meaningless in this
   context.



Changes since tio v1.37:

 * Redirect error messages to stderr

 * Improve help and man page

 * Mention config file in --help

 * Fix running without config file

 * Fix config file error messages

 * Redirect error messages to stderr

 * Add repology packaging status

 * Fix parsing of default settings

   Default configuration file settings were not parsed in case a section
   was matched. Now we make sure that the default (unnamed) settings are
   always parsed.

 * Append to existing log file (no truncation)

 * Add socket info to show configuration

 * Print socket info at startup

 * Fix socket option parsing

Peter Collingbourne:

 * Match user input against config section names if pattern matching was unsuccessful.

   This allows for better config file ergonomics if the user has a diverse
   set of serial devices as the name does not need to be specified in
   the config file twice.

 * Add support for external control via a Unix domain socket.

   This feature allows an external program to inject output into and
   listen to input from a serial port via a Unix domain socket (path
   specified via the -S/--socket command line flag, or the socket
   config file option) while tio is running. This is useful for ad-hoc
   scripting of serial port interactions while still permitting manual
   control. Since many serial devices (at least on Linux) get confused
   when opened by multiple processes, and most commands do not know
   how to correctly open a serial device, this allows a more convenient
   usage model than directly writing to the device node from an external
   program.

   Any input from clients connected to the socket is sent on the serial
   port as if entered at the terminal where tio is running (except that
   ctrl-t sequences are not recognized), and any input from the serial
   port is multiplexed to the terminal and all connected clients.

   Sockets remain open while the serial port is disconnected, and writes
   will block.

   Example usage 1 (issue a command):

     echo command | nc -UN /path/to/socket > /dev/null

   Example usage 2 (use the expect command to script an interaction):

     #!/usr/bin/expect -f

     set timeout -1
     log_user 0

     spawn nc -UN /path/to/socket
     set uart $spawn_id

     send -i $uart "command1\n"
     expect -i $uart "prompt> "
     send -i $uart "command2\n"
     expect -i $uart "prompt> "

lexaone:

 * fix for using option 'log' without 'log-filename' in config file



Changes since tio v1.36:

 * Make libinih a fallback dependency

   This means that in case meson does not find libinih it will
   automatically clone libinih and include it in the build.

   The libinih library is reconfigured to be statically built so that no
   shared object will be installed.

Sylvain LAFRASSE:

 * Fix timestamp parsing in INI conf

 * Factorize timestamp parsing to be coherent with command line format in configuration file.



Changes since tio v1.35:

 * Add support for defaults in config file

   If no section name is specified the configuration will be considered the
   default one.

   This allows to set e.g. a default color code for sections which do not
   configure a color code.

 * Handle SIGHUP

   Handle SIGHUP so that the registered exit handlers are called to restore
   the terminal back to its original state.

 * Add color configuration support

 * Bypass unused result warnings

 * Force dependency on libinih

   Configuration file support is considered a mandatory feature.

 * Update headers

 * Update AUTHORS

 * Update man page

 * Move string_to_long() to misc.c

 * Update CircleCI config

 * Update tio gif

 * Update README

 * Update LICENSE date

 * Remove redundant COPYING file

Liam Beguin:

 * Document configuration file options

 * Add support for a configuration file

 * misc: add _unused macro

   Some parameters are expected to be unused.
   Add a basic macro to mute these compiler warnings.

 * options: expose string_to_long()

   Expose string_to_long() so that other source files can use it.



Changes since tio v1.34:

 * Add support for automatically generated log filename

   Automatically generate log filename if none is provided.

   The auto generated file name is on the form:
   "tio_DEVICE_YYYY-MM-DDTHH:MM:SS.log"

 * Add support for configurable timestamp format

   Also changes default timestamp format from ISO 8601 to classic 24-hour
   format as this is assumed to be the format that most users would prefer.

   And reintroduces strict but optional ISO 8601 format.

   This feature allows to easily add more timestamp formats in the future.

 * Reintroduce asm-generic/ioctls.h

   It is needed for ppc builds.

 * Add macro hack to workaround older buggy glibc

Robey Pointer:

 * Add support for high bps on OS X



Changes since tio v1.33:

 * Fix setspeed2 compilation

 * Only apply color formatting when using color option

   To help the color blind who may use custom terminal foreground /
   background colors.

 * Update README

 * Add '-c, --color' option

   Allow user to select which ANSI color code to use to colorize the tio
   text. To successfully set the color the color code must be in the range
   0..255.

   If color code is negative tio will print all available ANSI colors.

   The default color is changed to bold white to make tio defaults usable
   for most users, including color blind users.

 * Fix setspeed2 check

 * Fix meson header check string

 * Reintroduce long timestamp format

   But make the timestamp format RFC3339 compliant instead. The RFC states:

   NOTE: ISO 8601 defines date and time separated by "T".
         Applications using this syntax may choose, for the sake of
         readability, to specify a full-date and full-time separated by
         (say) a space character.

   This way we keep the information specified by ISO 8601 but make it more
   human readable which is better for the console output.

 * Update version year

Sylvain LAFRASSE:

 * Fix TTY device listing on Darwin. (#136)

 * Fix TCGETS2 search on Darwin.



Changes since tio v1.32:

 * Show auto connect status in show configuration

 * Use '#pragma once' in all headers

 * Improve printed output

   Get rid of inconsistencies in the printed output (error printing,
   colors, etc.).

   Prepare for user configurable color.

 * Rename option -i to -L

 * Shorten timestamp

 * Shorten timestamp description

   We do not need the date part of the timestamp. It simply takes up too
   much precious line space. In case of logging to file, one can easily
   conclude the date from the file date information.

 * Replace Travis with circleCI

 * Replace autotools with meson

   To introduce much simpler build configuration which is also easier to
   maintain.

 * Add list serial devices feature

   For convenience, add a --list-devices option which lists the available
   serial devices.

 * Cleanup: Use dot notation for default options struct

 * Update AUTHORS

 * Add command to show version

   The key sequence ctrl-t v will now show the version of tio.

 * Align format of timestamps
 
 * Add Sylvain as official co-maintainer

Sylvain LAFRASSE:

 * Add '-t' option description for time stamping.

 * Add description for time stamping.

 * Resolved tio/tio#84: Added timestamps in log file if enabled.

attila-v:

 * Refine timestamps with milliseconds and ISO 8601 format (#129).

   * Show milliseconds too in the timestamp (#114) and log file (#124)
   * Change timestamp format to ISO 8601.

Yin Fengwei:

 * Output newline on stdout with hex print mode

   This is to fix the issue #104. The timestamp will always be
   printed at the beginning of line:

   [10:25:56] Switched to hexadecimal mode
   0d 0a 0d [10:25:57] 41 43 52 4e 3a 5c 3e 0d 0a 0d [10:25:58] 41

   is changed to:

   [12:34:56] 45 72 72 6f 72 3a 20 49 6e 76 61 6c 69 64 20
   [12:34:56] 41 43 52 4e 3a 5c 3e
   [12:34:56] 41 43 52 4e 3a 5c 3e
   [12:34:57] 41 43 52 4e 3a 5c 3e 6c 73

Jakob Haufe:

 * Make comparison POSIX compliant

   String comparison with == is not POSIX compliant and can fail with e.g.
   dash.

Henrik Brix Andersen:

 * Add bash completion of tty devices.

 * Add -t/--timestamp to bash completion script.

Henner Zeller:

 * Local echo: show character by character even if stdout buffered.

Björn Stenberg:

 * Show error when failing to open a tty

Alban Bedel:

 * 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 autoconf adds
   $(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 being somehow correct.

   To fix this add -I$(srcdir)/include to the CPPFLAGS in Makefile.am.

Fabrice Fontaine:

 * src/setspeed2.c: fix redefinition of termio

   Include ioctls.h and termbits.h from asm-generic instead of asm to avoid
   build failures.

Erik Moqvist

 * Exit if output speed cannot be set.

Lars Kellogg-Stedman:

 * 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().

 * 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.

George Stark:

 * don't show line state if ioctl failed

 * add serial lines manual control

arichi:

 * Flush every local echo char

   Flush stdout at every char in case it
   happens to be buffered.

Mariusz Midor:

 * Newline: handle both NL and CR

   Flag ONLCRNL expects code \n after press Enter, but on some systems \r is sent instead.



Changes since tio v1.31:

 * Update AUTHORS

 * Minor code style cleanups

 * Cleanup print macros

 * Flush output

   Make sure output is transmitted immediately by flushing the output.

Robey Pointer:

 * add optional timestamps

   with "-t" or "C-t T", toggle a timestamp prefix to each line.

Jakub Wilk:

 * Fix typos

Sylvain Lafrasse:

 * Added macOS compatibility

 * Made O_NONBLOCK flag to open() call specific to macOS only.

 * Added macOS-related details.

 * Added O_NONBLOCK flag to open() call for macOS (10.13.6) compatibility.



Changes since tio v1.30:

 * Update date

 * Update AUTHORS

Henner Zeller:

 * Clarify the input/output variable names (No-op change)

 * Organize options the same sequence they are mentioned in cmdline help.

 * Update README.

 * 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.

 * 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.

 * Write to logfile as soon as we have the data, don't buffer.

   Logfiles are important to see what happened, 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>



Changes since tio v1.29:

 * Update README

 * Update man page and bash completion

 * Update AUTHORS

qianfan Zhao:

 * ONLCRNL: change the method to map NL to CR-NL



Changes since tio v1.28:

 * Add mapping flags INLCRNL and ODELBS

   The following new mapping flags are added:

   INLCRNL: Map NL to CR-NL on input.
   ODELBS: Map DEL to BS on output.

   Flags requested and tested by Jan Ciger (janoc).



Changes since tio v1.27:

 * Update README

 * Update AUTHORS

 * Add snap status to README.md

 * Add README.md to prettify GitHub page

 * Add missing header

Petr Vaněk:

 * Add missing header file under musl-libc

   Musl's inclusion tree slightly differs from glibc, therefore TCGETS2 is
   not reachable through sys/ioctl.h, so asm/ioctls.h needs to be included
   too.

Jakub Wilk:

 * Fix grammar and typos



Changes since tio v1.26:

 * Update man page

 * Add support for setting non-standard baudrates

   Support for non-standard baudrate settings will be automatically enabled
   if the termios2 interface is detected available. However, to play it
   safe, the old and widely supported termios interface will still be used
   when setting standard baudrates.

 * Cleanup

 * Update AUTHORS



Changes since tio v1.25:

 * Reconfigure stdin

   Make stdin behave more raw'ish. In particular, don't
   translate CR -> NL on input.

 * Add special character map feature

   Add a --map option which allows mapping special characters, in particular CR and
   NL characters which are used in various combinations on various platforms.

 * Cleanup

 * Update AUTHORS

 * Update README

 * Mention website

 * Update man page



Changes since tio v1.24:

 * Fix error applying new stdout settings

   On Fedora 26 tio will quit with the following error message:

   "Error: Could not apply new stdout settings (Invalid argument)"

   In case of Fedora, it turns out that the new stdout settings used are a
   bit too aggressive because an empty termios structure is used. To remedy
   this we reuse the existing stdout settings and only reconfigure the
   specific options we need to make a "raw" stdout configuration.

 * Remove unused pkgconfig in configure

 * Code cleanup

   Remove unused variable.



Changes since tio v1.23:

 * Optimize clear screen command

   Replaced system call with inline ANSI/VT100 clear screen code sequence

 * Fix bash completion installation

   Fixed the configure script to avoid that the bash completion script gets
   installed outside of the prefix location. The default install location
   is now $prefix/share/bash-completion/completions.

   Use the configure option '--with-bash-completion-dir=PATH' if you need
   to install the bash completion script elsewhere.

Jakub Wilk:

 * Add missing commas in conditional sentences



Changes since tio v1.22:

 * Update copyright headers

Jakub Wilk:

 * Fix typos



Changes since tio v1.21:

 * Update man page date

 * Update copyright year

 * Code cleanup

 * Update README and man page



Changes since tio v1.20:

 * Add support for hexadecimal mode

   A new key command 'ctrl-t h' is introduced which toggles between
   hexadecimal mode and normal mode. When in hexadecimal mode data received
   will be printed in hexadecimal.

 * Do not distribute src/bash_completion/tio

   Since the bash completion tio script is now autogenerated from tio.in it
   should not be distributed in the tarball.

 * Add missing forward flag

 * Update AUTHORS file

Adam Borowski:

 * 'ctrl-t b' to send serial break.

Jakub Wilk:

 * Removed git commit references from ChangeLog

   ChangeLog is primary useful for users who don't have the git repository
   at hand.

   Replace git commit references with version numbers; or if the change
   only cleans up another change with no release in between, remove the
   changelog item completely.



Changes since tio v1.19:

 * Added more error handling of terminal calls

   Also removed duplicate terminal flushing calls.

 * Revert "Added support for non-standard baud rates"

   This reverts a change made in v1.18.

   Reverting because supporting non-standard or arbitrary baud rates is
   troublesome because the c library provides no means of doing so and even
   if bare metal linux kernel interface is used it will not work on all
   Linux kernels version.



Changes since tio v1.18:

 * Rearranged key commands

   Rearranged the key commands:

   ctrl-t c (clear screen) is now
   ctrl-t l which is similar to the well known shell ctrl-l

   ctrl-t i (show settings information) is now
   ctrl-t c (show configuration)

   Updated man page accordingly.

 * Added "ctrl-t c" key command to clear screen



Changes since tio v1.17:

 * Updated man page

 * Added support for non-standard baud rates

   Only enabled when possible, that is, when the BOTHER definition is
   available.

   It is untested but it should work as described here:
   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683826

   Some Cypress USB<->serial devices supposedly supports arbitrary speeds.

 * Generate baudrate switch cases based on detection

   Support a single source of baud rate configuration as discussed in
   https://github.com/tio/tio/issues/45 .

   To do so, autogeneration of the switch cases which do the baud rate
   option value check and configuration/conversion in tty_configure() is
   introduced via a single macro.

   Just to be safe, this change also enables configure detection of all
   baud rates, including the ones previously assumed supported by most/all
   systems (POSIX).

 * Minor cleanup

 * Exit when not a tty device in autoconnect mode

Jakub Wilk:

 * Added non-standard baud rates that are defined on FreeBSD

 * Capitalized "GitHub" in README



Changes since tio v1.16:

 * Compacted tty_configure() a bit

 * Fixed automatic baud rate enablement

 * Minor cleanups

 * Added autodetection of available baud rates

   Various platforms support different baud rates.

   To avoid adding platform specific handling generic baud rate detection
   tests are introduced in the configure script. Successfully detected baud
   rates are automatically enabled. This applies to both the C code and the
   bash completion script.

   Note:
   Baud rates below 57600 are defined by POSIX-1 and supported by most
   platforms so only baud rate 57600 and above are tested.

 * Updated bash-completion

 * Fixed printf() format type

 * Added Travis build configuration

Jakub Wilk:

 * Generated bash completion at configure time

 * Reduce code duplication in baud rate detection

 * Add support for baud rates 200 and 1800

 * Fixed baudrate type



Changes since tio v1.15:

 * Updated man page

 * Updated README

 * Removed obsolete packaging files

 * Removed use of deprecated bzero()



Changes since tio v1.14:

 * Removed + to remove potential confusion

 * Added input digit checks

 * Fixed license string

 * Introduced tty_configure()

   Moved tty configuration actions to tty_configure() in tty.c. This way
   options.c is strictly about parsing options nothing else.

 * Function names cleanup

 * Updated AUTHORS file

   Added Nick who created the new tio package for Arch Linux.

 * Fixed tx/rx counters type

Jakob Haufe:

 * Include config.h before standard headers

   Large file support was meant to be enabled in v1.11.
   This change enables it for real.



Changes since tio v1.13:

 * Fixed tio_printf macro

 * Fixed launch hints

   Fixed launch hints not being printed in no autoconnect mode.

 * Added 'ctrl-t ?' to list available commands

 * Fixed log mechanism

   To avoid echoing only log what is received from tty device.

 * Improved tio output

   Added titles and indentation to commands output for clearer separation
   when firing commands repeatedly.

   Also added print of tio version and quit command hint at launch.

 * Cleaned up tio print mechanism

Jakub Wilk:

 * Fixed grammar

   "allow" is a transitive verb, which requires an object,
   so "allow to <verb>" is ungrammatical.

 * Fixed typo



Changes since tio v1.12:

 * Fixed some error prints

 * Fixed error printing for no autoconnect mode

   Always print errors but only print silent errors when in no autoconnect
   mode.

 * Added key command for showing session settings

   A new key command "ctrl-t i" is added to allow the user to display the
   various session settings information (baudrate, databits, log file, etc.).

   This is useful in case you have a running session but have forgotten
   what the settings are.



Changes since tio v1.11:

 * Consolidated command key handling

 * Moved delay mechanism into separate function

 * Retired obsolete usleep()

   Replaced with nanosleep()

 * Added simple tx/rx statistics command (ctrl-t s)

   To display the total number of bytes transmitted/received simply perform the
   'ctrl-t s' command sequence.

   This feature can be useful when e.g. trying to detect non-printable
   characters.

 * Further simplification of key handling

   Changed so that the "ctrl-t ctrl-t" sequence is now simply "ctrl-t t" to
   send the ctrl-t key code. This is inspired by screen which does similar
   to send its command key code (ctrl-a a).

   This change also eases adding new key commands if needed.

   Updated man page accordingly.

 * Cleaned up and simplified key handling

Jakub Wilk:

 * Insert output delay only if something was output



Changes since tio v1.10:

 * Enabled large file support (LFS)

   Added autotools AC_SYS_LARGEFILE to support 64 bit file size handling.

 * Updated tio title



Changes since tio v1.9:

 * Introduced lock on device file

   Tio will now test for and obtain an advisory lock on the tty device file
   to prevent starting multiple sessions on the same tty device.

 * Updated AUTHORS

Jakub Wilk:

 * Treat EOF on stdin as error



Changes since tio v1.8:

 * Cleanup of error handling

   Introduced consistent way of handling errors and printing error messages.

   Also upgraded some warnings to errors.

 * Updated localtime() error message

 * Cleanup

Jakub Wilk:

 * Fix error handling for select()

   Previously the error handling code for select() was unreachable.

 * Removed unneeded quotes from AM_CFLAGS

 * Expanded tabs

 * Fixed setting "tainted"

   Set "tainted" if and only if any character was read from the device.

   Ctrl-t is no longer sent to the device on exit, so the trick to avoid
   its echo is not necessary.

   Characters read from stdin don't directly affect output, so they
   shouldn't enable "tainted".

 * Used \r in color_printf()

   \033[300D is an unusual way to move the cursor back to column 1.
   Use straightforward \r instead.

 * Added missing \r\n to warning messages

   \n alone is not enough, because the terminal is in raw mode.



Changes since tio v1.7:

 * Fixed enablement of compiler warnings

 * Fixed log_open() prototype

 * Fixed index error wrt ctrl-t detection

 * Fixed handling of ctrl-t

   Before, when exercising the quit key sequence (ctrl-t + q) the ctrl-t code
   (0x14) would be sent.

   This is now fixed so that it is not sent.

   However, in case it is needed to send ctrl-t to the device it is possible by
   simply repeating the ctrl-t.

   Meaning, ctrl-t + ctrl-t = ctrl-t sent to device.

 * Improved error handling

   Fixes a memory leak and avoids aggressive busy looping when problems
   accessing tty device.

 * Removed redundant log_close() call

 * Enabled compiler warnings

Jakub Wilk:

 * Stopped copying arguments to fixed-size buffers

   Don't needlessly copy command-line arguments into fixed-size buffers.

   Previously the program crashed if an overlong pathname was provided on
   the command line. Also, some systems (such as GNU Hurd) don't define
   MAXPATHLEN at all.

 * Added const to log_open() prototype

 * Completed the ^g to ^t transition

   In v1.7 the escape key was changed from ^g to ^t, but some
   code and comments still referred to the old key.

 * Used HTTPS for tio.github.io

 * Man page beautification

 * Bumped date in man page

 * Improve man page formatting

   Use regular font for metacharacters such as "[]", "," or "|";
   use italic font for metavariables.

 * Fixed hyphen vs minus vs em-dash confusion in man page

   - prints as hyphen;
   \- prints as minus sign;
   \em prints as em-dash.



Changes since tio v1.6:

 * Changed escape key from ^g to ^t

   After renaming to "tio" it makes sense to change the escape key
   accordingly. Hence, the new escape key is ^t.

   Meaning, in session, its now ctrl-t + q to quit.

Jakub Wilk:

 * Fixed silly "tio or tio" in man page

 * Fixed typo