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_1-327-g10ad5


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-327-g10ad51b
Date: Fri, 30 Aug 2013 13:53:23 +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  10ad51b87f6847531bb9cf92f4ec925d45ec9e94 (commit)
      from  309ba4a5419830ed357d18979a8b34944d0ce6ad (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=10ad51b87f6847531bb9cf92f4ec925d45ec9e94


commit 10ad51b87f6847531bb9cf92f4ec925d45ec9e94
Author: Mats Erik Andersson <address@hidden>
Date:   Wed Aug 28 23:42:31 2013 +0200

    ftp: New command lpwd.

diff --git a/ChangeLog b/ChangeLog
index 88eaa18..4cb9028 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 2013-08-28  Mats Erik Andersson  <address@hidden>
 
+       ftp: New command `lpwd'.
+
+       * ftp/cmds.c: Include "xgetcwd.h".
+       (lcd): Remove external prototype of xgetcwd().
+       (lpwd): New function.
+       * ftp/cmdtab.c (lpwdhelp): New variable.
+       (cmdtab): Add entry for `lpwd'.
+       * ftp/extern.h (lpwd): New prototype.
+
+       * ftp/main.c (argp_options) <-d/--debug>:
+       Improve relevance of help message.
+
+2013-08-28  Mats Erik Andersson  <address@hidden>
+
        Identification of unices.  Check `__unix' and
        `__unix__' in addition to `unix'.  This is needed
        for `ftp' with GCC on NetBSD, OpenBSD.  Both macros
diff --git a/ftp/cmds.c b/ftp/cmds.c
index e6904ea..87a9d78 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -88,6 +88,7 @@
 #include "ftp_var.h"
 #include "unused-parameter.h"
 #include "xalloc.h"
+#include "xgetcwd.h"
 
 #ifndef DEFPORT
 # ifdef IPPORT_FTP
@@ -1360,7 +1361,6 @@ void
 lcd (int argc, char **argv)
 {
   char *dir;
-  extern char *xgetcwd ();
 
   if (argc < 2)
     argc++, argv[1] = home;
@@ -1725,6 +1725,25 @@ pwd (int argc _GL_UNUSED_PARAMETER, char **argv 
_GL_UNUSED_PARAMETER)
 }
 
 /*
+ * Print local working directory.
+ */
+void
+lpwd (int argc _GL_UNUSED_PARAMETER, char **argv _GL_UNUSED_PARAMETER)
+{
+  char *dir = xgetcwd ();
+
+  if (dir)
+    {
+      printf ("Local directory is %s\n", dir);
+      free (dir);
+    }
+  else
+    error (0, errno, "getcwd");
+
+  code = 0;
+}
+
+/*
  * Make a directory.
  */
 void
diff --git a/ftp/cmdtab.c b/ftp/cmdtab.c
index d872d36..ac79a79 100644
--- a/ftp/cmdtab.c
+++ b/ftp/cmdtab.c
@@ -84,6 +84,7 @@ char ipanyhelp[] = "allow all address families";
 char ipv4help[] = "select only IPv4 addresses";
 char ipv6help[] = "select only IPv6 addresses";
 char lcdhelp[] = "change local working directory";
+char lpwdhelp[] = "print local working directory";
 char lshelp[] = "list contents of remote directory";
 char macdefhelp[] = "define a macro";
 char mdeletehelp[] = "delete multiple files";
@@ -161,6 +162,7 @@ static struct cmd cmdtab[] = {
   {"ipv4", ipv4help, 0, 0, 0, setipv4},
   {"ipv6", ipv6help, 0, 0, 0, setipv6},
   {"lcd", lcdhelp, 0, 0, 0, lcd},
+  {"lpwd", lpwdhelp, 0, 0, 0, lpwd},
   {"ls", lshelp, 1, 1, 1, ls},
   {"macdef", macdefhelp, 0, 0, 0, macdef},
   {"mdelete", mdeletehelp, 1, 1, 1, mdelete},
diff --git a/ftp/extern.h b/ftp/extern.h
index 8acd0f7..dff99cf 100644
--- a/ftp/extern.h
+++ b/ftp/extern.h
@@ -88,6 +88,7 @@ void intr (int sig);
 void lcd (int, char **);
 int login (char *);
 void lostpeer (int sig);
+void lpwd (int, char **);
 void ls (int, char **);
 void mabort (int);
 void macdef (int, char **);
diff --git a/ftp/main.c b/ftp/main.c
index 9fe0f01..d12f6dc 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -100,7 +100,7 @@ enum {
 
 static struct argp_option argp_options[] = {
 #define GRP 0
-  {"debug", 'd', NULL, 0, "set the SO_DEBUG option", GRP+1},
+  {"debug", 'd', NULL, 0, "enable debugging output", GRP+1},
   {"no-edit", 'e', NULL, 0,
 #if HAVE_READLINE
          "disable command line editing",

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

Summary of changes:
 ChangeLog    |   14 ++++++++++++++
 ftp/cmds.c   |   21 ++++++++++++++++++++-
 ftp/cmdtab.c |    2 ++
 ftp/extern.h |    1 +
 ftp/main.c   |    2 +-
 5 files changed, 38 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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