[PATCH 0/2] wpbuf class-ification

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 0/2] wpbuf class-ification

Hans-Bernhard Bröker
Second shot at wpbuf class-ification.  Also no longer
request data from WriteConsoleA that is not used for anything.

Hans-Bernhard Broeker (2):
  Collect handling of wpixput and wpbuf into a helper class.
  Do not bother passing optional argument to WriteConsoleA.

 winsup/cygwin/fhandler_console.cc | 164 ++++++++++++++++--------------
 1 file changed, 85 insertions(+), 79 deletions(-)

--
2.21.0

Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] Collect handling of wpixput and wpbuf into a helper class.

Hans-Bernhard Bröker
Replace direct access to a pair of co-dependent variables
by calls to methods of a class that encapsulates their relation.

Also replace C #define by C++ class constant.
---
  winsup/cygwin/fhandler_console.cc | 141 ++++++++++++++++--------------
  1 file changed, 76 insertions(+), 65 deletions(-)

diff --git a/winsup/cygwin/fhandler_console.cc
b/winsup/cygwin/fhandler_console.cc
index c5f269168..9d7a9e9ea 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -59,17 +59,28 @@ static struct fhandler_base::rabuf_t con_ra;
   /* Write pending buffer for ESC sequence handling
     in xterm compatible mode */
-#define WPBUF_LEN 256
-static unsigned char wpbuf[WPBUF_LEN];
-static int wpixput;
  static unsigned char last_char;
  -static inline void
-wpbuf_put (unsigned char x)
+/* simple helper class to accumulate output in a buffer
+   and send that to the console on request: */
+static class write_pending_bufferOA
  {
-  if (wpixput < WPBUF_LEN)
-    wpbuf[wpixput++] = x;
-}
+private:
+  static const size_t WPBUF_LEN = 256u;
+  unsigned char buf[WPBUF_LEN];
+  size_t ixput;
+public:
+  inline void put (unsigned char x)
+  {
+    if (ixput < WPBUF_LEN)
+      buf[ixput++] = x;
+  }
+  inline void empty () { ixput = 0u; }
+  inline void send (HANDLE &handle, DWORD *wn = NULL)
+  {
+    WriteConsoleA (handle, buf, ixput, wn, 0);
+  }
+} wpbuf;
   static void
  beep ()
@@ -2030,10 +2041,10 @@ fhandler_console::char_command (char c)
   break;
  #endif
  case 'b': /* REP */
-  wpbuf_put (c);
+  wpbuf.put (c);
   if (wincap.has_con_esc_rep ())
     /* Just send the sequence */
-    WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+    wpbuf.send (get_output_handle (), &wn);
   else if (last_char && last_char != '\n')
     for (int i = 0; i < con.args[0]; i++)
       WriteConsoleA (get_output_handle (), &last_char, 1, &wn, 0);
@@ -2041,9 +2052,9 @@ fhandler_console::char_command (char c)
  case 'r': /* DECSTBM */
   con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0;
   con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1;
-  wpbuf_put (c);
+  wpbuf.put (c);
   /* Just send the sequence */
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+  wpbuf.send (get_output_handle (), &wn);
   break;
  case 'L': /* IL */
   if (wincap.has_con_broken_il_dl ())
@@ -2067,8 +2078,8 @@ fhandler_console::char_command (char c)
        y + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
       WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
-      wpbuf_put ('T');
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+      wpbuf.put ('T');
+      wpbuf.send (get_output_handle (), &wn);
       __small_sprintf (buf, "\033[%d;%dr",
        srTop + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
@@ -2079,9 +2090,9 @@ fhandler_console::char_command (char c)
     }
   else
     {
-      wpbuf_put (c);
+      wpbuf.put (c);
       /* Just send the sequence */
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+      wpbuf.send (get_output_handle (), &wn);
     }
   break;
  case 'M': /* DL */
@@ -2095,8 +2106,8 @@ fhandler_console::char_command (char c)
        y + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
       WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
-      wpbuf_put ('S');
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+      wpbuf.put ('S');
+      wpbuf.send (get_output_handle (), &wn);
       __small_sprintf (buf, "\033[%d;%dr",
        srTop + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
@@ -2107,13 +2118,13 @@ fhandler_console::char_command (char c)
     }
   else
     {
-      wpbuf_put (c);
+      wpbuf.put (c);
       /* Just send the sequence */
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+      wpbuf.send (get_output_handle (), &wn);
     }
   break;
  case 'J': /* ED */
-  wpbuf_put (c);
+  wpbuf.put (c);
   if (con.args[0] == 3 && wincap.has_con_broken_csi3j ())
     { /* Workaround for broken CSI3J in Win10 1809 */
       CONSOLE_SCREEN_BUFFER_INFO sbi;
@@ -2131,7 +2142,7 @@ fhandler_console::char_command (char c)
     }
   else
     /* Just send the sequence */
-    WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+    wpbuf.send (get_output_handle (), &wn);
   break;
  case 'h': /* DECSET */
  case 'l': /* DECRST */
