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-31-gd129f7


From: Alfred M. Szmidt
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_2-31-gd129f72
Date: Wed, 30 Jul 2014 16:18:39 +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  d129f72ed5de3557b27152965a4a0b6d597ba653 (commit)
       via  e5d2fade3ae0be1a3969df933e677e1044d22b73 (commit)
      from  a60088c32b9e0782bc4bda3807b9b79efa0b3df0 (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=d129f72ed5de3557b27152965a4a0b6d597ba653


commit d129f72ed5de3557b27152965a4a0b6d597ba653
Author: Alfred M. Szmidt <address@hidden>
Date:   Wed Jul 30 18:18:12 2014 +0200

    * telnetd/utility.c (printsub): Don't add integer to string to try and
    skip quote.

diff --git a/ChangeLog b/ChangeLog
index 8b6943c..d293e10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
        * telnetd/utility.c (nextitem, netclear, printoption, printsub)
        (printdata): Remove register keyword usage.
 
+       (printsub): Don't add integer to string to try and skip quote.
+
 2014-07-28  Giuseppe Scrivano  <address@hidden>
 
        * tests/ls.c: Include <config.h> not "config.h".
diff --git a/telnetd/utility.c b/telnetd/utility.c
index 992b6a1..6c7c455 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -1356,50 +1356,50 @@ printsub (int direction, unsigned char *pointer, int 
length)
 
        env_common:
          {
-           int noquote = 2;
+           char *quote = "";
            for (i = 2; i < length; i++)
              {
                switch (pointer[i])
                  {
                  case NEW_ENV_VAR:
-                   debug_output_data ("\" VAR " + noquote);
-                   noquote = 2;
+                   debug_output_data ("%sVAR ", quote);
+                   quote = "";
                    break;
 
                  case NEW_ENV_VALUE:
-                   debug_output_data ("\" VALUE " + noquote);
-                   noquote = 2;
+                   debug_output_data ("%sVALUE ", quote);
+                   quote = "";
                    break;
 
                  case ENV_ESC:
-                   debug_output_data ("\" ESC " + noquote);
-                   noquote = 2;
+                   debug_output_data ("%sESC ", quote);
+                   quote = "";
                    break;
 
                  case ENV_USERVAR:
-                   debug_output_data ("\" USERVAR " + noquote);
-                   noquote = 2;
+                   debug_output_data ("%sUSERVAR ", quote);
+                   quote = "";
                    break;
 
                  default:
                    if (isprint (pointer[i]) && pointer[i] != '"')
                      {
-                        if (noquote)
+                        if (strcmp (quote, "") == 0)
                          {
                            debug_output_data ("\"");
-                           noquote = 0;
+                           quote = "\" ";
                          }
                        debug_output_datalen ((char*) &pointer[i], 1);
                      }
                    else
                      {
-                       debug_output_data ("\" %03o " + noquote, pointer[i]);
-                       noquote = 2;
+                       debug_output_data ("%s%03o ", quote, pointer[i]);
+                       quote = "";
                      }
                    break;
                  }
              }
-           if (!noquote)
+           if (strcmp (quote, "\" ") == 0)
              debug_output_data ("\"");
            break;
          }

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=e5d2fade3ae0be1a3969df933e677e1044d22b73


commit e5d2fade3ae0be1a3969df933e677e1044d22b73
Author: Alfred M. Szmidt <address@hidden>
Date:   Wed Jul 30 18:14:25 2014 +0200

    * telnetd/utility.c (nextitem, netclear, printoption, printsub)
    (printdata): Remove register keyword usage.

diff --git a/ChangeLog b/ChangeLog
index d12fbc4..8b6943c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-07-30  Alfred M. Szmidt  <address@hidden>
+
+       * telnetd/utility.c (nextitem, netclear, printoption, printsub)
+       (printdata): Remove register keyword usage.
+
 2014-07-28  Giuseppe Scrivano  <address@hidden>
 
        * tests/ls.c: Include <config.h> not "config.h".
diff --git a/telnetd/utility.c b/telnetd/utility.c
index e38cf1d..992b6a1 100644
--- a/telnetd/utility.c
+++ b/telnetd/utility.c
@@ -44,8 +44,8 @@
 # include <term.h>
 #endif
 
-#if defined HAVE_STREAMSPTY && defined HAVE_GETMSG \
-       && defined HAVE_STROPTS_H
+#if defined HAVE_STREAMSPTY && defined HAVE_GETMSG     \
+  && defined HAVE_STROPTS_H
 # include <stropts.h>
 #endif
 
@@ -491,13 +491,13 @@ nextitem (char *current)
 
     case SB:                   /* loop forever looking for the SE */
       {
-       register char *look = current + 2;
+       char *look = current + 2;
 
        for (;;)
          if ((*look++ & 0xff) == IAC && (*look++ & 0xff) == SE)
            return look;
 
-    default:
+      default:
        return current + 2;
       }
     }
