]> git.sur5r.net Git - tio/commitdiff
New upstream version 1.30 upstream/1.30
authorJakob Haufe <sur5r@sur5r.net>
Sat, 9 Jun 2018 13:02:19 +0000 (13:02 +0000)
committerJakob Haufe <sur5r@sur5r.net>
Sat, 9 Jun 2018 13:02:19 +0000 (13:02 +0000)
12 files changed:
AUTHORS
ChangeLog
Makefile.in
README
aclocal.m4
configure
configure.ac
man/Makefile.in
man/tio.1
src/Makefile.in
src/bash-completion/tio.in
src/tty.c

diff --git a/AUTHORS b/AUTHORS
index 5d60aa9fac0274f608f0cca6ce3370b6a05c4365..6ee6e96fc60de93a5d97bc816d3616516a890b4b 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,5 +13,6 @@ Robert Scheck <robert@fedoraproject.org>
 Dmitri Goutnik <dg@syrec.org>
 Daniel Engberg <daniel.engberg.lists@pyret.net>
 Petr VanÄ›k <pv@excello.cz>
+qianfan Zhao <qianfanguijin@163.com>
 
 Thanks to everyone who has contributed to this project.
index bff2d3c57c7e4f6969056f77752e6bc8f03debda..d9b6806fcbe0b8313e0ba75bb726ec5617ef5df4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 
-=== tio v1.29 ===
+=== tio v1.30 ===
+
+
+
+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
 
 
 
index 8d155d193026db904c54ab3a5706ca16f56a4bed..cf7a164254edd59830f008e6af05e35c035015cb 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -514,7 +514,7 @@ distdir: $(DISTFILES)
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
        $(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -539,7 +539,7 @@ dist-shar: distdir
        @echo WARNING: "Support for shar distribution archives is" \
                       "deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -557,7 +557,7 @@ dist dist-all:
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lz*) \
@@ -567,7 +567,7 @@ distcheck: dist
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
diff --git a/README b/README
index c3b2e244179997f0705dfd482260c43060fe93f7..6e1bf12b47e02761da7372975bd241ed1cfba71c 100644 (file)
--- a/README
+++ b/README
@@ -57,6 +57,7 @@
 
     The latest release version is available at https://tio.github.io
 
+
 3.1 Installation using release tarball
 
     Install steps:
@@ -67,6 +68,7 @@
 
     See INSTALL file for more installation details.
 
+
 3.2 Installation using package
 
     Tio comes prepackaged for various GNU/Linux distributions. Visit
index f3018f6c870ba5fb0590a4ffe78c096f541d3d70..df8ff837794b338872e8d64943925ccdc242f5f1 100644 (file)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.15.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -408,7 +408,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -605,7 +605,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -626,7 +626,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -647,7 +647,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -697,7 +697,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -736,7 +736,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -765,7 +765,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -812,7 +812,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -831,7 +831,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -912,7 +912,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -972,7 +972,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1000,7 +1000,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1019,7 +1019,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 93d59dbd3efb430063f6600a142d9438f73b9032..1bfa01825abd13ea0a768c37dc64acb1320bbcde 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tio 1.29.
+# Generated by GNU Autoconf 2.69 for tio 1.30.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -576,8 +576,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tio'
 PACKAGE_TARNAME='tio'
-PACKAGE_VERSION='1.29'
-PACKAGE_STRING='tio 1.29'
+PACKAGE_VERSION='1.30'
+PACKAGE_STRING='tio 1.30'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL='https://tio.github.io'
 