@@ -2139,9 +2150,9 @@ fhandler_console::char_command (char c)
     con.screen_alternated = true;
   else
     con.screen_alternated = false;
-  wpbuf_put (c);
+  wpbuf.put (c);
   /* Just send the sequence */
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+  wpbuf.send (get_output_handle (), &wn);
   if (con.saw_question_mark)
     {
       bool need_fix_tab_position = false;
@@ -2159,15 +2170,15 @@ fhandler_console::char_command (char c)
       con.scroll_region.Top = 0;
       con.scroll_region.Bottom = -1;
     }
-  wpbuf_put (c);
+  wpbuf.put (c);
   /* Just send the sequence */
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+  wpbuf.send (get_output_handle (), &wn);
   break;
  default:
   /* Other escape sequences */
-  wpbuf_put (c);
+  wpbuf.put (c);
   /* Just send the sequence */
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+  wpbuf.send (get_output_handle (), &wn);
   break;
  }
        return;
@@ -2874,7 +2885,7 @@ do_print:
   break;
  case ESC:
   con.state = gotesc;
-  wpbuf_put (*found);
+  wpbuf.put (*found);
   break;
  case DWN:
   cursor_get (&x, &y);
@@ -2989,7 +3000,7 @@ fhandler_console::write (const void *vsrc, size_t len)
  case gotesc:
   if (*src == '[') /* CSI Control Sequence Introducer */
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.state = gotsquare;
       memset (con.args, 0, sizeof con.args);
       con.nargs = 0;
@@ -3005,13 +3016,13 @@ fhandler_console::write (const void *vsrc,
size_t len)
   /* For xterm mode only */
   DWORD n;
   /* Just send the sequence */
-  wpbuf_put (*src);
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0);
+  wpbuf.put (*src);
+  wpbuf.send (get_output_handle (), &n);
  }
       else if (con.savex >= 0 && con.savey >= 0)
  cursor_set (false, con.savex, con.savey);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (*src == '7') /* DECSC Save cursor position */
     {
@@ -3020,13 +3031,13 @@ fhandler_console::write (const void *vsrc,
size_t len)
   /* For xterm mode only */
   DWORD n;
   /* Just send the sequence */
-  wpbuf_put (*src);
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0);
+  wpbuf.put (*src);
+  wpbuf.send (get_output_handle (), &n);
  }
       else
  cursor_get (&con.savex, &con.savey);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (wincap.has_con_24bit_colors () && !con_is_legacy
    && wincap.has_con_broken_il_dl () && *src == 'M')
@@ -3048,14 +3059,14 @@ fhandler_console::write (const void *vsrc,
size_t len)
      buf, strlen (buf), &n, 0);
     }
   /* Substitute "CSI Ps T" */
-  wpbuf_put ('[');
-  wpbuf_put ('T');
+  wpbuf.put ('[');
+  wpbuf.put ('T');
  }
       else
- wpbuf_put (*src);
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0);
+ wpbuf.put (*src);
+      wpbuf.send (get_output_handle (), &n);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (wincap.has_con_24bit_colors () && !con_is_legacy)
     {
@@ -3067,28 +3078,28 @@ fhandler_console::write (const void *vsrc,
size_t len)
       /* ESC sequences below (e.g. OSC, etc) are left to xterm
  emulation in xterm compatible mode, therefore, are not
  handled and just sent them. */
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       /* Just send the sequence */
       DWORD n;
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0);
+      wpbuf.send (get_output_handle (), &n);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (*src == ']') /* OSC Operating System Command */
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.rarg = 0;
       con.my_title_buf[0] = '\0';
       con.state = gotrsquare;
     }
   else if (*src == '(') /* Designate G0 character set */
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.state = gotparen;
     }
   else if (*src == ')') /* Designate G1 character set */
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.state = gotrparen;
     }
   else if (*src == 'M') /* Reverse Index (scroll down) */
