commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-24-g57c3bb


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-24-g57c3bb4
Date: Thu, 17 Jul 2014 21:24:07 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  57c3bb4c9be5b0591c67db9cd7566bc82558fefd (commit)
      from  abb0bed745b939efcd4a1edcb93513cff85c6100 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=57c3bb4c9be5b0591c67db9cd7566bc82558fefd


commit 57c3bb4c9be5b0591c67db9cd7566bc82558fefd
Author: Mats Erik Andersson <address@hidden>
Date:   Mon Jul 14 23:07:59 2014 +0200

    ftp: Hash command semantic.

diff --git a/ChangeLog b/ChangeLog
index 9967cf8..2311581 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-07-14  Mats Erik Andersson  <address@hidden>
+
+       ftp: Hash command semantic.
+       Toggle hash state when argument is not set, only then.
+
+       * ftp/cmds.c (sethash): Activate marker when a numeric
+       argument is found; toggle when no argument is present.
+       A non-numeric argument leads to status reporting only.
+
 2014-06-05  Mats Erik Andersson  <address@hidden>
 
        ftp: Alternate selection of .netrc file.
diff --git a/NEWS b/NEWS
index ec41f5f..9fefc7e 100644
--- a/NEWS
+++ b/NEWS
@@ -9,12 +9,12 @@ Version 1.9.3:
 
 * ftp
 
-The internal command `hash' accepts a suffixed letter to the
-size argument, like `12k', instead of 12288. Also, the .netrc
-file can be overridden by the environment variable NETRC.
-Of even higher precedence is the new option `-N/--netrc'.
-The access to the resulting file, whatever method, is now
-denied unless it as a regular file.
+The internal command `hash' accepts a suffixed letter to the size
+argument, like `12k', instead of 12288.  Made a minor change to the
+semantics of the command itself.  Also, the .netrc file can be over-
+ridden by the environment variable NETRC.  Of even higher precedence
+is the new option `-N/--netrc'.  The access to the resulting file,
+whatever method, is now denied unless it is a regular file.
 
 * syslogd
 
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 21a33b5..9b72a97 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -1579,11 +1579,14 @@ an already created @command{tar} or @command{cpio} 
archive of the
 subtree, then making certain that @command{ftp} uses binary mode.
 
 @item hash address@hidden
-Toggle hash-sign (@samp{#}) printing for each data block transferred.
-The size of a data block can optionally be specified.  If not given,
-it defaults to 1024 bytes.  The size can be written with multipliers
-'k', 'K', 'm', 'M', and 'g', 'G', to specify kilobytes, megabytes,
-or gigabytes.
+In the absence of an argument, toggle the state of hash-sign (@samp{#})
+printing after each transferred data block.
+The optional argument selects the size of data blocks,
+and unconditionally activates printing.
+The default size is 1024 bytes.
+For convenience, the size can be written with postfix multipliers
+'k', 'K', 'm', 'M', and 'g', 'G', to specify kilobytes, Megabytes,
+and Gigabytes, respectively.
 
 @item help address@hidden
 @itemx ? address@hidden
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 471cd86..9bd2e69 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -1201,6 +1201,10 @@ settrace (int argc _GL_UNUSED_PARAMETER, char **argv 
_GL_UNUSED_PARAMETER)
  *
  * Parse multipliers 'k', 'K', 'm', 'M', and
  * 'g', 'G' to simplify the size step.
+ *
+ * With a numerical argument, hash marking is
+ * made active, and the step size is updated.
+ * Toggle state only in absence of an argument.
  */
 void
 sethash (int argc _GL_UNUSED_PARAMETER, char **argv)
@@ -1214,9 +1218,11 @@ sethash (int argc _GL_UNUSED_PARAMETER, char **argv)
   if (argv[1] != NULL)
     sscanf (argv[1], "%d", &hashbytes);
 
-  /* Apply a multiplier only if a numerical part exixts.  */
+  /* Apply a multiplier only if a numerical part exists.  */
   if (argv[1] && isdigit (*argv[1]))
     {
+      hash = 1;                        /* Enforce markers.  */
+
       switch (*p)
        {
        case 'g':
@@ -1233,12 +1239,16 @@ sethash (int argc _GL_UNUSED_PARAMETER, char **argv)
 
   if (hashbytes <= 0)
     hashbytes = 1024;
-  hash = !hash;
+
+  if (!argv[1])                        /* Toggle when argument is absent.  */
+    hash = !hash;
+
   printf ("Hash mark printing %s", onoff (hash));
-  code = hash;
   if (hash)
     printf (" (%d bytes/hash mark)", hashbytes);
   printf (".\n");
+
+  code = hash;
 }
 
 /*

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |    9 +++++++++
 NEWS               |   12 ++++++------
 doc/inetutils.texi |   13 ++++++++-----
 ftp/cmds.c         |   16 +++++++++++++---
 4 files changed, 36 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]