@@ -1241,7 +1241,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures tio 1.29 to adapt to many kinds of systems.
+\`configure' configures tio 1.30 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1308,7 +1308,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tio 1.29:";;
+     short | recursive ) echo "Configuration of tio 1.30:";;
    esac
   cat <<\_ACEOF
 
@@ -1407,7 +1407,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tio configure 1.29
+tio configure 1.30
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1508,7 +1508,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tio $as_me 1.29, which was
+It was created by tio $as_me 1.30, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2373,7 +2373,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='tio'
- VERSION='1.29'
+ VERSION='1.30'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4990,7 +4990,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tio $as_me 1.29, which was
+This file was extended by tio $as_me 1.30, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5057,7 +5057,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tio config.status 1.29
+tio config.status 1.30
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 78a3dae4f45d77866a572d851cccecd146c5b5e5..430c0d3870c985add5fe32e6c4520f11bf673cdf 100644 (file)
@@ -1,5 +1,5 @@
 AC_PREREQ([2.68])
-AC_INIT([tio], [1.29], [], [tio], [https://tio.github.io])
+AC_INIT([tio], [1.30], [], [tio], [https://tio.github.io])
 AC_CONFIG_HEADERS([src/include/config.h])
 AM_INIT_AUTOMAKE([1.11 foreign dist-xz no-dist-gzip -Wall -Werror])
 AM_SILENT_RULES([yes])
index ab1713bccc4d2725bbf192e91b72c80482d9f1a1..42fa2044199dcf14384ef0a53a7cc65dbd837384 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index f666ad969d0b12bd0476d2a40524c551f085da88..f8566e4962534614808eeb74e02532d00ad8f2a2 100644 (file)
--- a/man/tio.1
+++ b/man/tio.1
@@ -1,4 +1,4 @@
-.TH "tio" "1" "November 2017"
+.TH "tio" "1" "April 2018"
 
 .SH "NAME"
 tio \- a simple TTY terminal I/O application
@@ -63,20 +63,20 @@ Map (replace, translate) special characters on input or output. The following ma
 
 .RS
 .TP 12n
+.IP "\fBICRNL"
+Map CR to NL on input (unless IGNCR is set).
+.IP "\fBIGNCR"
+Ignore CR on input.
 .IP "\fBINLCR"
 Map NL to CR on input.
 .IP "\fBINLCRNL"
 Map NL to CR-NL on input.
-.IP "\fBIGNCR"
-Ignore CR on input.
-.IP "\fBICRNL"
-Map CR to NL on input (unless IGNCR is set).
-.IP "\fBONLCRNL"
-Map NL to CR-NL on output.
 .IP "\fBOCRNL"
 Map CR to NL on output.
 .IP "\fBODELBS"
 Map DEL to BS on output.
+.IP "\fBONLCRNL"
+Map NL to CR-NL on output.
 .P
 If defining more than one flag, the flags must be comma separated.
 .RE
index 231214b2572e9d4d92d2a890c7559007c34eaa31..ee56344a75f5a07e995efed65049de91b7e71de0 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 431b1cc27561635cab2cf2e5b28464ef8f6dd7ef..367f4b239461e07829ab020ea7f0ffdef0d63dbf 100644 (file)
@@ -58,7 +58,7 @@ _tio()
             return 0
             ;;
         -m | --map)
-            COMPREPLY=( $(compgen -W "INLCR IGNCR ICRNL ONLCR OCRNL" -- ${cur}) )
+            COMPREPLY=( $(compgen -W "ICRNL IGNCR INLCR INLCRNL OCRNL ODELBS ONLCRNL" -- ${cur}) )
             return 0
             ;;
         -v | --version)
index 9ad4980b31026e1395af262f2d4ccb01f0827272..c823e1b7c25dd98936b4a13347cf47436da83ea8 100644 (file)
--- a/src/tty.c
+++ b/src/tty.c
@@ -55,6 +55,7 @@ static bool standard_baudrate = true;
 static void (*print)(char c);
 static int fd;
 static bool map_inlcrnl = false;
+static bool map_onlcrnl = false;
 static bool map_odelbs = false;
 
 #define tio_printf(format, args...) \
@@ -413,14 +414,14 @@ void tty_configure(void)
                 tio.c_iflag |= IGNCR;
             else if (strcmp(token,"ICRNL") == 0)
                 tio.c_iflag |= ICRNL;
-            else if (strcmp(token,"ONLCRNL") == 0)
-                tio.c_oflag |= ONLCR;
             else if (strcmp(token,"OCRNL") == 0)
                 tio.c_oflag |= OCRNL;
             else if (strcmp(token,"ODELBS") == 0)
                 map_odelbs = true;
             else if (strcmp(token,"INLCRNL") == 0)
                 map_inlcrnl = true;
+            else if (strcmp(token, "ONLCRNL") == 0)
+                map_onlcrnl = true;
             else
             {
                 printf("Error: Unknown mapping flag %s\n", token);
@@ -652,6 +653,18 @@ int tty_connect(void)
                     if ((output_char == 127) && (map_odelbs))
                         output_char = '\b';
 
+                    /* Map newline character */
+                    if ((output_char == '\n') && (map_onlcrnl)) {
+                        char r = '\r';
+
+                        status = write(fd, &r, 1);
+                        if (status < 0)
+                            warning_printf("Could not write to tty device");
+
+                        tx_total++;
+                        delay(option.output_delay);
+                    }
+
                     /* Send output to tty device */
                     status = write(fd, &output_char, 1);
                     if (status < 0)