@@ -3096,7 +3107,7 @@ fhandler_console::write (const void *vsrc, size_t len)
       con.fillin (get_output_handle ());
       scroll_buffer_screen (0, 0, -1, -1, 0, 1);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (*src == 'c') /* RIS Full Reset */
     {
@@ -3107,17 +3118,17 @@ fhandler_console::write (const void *vsrc,
size_t len)
       cursor_set (false, 0, 0);
       clear_screen (cl_buf_beg, cl_buf_beg, cl_buf_end, cl_buf_end);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (*src == 'R') /* ? */
     {
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else
     {
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   src++;
   break;
@@ -3126,19 +3137,19 @@ fhandler_console::write (const void *vsrc,
size_t len)
     {
       if (con.nargs < MAXARGS)
  con.args[con.nargs] = con.args[con.nargs] * 10 + *src - '0';
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       src++;
     }
   else if (*src == ';')
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       src++;
       if (con.nargs < MAXARGS)
  con.nargs++;
     }
   else if (*src == ' ')
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       src++;
       con.saw_space = true;
       con.state = gotcommand;
@@ -3151,7 +3162,7 @@ fhandler_console::write (const void *vsrc, size_t len)
     con.nargs++;
   char_command (*src++);
   con.state = normal;
-  wpixput = 0;
+  wpbuf.empty();
   break;
  case gotrsquare:
   if (isdigit (*src))
@@ -3162,7 +3173,7 @@ fhandler_console::write (const void *vsrc, size_t len)
     con.state = eatpalette;
   else
     con.state = eattitle;
-  wpbuf_put (*src);
+  wpbuf.put (*src);
   src++;
   break;
  case eattitle:
@@ -3174,13 +3185,13 @@ fhandler_console::write (const void *vsrc,
size_t len)
  if (*src == '\007' && con.state == gettitle)
   set_console_title (con.my_title_buf);
  con.state = normal;
- wpixput = 0;
+ wpbuf.empty();
       }
     else if (n < TITLESIZE)
       {
  con.my_title_buf[n++] = *src;
  con.my_title_buf[n] = '\0';
- wpbuf_put (*src);
+ wpbuf.put (*src);
       }
     src++;
     break;
@@ -3188,13 +3199,13 @@ fhandler_console::write (const void *vsrc,
size_t len)
  case eatpalette:
   if (*src == '\033')
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.state = endpalette;
     }
   else if (*src == '\a')
     {
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   src++;
   break;
@@ -3204,14 +3215,14 @@ fhandler_console::write (const void *vsrc,
size_t len)
   else
     /* Sequence error (abort) */
     con.state = normal;
-  wpixput = 0;
+  wpbuf.empty();
   src++;
   break;
  case gotsquare:
   if (*src == ';')
     {
       con.state = gotarg1;
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       if (con.nargs < MAXARGS)
  con.nargs++;
       src++;
@@ -3226,7 +3237,7 @@ fhandler_console::write (const void *vsrc, size_t len)
  con.saw_greater_than_sign = true;
       else if (*src == '!')
  con.saw_exclamation_mark = true;
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       /* ignore any extra chars between [ and first arg or command */
       src++;
     }
@@ -3239,7 +3250,7 @@ fhandler_console::write (const void *vsrc, size_t len)
   else
     con.vt100_graphics_mode_G0 = false;
   con.state = normal;
-  wpixput = 0;
+  wpbuf.empty();
   src++;
   break;
  case gotrparen: /* Designate G1 Character Set (ISO 2022) */
@@ -3248,7 +3259,7 @@ fhandler_console::write (const void *vsrc, size_t len)
   else
     con.vt100_graphics_mode_G1 = false;
   con.state = normal;
-  wpixput = 0;
+  wpbuf.empty();
   src++;
   break;
  }
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] Do not bother passing optional argument to WriteConsoleA.

Hans-Bernhard Bröker
In reply to this post by Hans-Bernhard Bröker
Passing a pointer to a local variable to WriteConsoleA is
not actually needed if we're not going to do anything with
what WriteConsoleA would put in there.

For the wpbuf class the pointer argument was made optional,
so it can be just left out; other call places now pass a
NULL pointer instead.  The local variables `wn' and `n'
are no unused, so they go away.
---
  winsup/cygwin/fhandler_console.cc | 51 ++++++++++++++-----------------
  1 file changed, 23 insertions(+), 28 deletions(-)