@@ -520,15 +520,15 @@ nextitem (char *current)
  * caller should be setting the urgent data pointer AFTER calling
  * us in any case.
  */
-#define wewant(p) \
-  ((nfrontp > p) && ((*p&0xff) == IAC) && \
+#define wewant(p)                                      \
+  ((nfrontp > p) && ((*p&0xff) == IAC) &&              \
    ((*(p+1)&0xff) != EC) && ((*(p+1)&0xff) != EL))
 
 
 void
 netclear (void)
 {
-  register char *thisitem, *next;
+  char *thisitem, *next;
   char *good;
 
 #ifdef ENCRYPTION
@@ -662,7 +662,7 @@ fatal (int f, char *msg)
 #endif /* ENCRYPTION */
   write (f, buf, (int) strlen (buf));
   sleep (1);
-   /*FIXME*/ exit (EXIT_FAILURE);
+  /*FIXME*/ exit (EXIT_FAILURE);
 }
 
 void
@@ -921,7 +921,7 @@ debug_output_data (const char *fmt, ...)
  * Print telnet options and commands in plain text, if possible.
  */
 void
-printoption (register char *fmt, register int option)
+printoption (char *fmt, int option)
 {
   if (TELOPT_OK (option))
     debug_output_data ("%s %s\r\n", fmt, TELOPT (option));
@@ -937,7 +937,7 @@ printoption (register char *fmt, register int option)
 void
 printsub (int direction, unsigned char *pointer, int length)
 {
-  register int i = 0;
+  int i = 0;
 
 #if defined AUTHENTICATION || defined ENCRYPTION
   char buf[512];
@@ -957,7 +957,7 @@ printsub (int direction, unsigned char *pointer, int length)
                         direction == '<' ? "recv" : "send");
       if (length >= 3)
        {
-         register int j;
+         int j;
 
          i = pointer[length - 2];
          j = pointer[length - 1];
@@ -1231,8 +1231,8 @@ printsub (int direction, unsigned char *pointer, int 
length)
 
     case TELOPT_STATUS:
       {
-       register char *cp;
-       register int j, k;
+       char *cp;
+       int j, k;
 
        debug_output_data ("STATUS");
 
@@ -1356,7 +1356,7 @@ printsub (int direction, unsigned char *pointer, int 
length)
 
        env_common:
          {
-           register int noquote = 2;
+           int noquote = 2;
            for (i = 2; i < length; i++)
              {
                switch (pointer[i])
@@ -1571,9 +1571,9 @@ printsub (int direction, unsigned char *pointer, int 
length)
  * Dump a data buffer in hex and ascii to the output data stream.
  */
 void
-printdata (register char *tag, register char *ptr, register int cnt)
+printdata (char *tag, char *ptr, int cnt)
 {
-  register int i;
+  int i;
   char xbuf[30];
 
   while (cnt)

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

Summary of changes:
 ChangeLog         |    7 ++++++
 telnetd/utility.c |   58 ++++++++++++++++++++++++++--------------------------
 2 files changed, 36 insertions(+), 29 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

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