diff --git a/winsup/cygwin/fhandler_console.cc
b/winsup/cygwin/fhandler_console.cc
index 9d7a9e9ea..1c376291f 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -2015,7 +2015,6 @@ fhandler_console::char_command (char c)
    if (wincap.has_con_24bit_colors () && !con_is_legacy)
      {
        /* For xterm compatible mode */
-      DWORD wn;
        switch (c)
  {
  #if 0 /* These sequences, which are supported by real xterm, are
@@ -2044,17 +2043,17 @@ fhandler_console::char_command (char c)
   wpbuf.put (c);
   if (wincap.has_con_esc_rep ())
     /* Just send the sequence */
-    wpbuf.send (get_output_handle (), &wn);
+    wpbuf.send (get_output_handle ());
   else if (last_char && last_char != '\n')
     for (int i = 0; i < con.args[0]; i++)
-      WriteConsoleA (get_output_handle (), &last_char, 1, &wn, 0);
+      WriteConsoleA (get_output_handle (), &last_char, 1, 0, 0);
   break;
  case 'r': /* DECSTBM */
   con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0;
   con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1;
   wpbuf.put (c);
   /* Just send the sequence */
-  wpbuf.send (get_output_handle (), &wn);
+  wpbuf.send (get_output_handle ());
   break;
  case 'L': /* IL */
   if (wincap.has_con_broken_il_dl ())
@@ -2072,27 +2071,27 @@ fhandler_console::char_command (char c)
    srBottom - (n-1) - con.b.srWindow.Top + 1,
    y + 1 - con.b.srWindow.Top, x + 1);
   WriteConsoleA (get_output_handle (),
- buf, strlen (buf), &wn, 0);
+ buf, strlen (buf), 0, 0);
  }
       __small_sprintf (buf, "\033[%d;%dr",
        y + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
       wpbuf.put ('T');
-      wpbuf.send (get_output_handle (), &wn);
+      wpbuf.send (get_output_handle ());
       __small_sprintf (buf, "\033[%d;%dr",
        srTop + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
       __small_sprintf (buf, "\033[%d;%dH",
        y + 1 - con.b.srWindow.Top, x + 1);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
     }
   else
     {
       wpbuf.put (c);
       /* Just send the sequence */
-      wpbuf.send (get_output_handle (), &wn);
+      wpbuf.send (get_output_handle ());
     }
   break;
  case 'M': /* DL */
@@ -2105,22 +2104,22 @@ fhandler_console::char_command (char c)
       __small_sprintf (buf, "\033[%d;%dr",
        y + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
       wpbuf.put ('S');
-      wpbuf.send (get_output_handle (), &wn);
+      wpbuf.send (get_output_handle ());
       __small_sprintf (buf, "\033[%d;%dr",
        srTop + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
       __small_sprintf (buf, "\033[%d;%dH",
        y + 1 - con.b.srWindow.Top, x + 1);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
     }
   else
     {
       wpbuf.put (c);
       /* Just send the sequence */
-      wpbuf.send (get_output_handle (), &wn);
+      wpbuf.send (get_output_handle ());
     }
   break;
  case 'J': /* ED */
@@ -2142,7 +2141,7 @@ fhandler_console::char_command (char c)
     }
   else
     /* Just send the sequence */
-    wpbuf.send (get_output_handle (), &wn);
+    wpbuf.send (get_output_handle ());
   break;
  case 'h': /* DECSET */
  case 'l': /* DECRST */
@@ -2152,7 +2151,7 @@ fhandler_console::char_command (char c)
     con.screen_alternated = false;
   wpbuf.put (c);
   /* Just send the sequence */
-  wpbuf.send (get_output_handle (), &wn);
+  wpbuf.send (get_output_handle ());
   if (con.saw_question_mark)
     {
       bool need_fix_tab_position = false;
@@ -2172,13 +2171,13 @@ fhandler_console::char_command (char c)
     }
   wpbuf.put (c);
   /* Just send the sequence */
-  wpbuf.send (get_output_handle (), &wn);
+  wpbuf.send (get_output_handle ());
   break;
  default:
   /* Other escape sequences */
   wpbuf.put (c);
   /* Just send the sequence */
-  wpbuf.send (get_output_handle (), &wn);
+  wpbuf.send (get_output_handle ());
   break;
  }
        return;
@@ -3014,10 +3013,9 @@ fhandler_console::write (const void *vsrc, size_t
len)
       if (con.screen_alternated)
  {
   /* For xterm mode only */
-  DWORD n;
   /* Just send the sequence */
   wpbuf.put (*src);
-  wpbuf.send (get_output_handle (), &n);
+  wpbuf.send (get_output_handle ());
  }
       else if (con.savex >= 0 && con.savey >= 0)
  cursor_set (false, con.savex, con.savey);
@@ -3029,10 +3027,9 @@ fhandler_console::write (const void *vsrc, size_t
len)
       if (con.screen_alternated)
  {
   /* For xterm mode only */
-  DWORD n;
   /* Just send the sequence */
   wpbuf.put (*src);
-  wpbuf.send (get_output_handle (), &n);
+  wpbuf.send (get_output_handle ());
  }
       else
  cursor_get (&con.savex, &con.savey);
@@ -3043,7 +3040,6 @@ fhandler_console::write (const void *vsrc, size_t len)
    && wincap.has_con_broken_il_dl () && *src == 'M')
     { /* Reverse Index (scroll down) */
       int x, y;
-      DWORD n;
       cursor_get (&x, &y);
       if (y == srTop)
  {
@@ -3056,7 +3052,7 @@ fhandler_console::write (const void *vsrc, size_t len)
        srBottom - con.b.srWindow.Top + 1,
        y + 1 - con.b.srWindow.Top, x + 1);
       WriteConsoleA (get_output_handle (),
-     buf, strlen (buf), &n, 0);
+     buf, strlen (buf), 0, 0);
     }
   /* Substitute "CSI Ps T" */
   wpbuf.put ('[');
@@ -3064,7 +3060,7 @@ fhandler_console::write (const void *vsrc, size_t len)
  }
       else
  wpbuf.put (*src);
-      wpbuf.send (get_output_handle (), &n);
+      wpbuf.send (get_output_handle ());
       con.state = normal;
       wpbuf.empty();
     }
@@ -3080,8 +3076,7 @@ fhandler_console::write (const void *vsrc, size_t len)
  handled and just sent them. */
       wpbuf.put (*src);
       /* Just send the sequence */
-      DWORD n;
-      wpbuf.send (get_output_handle (), &n);
+      wpbuf.send (get_output_handle ());
       con.state = normal;
       wpbuf.empty();
     }
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] Collect handling of wpixput and wpbuf into a helper class.

Hans-Bernhard Bröker
In reply to this post by Hans-Bernhard Bröker
Replace direct access to a pair of co-dependent variables
by calls to methods of a class that encapsulates their relation.

Also replace C #define by C++ class constant.
---
 winsup/cygwin/fhandler_console.cc | 141 ++++++++++++++++--------------
 1 file changed, 76 insertions(+), 65 deletions(-)

diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index c5f269168..9d7a9e9ea 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -59,17 +59,28 @@ static struct fhandler_base::rabuf_t con_ra;
 
 /* Write pending buffer for ESC sequence handling
    in xterm compatible mode */
-#define WPBUF_LEN 256
-static unsigned char wpbuf[WPBUF_LEN];
-static int wpixput;
 static unsigned char last_char;
 
-static inline void
-wpbuf_put (unsigned char x)
+/* simple helper class to accumulate output in a buffer
+   and send that to the console on request: */
+static class write_pending_bufferOA
 {
-  if (wpixput < WPBUF_LEN)
-    wpbuf[wpixput++] = x;
-}
+private:
+  static const size_t WPBUF_LEN = 256u;
+  unsigned char buf[WPBUF_LEN];
+  size_t ixput;
+public:
+  inline void put (unsigned char x)
+  {
+    if (ixput < WPBUF_LEN)
+      buf[ixput++] = x;
+  }
+  inline void empty () { ixput = 0u; }
+  inline void send (HANDLE &handle, DWORD *wn = NULL)
+  {
+    WriteConsoleA (handle, buf, ixput, wn, 0);
+  }
+} wpbuf;
 
 static void
 beep ()
@@ -2030,10 +2041,10 @@ fhandler_console::char_command (char c)
   break;
 #endif
  case 'b': /* REP */
-  wpbuf_put (c);
+  wpbuf.put (c);
   if (wincap.has_con_esc_rep ())
     /* Just send the sequence */
-    WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+    wpbuf.send (get_output_handle (), &wn);
   else if (last_char && last_char != '\n')
     for (int i = 0; i < con.args[0]; i++)
       WriteConsoleA (get_output_handle (), &last_char, 1, &wn, 0);
@@ -2041,9 +2052,9 @@ fhandler_console::char_command (char c)
  case 'r': /* DECSTBM */
   con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0;
   con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1;
-  wpbuf_put (c);
+  wpbuf.put (c);
   /* Just send the sequence */
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+  wpbuf.send (get_output_handle (), &wn);
   break;
  case 'L': /* IL */
   if (wincap.has_con_broken_il_dl ())
@@ -2067,8 +2078,8 @@ fhandler_console::char_command (char c)
        y + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
       WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
-      wpbuf_put ('T');
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+      wpbuf.put ('T');
+      wpbuf.send (get_output_handle (), &wn);
       __small_sprintf (buf, "\033[%d;%dr",
        srTop + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
@@ -2079,9 +2090,9 @@ fhandler_console::char_command (char c)
     }
   else
     {
-      wpbuf_put (c);
+      wpbuf.put (c);
       /* Just send the sequence */
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+      wpbuf.send (get_output_handle (), &wn);
     }
   break;
  case 'M': /* DL */
@@ -2095,8 +2106,8 @@ fhandler_console::char_command (char c)
        y + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
       WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
-      wpbuf_put ('S');
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+      wpbuf.put ('S');
+      wpbuf.send (get_output_handle (), &wn);
       __small_sprintf (buf, "\033[%d;%dr",
        srTop + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
@@ -2107,13 +2118,13 @@ fhandler_console::char_command (char c)
     }
   else
     {
-      wpbuf_put (c);
+      wpbuf.put (c);
       /* Just send the sequence */
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+      wpbuf.send (get_output_handle (), &wn);
     }
   break;
  case 'J': /* ED */
-  wpbuf_put (c);
+  wpbuf.put (c);
   if (con.args[0] == 3 && wincap.has_con_broken_csi3j ())
     { /* Workaround for broken CSI3J in Win10 1809 */
       CONSOLE_SCREEN_BUFFER_INFO sbi;
@@ -2131,7 +2142,7 @@ fhandler_console::char_command (char c)
     }
   else
     /* Just send the sequence */
-    WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+    wpbuf.send (get_output_handle (), &wn);
   break;
  case 'h': /* DECSET */
  case 'l': /* DECRST */
@@ -2139,9 +2150,9 @@ fhandler_console::char_command (char c)
     con.screen_alternated = true;
   else
     con.screen_alternated = false;
-  wpbuf_put (c);
+  wpbuf.put (c);
   /* Just send the sequence */
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+  wpbuf.send (get_output_handle (), &wn);
   if (con.saw_question_mark)
     {
       bool need_fix_tab_position = false;
@@ -2159,15 +2170,15 @@ fhandler_console::char_command (char c)
       con.scroll_region.Top = 0;
       con.scroll_region.Bottom = -1;
     }
-  wpbuf_put (c);
+  wpbuf.put (c);
   /* Just send the sequence */
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+  wpbuf.send (get_output_handle (), &wn);
   break;
  default:
   /* Other escape sequences */
-  wpbuf_put (c);
+  wpbuf.put (c);
   /* Just send the sequence */
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &wn, 0);
+  wpbuf.send (get_output_handle (), &wn);
   break;
  }
       return;
@@ -2874,7 +2885,7 @@ do_print:
   break;
  case ESC:
   con.state = gotesc;
-  wpbuf_put (*found);
+  wpbuf.put (*found);
   break;
  case DWN:
   cursor_get (&x, &y);
@@ -2989,7 +3000,7 @@ fhandler_console::write (const void *vsrc, size_t len)
  case gotesc:
   if (*src == '[') /* CSI Control Sequence Introducer */
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.state = gotsquare;
       memset (con.args, 0, sizeof con.args);
       con.nargs = 0;
@@ -3005,13 +3016,13 @@ fhandler_console::write (const void *vsrc, size_t len)
   /* For xterm mode only */
   DWORD n;
   /* Just send the sequence */
-  wpbuf_put (*src);
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0);
+  wpbuf.put (*src);
+  wpbuf.send (get_output_handle (), &n);
  }
       else if (con.savex >= 0 && con.savey >= 0)
  cursor_set (false, con.savex, con.savey);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (*src == '7') /* DECSC Save cursor position */
     {
@@ -3020,13 +3031,13 @@ fhandler_console::write (const void *vsrc, size_t len)
   /* For xterm mode only */
   DWORD n;
   /* Just send the sequence */
-  wpbuf_put (*src);
-  WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0);
+  wpbuf.put (*src);
+  wpbuf.send (get_output_handle (), &n);
  }
       else
  cursor_get (&con.savex, &con.savey);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (wincap.has_con_24bit_colors () && !con_is_legacy
    && wincap.has_con_broken_il_dl () && *src == 'M')
@@ -3048,14 +3059,14 @@ fhandler_console::write (const void *vsrc, size_t len)
      buf, strlen (buf), &n, 0);
     }
   /* Substitute "CSI Ps T" */
-  wpbuf_put ('[');
-  wpbuf_put ('T');
+  wpbuf.put ('[');
+  wpbuf.put ('T');
  }
       else
- wpbuf_put (*src);
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0);
+ wpbuf.put (*src);
+      wpbuf.send (get_output_handle (), &n);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (wincap.has_con_24bit_colors () && !con_is_legacy)
     {
@@ -3067,28 +3078,28 @@ fhandler_console::write (const void *vsrc, size_t len)
       /* ESC sequences below (e.g. OSC, etc) are left to xterm
  emulation in xterm compatible mode, therefore, are not
  handled and just sent them. */
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       /* Just send the sequence */
       DWORD n;
-      WriteConsoleA (get_output_handle (), wpbuf, wpixput, &n, 0);
+      wpbuf.send (get_output_handle (), &n);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (*src == ']') /* OSC Operating System Command */
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.rarg = 0;
       con.my_title_buf[0] = '\0';
       con.state = gotrsquare;
     }
   else if (*src == '(') /* Designate G0 character set */
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.state = gotparen;
     }
   else if (*src == ')') /* Designate G1 character set */
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.state = gotrparen;
     }
   else if (*src == 'M') /* Reverse Index (scroll down) */
@@ -3096,7 +3107,7 @@ fhandler_console::write (const void *vsrc, size_t len)
       con.fillin (get_output_handle ());
       scroll_buffer_screen (0, 0, -1, -1, 0, 1);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (*src == 'c') /* RIS Full Reset */
     {
@@ -3107,17 +3118,17 @@ fhandler_console::write (const void *vsrc, size_t len)
       cursor_set (false, 0, 0);
       clear_screen (cl_buf_beg, cl_buf_beg, cl_buf_end, cl_buf_end);
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else if (*src == 'R') /* ? */
     {
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   else
     {
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   src++;
   break;
@@ -3126,19 +3137,19 @@ fhandler_console::write (const void *vsrc, size_t len)
     {
       if (con.nargs < MAXARGS)
  con.args[con.nargs] = con.args[con.nargs] * 10 + *src - '0';
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       src++;
     }
   else if (*src == ';')
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       src++;
       if (con.nargs < MAXARGS)
  con.nargs++;
     }
   else if (*src == ' ')
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       src++;
       con.saw_space = true;
       con.state = gotcommand;
@@ -3151,7 +3162,7 @@ fhandler_console::write (const void *vsrc, size_t len)
     con.nargs++;
   char_command (*src++);
   con.state = normal;
-  wpixput = 0;
+  wpbuf.empty();
   break;
  case gotrsquare:
   if (isdigit (*src))
@@ -3162,7 +3173,7 @@ fhandler_console::write (const void *vsrc, size_t len)
     con.state = eatpalette;
   else
     con.state = eattitle;
-  wpbuf_put (*src);
+  wpbuf.put (*src);
   src++;
   break;
  case eattitle:
@@ -3174,13 +3185,13 @@ fhandler_console::write (const void *vsrc, size_t len)
  if (*src == '\007' && con.state == gettitle)
   set_console_title (con.my_title_buf);
  con.state = normal;
- wpixput = 0;
+ wpbuf.empty();
       }
     else if (n < TITLESIZE)
       {
  con.my_title_buf[n++] = *src;
  con.my_title_buf[n] = '\0';
- wpbuf_put (*src);
+ wpbuf.put (*src);
       }
     src++;
     break;
@@ -3188,13 +3199,13 @@ fhandler_console::write (const void *vsrc, size_t len)
  case eatpalette:
   if (*src == '\033')
     {
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       con.state = endpalette;
     }
   else if (*src == '\a')
     {
       con.state = normal;
-      wpixput = 0;
+      wpbuf.empty();
     }
   src++;
   break;
@@ -3204,14 +3215,14 @@ fhandler_console::write (const void *vsrc, size_t len)
   else
     /* Sequence error (abort) */
     con.state = normal;
-  wpixput = 0;
+  wpbuf.empty();
   src++;
   break;
  case gotsquare:
   if (*src == ';')
     {
       con.state = gotarg1;
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       if (con.nargs < MAXARGS)
  con.nargs++;
       src++;
@@ -3226,7 +3237,7 @@ fhandler_console::write (const void *vsrc, size_t len)
  con.saw_greater_than_sign = true;
       else if (*src == '!')
  con.saw_exclamation_mark = true;
-      wpbuf_put (*src);
+      wpbuf.put (*src);
       /* ignore any extra chars between [ and first arg or command */
       src++;
     }
@@ -3239,7 +3250,7 @@ fhandler_console::write (const void *vsrc, size_t len)
   else
     con.vt100_graphics_mode_G0 = false;
   con.state = normal;
-  wpixput = 0;
+  wpbuf.empty();
   src++;
   break;
  case gotrparen: /* Designate G1 Character Set (ISO 2022) */
@@ -3248,7 +3259,7 @@ fhandler_console::write (const void *vsrc, size_t len)
   else
     con.vt100_graphics_mode_G1 = false;
   con.state = normal;
-  wpixput = 0;
+  wpbuf.empty();
   src++;
   break;
  }
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] Do not bother passing optional argument to WriteConsoleA.

Hans-Bernhard Bröker
In reply to this post by Hans-Bernhard Bröker
Passing a pointer to a local variable to WriteConsoleA is
not actually needed if we're not going to do anything with
what WriteConsoleA would put in there.

For the wpbuf class the pointer argument was made optional,
so it can be just left out; other call places now pass a
NULL pointer instead.  The local variables `wn' and `n'
are no unused, so they go away.
---
 winsup/cygwin/fhandler_console.cc | 51 ++++++++++++++-----------------
 1 file changed, 23 insertions(+), 28 deletions(-)

diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 9d7a9e9ea..1c376291f 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -2015,7 +2015,6 @@ fhandler_console::char_command (char c)
   if (wincap.has_con_24bit_colors () && !con_is_legacy)
     {
       /* For xterm compatible mode */
-      DWORD wn;
       switch (c)
  {
 #if 0 /* These sequences, which are supported by real xterm, are
@@ -2044,17 +2043,17 @@ fhandler_console::char_command (char c)
   wpbuf.put (c);
   if (wincap.has_con_esc_rep ())
     /* Just send the sequence */
-    wpbuf.send (get_output_handle (), &wn);
+    wpbuf.send (get_output_handle ());
   else if (last_char && last_char != '\n')
     for (int i = 0; i < con.args[0]; i++)
-      WriteConsoleA (get_output_handle (), &last_char, 1, &wn, 0);
+      WriteConsoleA (get_output_handle (), &last_char, 1, 0, 0);
   break;
  case 'r': /* DECSTBM */
   con.scroll_region.Top = con.args[0] ? con.args[0] - 1 : 0;
   con.scroll_region.Bottom = con.args[1] ? con.args[1] - 1 : -1;
   wpbuf.put (c);
   /* Just send the sequence */
-  wpbuf.send (get_output_handle (), &wn);
+  wpbuf.send (get_output_handle ());
   break;
  case 'L': /* IL */
   if (wincap.has_con_broken_il_dl ())
@@ -2072,27 +2071,27 @@ fhandler_console::char_command (char c)
    srBottom - (n-1) - con.b.srWindow.Top + 1,
    y + 1 - con.b.srWindow.Top, x + 1);
   WriteConsoleA (get_output_handle (),
- buf, strlen (buf), &wn, 0);
+ buf, strlen (buf), 0, 0);
  }
       __small_sprintf (buf, "\033[%d;%dr",
        y + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
       wpbuf.put ('T');
-      wpbuf.send (get_output_handle (), &wn);
+      wpbuf.send (get_output_handle ());
       __small_sprintf (buf, "\033[%d;%dr",
        srTop + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
       __small_sprintf (buf, "\033[%d;%dH",
        y + 1 - con.b.srWindow.Top, x + 1);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
     }
   else
     {
       wpbuf.put (c);
       /* Just send the sequence */
-      wpbuf.send (get_output_handle (), &wn);
+      wpbuf.send (get_output_handle ());
     }
   break;
  case 'M': /* DL */
@@ -2105,22 +2104,22 @@ fhandler_console::char_command (char c)
       __small_sprintf (buf, "\033[%d;%dr",
        y + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
       wpbuf.put ('S');
-      wpbuf.send (get_output_handle (), &wn);
+      wpbuf.send (get_output_handle ());
       __small_sprintf (buf, "\033[%d;%dr",
        srTop + 1 - con.b.srWindow.Top,
        srBottom + 1 - con.b.srWindow.Top);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
       __small_sprintf (buf, "\033[%d;%dH",
        y + 1 - con.b.srWindow.Top, x + 1);
-      WriteConsoleA (get_output_handle (), buf, strlen (buf), &wn, 0);
+      WriteConsoleA (get_output_handle (), buf, strlen (buf), 0, 0);
     }
   else
     {
       wpbuf.put (c);
       /* Just send the sequence */
-      wpbuf.send (get_output_handle (), &wn);
+      wpbuf.send (get_output_handle ());
     }
   break;
  case 'J': /* ED */
@@ -2142,7 +2141,7 @@ fhandler_console::char_command (char c)
     }
   else
     /* Just send the sequence */
-    wpbuf.send (get_output_handle (), &wn);
+    wpbuf.send (get_output_handle ());
   break;
  case 'h': /* DECSET */
  case 'l': /* DECRST */
@@ -2152,7 +2151,7 @@ fhandler_console::char_command (char c)
     con.screen_alternated = false;
   wpbuf.put (c);
   /* Just send the sequence */
-  wpbuf.send (get_output_handle (), &wn);
+  wpbuf.send (get_output_handle ());
   if (con.saw_question_mark)
     {
       bool need_fix_tab_position = false;
@@ -2172,13 +2171,13 @@ fhandler_console::char_command (char c)
     }
   wpbuf.put (c);
   /* Just send the sequence */
-  wpbuf.send (get_output_handle (), &wn);
+  wpbuf.send (get_output_handle ());
   break;
  default:
   /* Other escape sequences */
   wpbuf.put (c);
   /* Just send the sequence */
-  wpbuf.send (get_output_handle (), &wn);
+  wpbuf.send (get_output_handle ());
   break;
  }
       return;
@@ -3014,10 +3013,9 @@ fhandler_console::write (const void *vsrc, size_t len)
       if (con.screen_alternated)
  {
   /* For xterm mode only */
-  DWORD n;
   /* Just send the sequence */
   wpbuf.put (*src);
-  wpbuf.send (get_output_handle (), &n);
+  wpbuf.send (get_output_handle ());
  }
       else if (con.savex >= 0 && con.savey >= 0)
  cursor_set (false, con.savex, con.savey);
@@ -3029,10 +3027,9 @@ fhandler_console::write (const void *vsrc, size_t len)
       if (con.screen_alternated)
  {
   /* For xterm mode only */
-  DWORD n;
   /* Just send the sequence */
   wpbuf.put (*src);
-  wpbuf.send (get_output_handle (), &n);
+  wpbuf.send (get_output_handle ());
  }
       else
  cursor_get (&con.savex, &con.savey);
@@ -3043,7 +3040,6 @@ fhandler_console::write (const void *vsrc, size_t len)
    && wincap.has_con_broken_il_dl () && *src == 'M')
     { /* Reverse Index (scroll down) */
       int x, y;
-      DWORD n;
       cursor_get (&x, &y);
       if (y == srTop)
  {
@@ -3056,7 +3052,7 @@ fhandler_console::write (const void *vsrc, size_t len)
        srBottom - con.b.srWindow.Top + 1,
        y + 1 - con.b.srWindow.Top, x + 1);
       WriteConsoleA (get_output_handle (),
-     buf, strlen (buf), &n, 0);
+     buf, strlen (buf), 0, 0);
     }
   /* Substitute "CSI Ps T" */
   wpbuf.put ('[');
@@ -3064,7 +3060,7 @@ fhandler_console::write (const void *vsrc, size_t len)
  }
       else
  wpbuf.put (*src);
-      wpbuf.send (get_output_handle (), &n);
+      wpbuf.send (get_output_handle ());
       con.state = normal;
       wpbuf.empty();
     }
@@ -3080,8 +3076,7 @@ fhandler_console::write (const void *vsrc, size_t len)
  handled and just sent them. */
       wpbuf.put (*src);
       /* Just send the sequence */
-      DWORD n;
-      wpbuf.send (get_output_handle (), &n);
+      wpbuf.send (get_output_handle ());
       con.state = normal;
       wpbuf.empty();
     }
--
2.21.0

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 0/2] wpbuf class-ification

Corinna Vinschen-2
In reply to this post by Hans-Bernhard Bröker
On Mar  8 21:41, Hans-Bernhard Broeker wrote:

> Second shot at wpbuf class-ification.  Also no longer
> request data from WriteConsoleA that is not used for anything.
>
> Hans-Bernhard Broeker (2):
>   Collect handling of wpixput and wpbuf into a helper class.
>   Do not bother passing optional argument to WriteConsoleA.
>
>  winsup/cygwin/fhandler_console.cc | 164 ++++++++++++++++--------------
>  1 file changed, 85 insertions(+), 79 deletions(-)
>
> --
> 2.21.0
Pushed.


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Maintainer

signature.asc (849 bytes) Download Attachment