diff -urN rxvt-unicode-9.31-orig/configure rxvt-unicode-9.31/configure
--- rxvt-unicode-9.31-orig/configure	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/configure	2023-04-22 08:00:53 +0900
@@ -4821,6 +4821,7 @@
     #    -Wunused-variable: for autogenerated rxvtperl code
     for warning in \
       -Wall \
+      -Wshadow \
       -Wno-reorder \
       -Wno-unused-result \
       -Wno-unused-value \
diff -urN rxvt-unicode-9.31-orig/configure.ac rxvt-unicode-9.31/configure.ac
--- rxvt-unicode-9.31-orig/configure.ac	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/configure.ac	2023-04-22 08:00:50 +0900
@@ -71,6 +71,7 @@
     #    -Wunused-variable: for autogenerated rxvtperl code
     for warning in \
       -Wall \
+      -Wshadow \
       -Wno-reorder \
       -Wno-unused-result \
       -Wno-unused-value \
diff -urN rxvt-unicode-9.31-orig/libev/ev++.h rxvt-unicode-9.31/libev/ev++.h
--- rxvt-unicode-9.31-orig/libev/ev++.h	2020-03-09 00:55:17 +0900
+++ rxvt-unicode-9.31/libev/ev++.h	2023-04-22 08:45:43 +0900
@@ -457,10 +457,10 @@
       ev_init (this, 0);
     }
 
-    void set_ (const void *data, void (*cb)(EV_P_ ev_watcher *w, int revents)) EV_NOEXCEPT
+    void set_ (const void *data_, void (*cb_)(EV_P_ ev_watcher *w, int revents)) EV_NOEXCEPT
     {
-      this->data = (void *)data;
-      ev_set_cb (static_cast<ev_watcher *>(this), cb);
+      this->data = (void *)data_;
+      ev_set_cb (static_cast<ev_watcher *>(this), cb_);
     }
 
     // function callback
@@ -630,35 +630,35 @@
   };
 
   EV_BEGIN_WATCHER (io, io)
-    void set (int fd, int events) EV_NOEXCEPT
+    void set (int fd_, int events_) EV_NOEXCEPT
     {
       freeze_guard freeze (this);
-      ev_io_set (static_cast<ev_io *>(this), fd, events);
+      ev_io_set (static_cast<ev_io *>(this), fd_, events_);
     }
 
-    void set (int events) EV_NOEXCEPT
+    void set (int events_) EV_NOEXCEPT
     {
       freeze_guard freeze (this);
-      ev_io_modify (static_cast<ev_io *>(this), events);
+      ev_io_modify (static_cast<ev_io *>(this), events_);
     }
 
-    void start (int fd, int events) EV_NOEXCEPT
+    void start (int fd_, int events_) EV_NOEXCEPT
     {
-      set (fd, events);
+      set (fd_, events_);
       start ();
     }
   EV_END_WATCHER (io, io)
 
   EV_BEGIN_WATCHER (timer, timer)
-    void set (ev_tstamp after, ev_tstamp repeat = 0.) EV_NOEXCEPT
+    void set (ev_tstamp after, ev_tstamp repeat_ = 0.) EV_NOEXCEPT
     {
       freeze_guard freeze (this);
-      ev_timer_set (static_cast<ev_timer *>(this), after, repeat);
+      ev_timer_set (static_cast<ev_timer *>(this), after, repeat_);
     }
 
-    void start (ev_tstamp after, ev_tstamp repeat = 0.) EV_NOEXCEPT
+    void start (ev_tstamp after, ev_tstamp repeat_ = 0.) EV_NOEXCEPT
     {
-      set (after, repeat);
+      set (after, repeat_);
       start ();
     }
 
@@ -696,15 +696,15 @@
 
   #if EV_SIGNAL_ENABLE
   EV_BEGIN_WATCHER (sig, signal)
-    void set (int signum) EV_NOEXCEPT
+    void set (int signum_) EV_NOEXCEPT
     {
       freeze_guard freeze (this);
-      ev_signal_set (static_cast<ev_signal *>(this), signum);
+      ev_signal_set (static_cast<ev_signal *>(this), signum_);
     }
 
-    void start (int signum) EV_NOEXCEPT
+    void start (int signum_) EV_NOEXCEPT
     {
-      set (signum);
+      set (signum_);
       start ();
     }
   EV_END_WATCHER (sig, signal)
@@ -712,15 +712,15 @@
 
   #if EV_CHILD_ENABLE
   EV_BEGIN_WATCHER (child, child)
-    void set (int pid, int trace = 0) EV_NOEXCEPT
+    void set (int pid_, int trace = 0) EV_NOEXCEPT
     {
       freeze_guard freeze (this);
-      ev_child_set (static_cast<ev_child *>(this), pid, trace);
+      ev_child_set (static_cast<ev_child *>(this), pid_, trace);
     }
 
-    void start (int pid, int trace = 0) EV_NOEXCEPT
+    void start (int pid_, int trace = 0) EV_NOEXCEPT
     {
-      set (pid, trace);
+      set (pid_, trace);
       start ();
     }
   EV_END_WATCHER (child, child)
diff -urN rxvt-unicode-9.31-orig/libev/ev.c rxvt-unicode-9.31/libev/ev.c
--- rxvt-unicode-9.31-orig/libev/ev.c	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/libev/ev.c	2023-04-22 09:16:25 +0900
@@ -1461,10 +1461,10 @@
       else
         {
           /* subnormal, renormalise */
-          unsigned int s = 10 - ecb_ld32 (m);
+          unsigned int s2 = 10 - ecb_ld32 (m);
 
-          m = (m << s) & 0x3ff; /* mask implicit bit */
-          e -= s - 1;
+          m = (m << s2) & 0x3ff; /* mask implicit bit */
+          e -= s2 - 1;
         }
     }
 
diff -urN rxvt-unicode-9.31-orig/src/command.C rxvt-unicode-9.31/src/command.C
--- rxvt-unicode-9.31-orig/src/command.C	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/command.C	2023-04-22 08:20:12 +0900
@@ -199,46 +199,46 @@
            r & RS_Uline   ? " uline"   : "",
            r & RS_Careful ? " careful" : "");
 
-  int width = 0;
+  int overlay_width = 0;
   fname = rxvt_temp_buf<wchar_t *> (len);
   for (int i = 0; i < len; i++)
     {
       rxvt_font *f = (*fs)[fs->find_font_idx (chr[i])];
       fname[i] = rxvt_utf8towcs (f->name);
-      max_it (width, wcswidth (fname[i], wcslen (fname[i])));
+      max_it (overlay_width, wcswidth (fname[i], wcslen (fname[i])));
     }
 
-  max_it (width, strlen (attr));
+  max_it (overlay_width, strlen (attr));
 
   if (y >= 0)
     {
-      y = (y >= nrow - len - 5 && x < width + 2) ? 0 : -1;
+      y = (y >= nrow - len - 5 && x < overlay_width + 2) ? 0 : -1;
       x = 0;
     }
 
-  scr_overlay_new (x, y, width, len * 2 + 2);
+  scr_overlay_new (x, y, overlay_width, len * 2 + 2);
 
   scr_overlay_set (0, 0, rowcol);
 
   r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r));
 
-  for (int y = 0; y < len; y++)
+  for (int line = 0; line < len; line++)
     {
       char buf[9];
 
       ch = *chr++;
 
       sprintf (buf, "%8x", ch);
-      scr_overlay_set (0, y + 1, buf);
-      scr_overlay_set (9, y + 1, '=');
+      scr_overlay_set (0, line + 1, buf);
+      scr_overlay_set (9, line + 1, '=');
 # if !UNICODE_3
       if (ch >= 0x10000)
         ch = 0xfffd;
 # endif
-      scr_overlay_set (11, y + 1, ch, r);
+      scr_overlay_set (11, line + 1, ch, r);
 
       if (WCWIDTH (ch) >= 2)
-        scr_overlay_set (12, y + 1, NOCHAR, r);
+        scr_overlay_set (12, line + 1, NOCHAR, r);
     }
 
 //  {
@@ -1378,8 +1378,6 @@
 {
   make_current ();
 
-  dLocal (Display *, dpy);
-
   if (ev.xany.window == vt
       && SHOULD_INVOKE (HOOK_X_EVENT)
       && HOOK_INVOKE ((this, HOOK_X_EVENT, DT_XEVENT, &ev, DT_END)))
@@ -3126,8 +3124,6 @@
   XWindowAttributes wattr;
   Window wdummy;
 
-  dLocal (Display *, dpy);
-
   if (nargs == 0)
     return;
 
@@ -3445,8 +3441,6 @@
   bool query = str[0] == '?' && !str[1];
   int saveop = op;
 
-  dLocal (Display *, dpy);
-
   assert (str != NULL);
 
   if (HOOK_INVOKE ((this, HOOK_OSC_SEQ, DT_INT, op, DT_STR, str, DT_END)))
@@ -3472,7 +3466,7 @@
             unsigned long nitems;
             unsigned long bytes_after;
             unsigned char *value = 0;
-            const char *str = "";
+            const char *s = "";
 
             if (prop
                 && XGetWindowProperty (dpy, parent,
@@ -3481,9 +3475,9 @@
                                        &nitems, &bytes_after, &value) == Success
                 && actual_type != None
                 && actual_format == 8)
-              str = (const char *)(value);
+              s = (const char *)(value);
 
-            tt_printf ("\033]%d;%s%c", op, option (Opt_insecure) ? str : "", resp);
+            tt_printf ("\033]%d;%s%c", op, option (Opt_insecure) ? s : "", resp);
 
             XFree (value);
           }
diff -urN rxvt-unicode-9.31-orig/src/ecb.h rxvt-unicode-9.31/src/ecb.h
--- rxvt-unicode-9.31-orig/src/ecb.h	2021-06-22 22:26:46 +0900
+++ rxvt-unicode-9.31/src/ecb.h	2023-04-22 08:05:01 +0900
@@ -870,10 +870,10 @@
       else
         {
           /* subnormal, renormalise */
-          unsigned int s = 10 - ecb_ld32 (m);
+          unsigned int s2 = 10 - ecb_ld32 (m);
 
-          m = (m << s) & 0x3ff; /* mask implicit bit */
-          e -= s - 1;
+          m = (m << s2) & 0x3ff; /* mask implicit bit */
+          e -= s2 - 1;
         }
     }
 
diff -urN rxvt-unicode-9.31-orig/src/init.C rxvt-unicode-9.31/src/init.C
--- rxvt-unicode-9.31-orig/src/init.C	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/init.C	2023-04-22 08:41:07 +0900
@@ -612,7 +612,6 @@
 const char **
 rxvt_term::init_resources (int argc, const char *const *argv)
 {
-  int i;
   const char **cmd_argv;
 
   rs[Rs_name] = rxvt_basename (argv[0]);
@@ -684,6 +683,7 @@
         rs[Rs_iconName] = rs[Rs_name];
     }
 
+  int i;
   if (rs[Rs_saveLines] && (i = atoi (rs[Rs_saveLines])) >= 0)
     saveLines = min (i, MAX_SAVELINES);
 
@@ -806,12 +806,12 @@
   argv->push_back (0);
   envv->push_back (0);
 
-  this->argv = argv;
-  this->envv = envv;
+  term_argv = argv;
+  term_envv = envv;
 
-  env = new char *[this->envv->size ()];
-  for (unsigned int i = 0; i < this->envv->size (); i++)
-    env[i] = this->envv->at (i);
+  env = new char *[envv->size ()];
+  for (unsigned int i = 0; i < envv->size (); i++)
+    env[i] = envv->at (i);
 
   init2 (argv->size () - 1, argv->begin ());
 }
@@ -1028,29 +1028,29 @@
 
 /*----------------------------------------------------------------------*/
 void
-rxvt_term::set_locale (const char *locale)
+rxvt_term::set_locale (const char *new_locale)
 {
   set_environ (env);
 
-  free (this->locale);
-  this->locale = setlocale (LC_CTYPE, locale);
+  free (locale);
+  locale = setlocale (LC_CTYPE, new_locale);
 
-  if (!this->locale)
+  if (!locale)
     {
-      if (*locale)
+      if (*new_locale)
         {
-          rxvt_warn ("unable to set locale \"%s\", using C locale instead.\n", locale);
+          rxvt_warn ("unable to set locale \"%s\", using C locale instead.\n", new_locale);
           setlocale (LC_CTYPE, "C");
         }
       else
         rxvt_warn ("default locale unavailable, check LC_* and LANG variables. Continuing.\n");
 
-      this->locale = (char *)"C"; /* strdup'ed below */
+      locale = (char *)"C"; /* strdup'ed below */
     }
 
 
-  this->locale = strdup (this->locale);
-  SET_LOCALE (this->locale);
+  locale = strdup (new_locale);
+  SET_LOCALE (locale);
   mbstate.reset ();
 
 #if HAVE_NL_LANGINFO
@@ -1351,9 +1351,7 @@
 #endif
   XGCValues gcvalue;
   XSetWindowAttributes attributes;
-  Window top, parent;
-
-  dLocal (Display *, dpy);
+  Window topwin, parentwin;
 
   /* grab colors before netscape does */
   get_colors ();
@@ -1361,7 +1359,7 @@
   if (!set_fonts ())
     rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n");
 
-  parent = display->root;
+  parentwin = display->root;
 
   attributes.override_redirect = !!option (Opt_override_redirect);
 
@@ -1385,9 +1383,9 @@
     {
       XWindowAttributes wattr;
 
-      parent = strtol (rs[Rs_embed], 0, 0);
+      parentwin = strtol (rs[Rs_embed], 0, 0);
 
-      if (!XGetWindowAttributes (dpy, parent, &wattr))
+      if (!XGetWindowAttributes (dpy, parentwin, &wattr))
         rxvt_fatal ("invalid window-id specified with -embed, aborting.\n");
 
       window_calc (wattr.width, wattr.height);
@@ -1401,15 +1399,15 @@
   attributes.border_pixel     = pix_colors_focused [Color_border];
   attributes.colormap         = cmap;
 
-  top = XCreateWindow (dpy, parent,
-                       szHint.x, szHint.y,
-                       szHint.width, szHint.height,
-                       ext_bwidth,
-                       depth, InputOutput, visual,
-                       CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect,
-                       &attributes);
+  topwin = XCreateWindow (dpy, parentwin,
+                          szHint.x, szHint.y,
+                          szHint.width, szHint.height,
+                          ext_bwidth,
+                          depth, InputOutput, visual,
+                          CWColormap | CWBackPixel | CWBorderPixel | CWOverrideRedirect,
+                          &attributes);
 
-  this->parent = top;
+  this->parent = topwin;
 
   set_title     (rs [Rs_title]);
   set_icon_name (rs [Rs_iconName]);
@@ -1422,9 +1420,9 @@
   wmHint.initial_state = option (Opt_iconic) ? IconicState
                          : option (Opt_dockapp) ? WithdrawnState
                          : NormalState;
-  wmHint.window_group  = top;
+  wmHint.window_group  = topwin;
 
-  XmbSetWMProperties (dpy, top, NULL, NULL, (char **)argv, argc,
+  XmbSetWMProperties (dpy, topwin, NULL, NULL, (char **)argv, argc,
                       &szHint, &wmHint, &classHint);
 #if ENABLE_EWMH
   /*
@@ -1438,7 +1436,7 @@
 
 #if ENABLE_FRILLS
   if (mwmhints.flags)
-    XChangeProperty (dpy, top, xa[XA_MOTIF_WM_HINTS], xa[XA_MOTIF_WM_HINTS], 32,
+    XChangeProperty (dpy, topwin, xa[XA_MOTIF_WM_HINTS], xa[XA_MOTIF_WM_HINTS], 32,
                      PropModeReplace, (unsigned char *)&mwmhints, PROP_MWM_HINTS_ELEMENTS);
 #endif
 
@@ -1449,24 +1447,24 @@
 #endif
   };
 
-  XSetWMProtocols (dpy, top, protocols, ecb_array_length (protocols));
+  XSetWMProtocols (dpy, topwin, protocols, ecb_array_length (protocols));
 
 #if ENABLE_FRILLS
   if (rs[Rs_transient_for])
-    XSetTransientForHint (dpy, top, (Window)strtol (rs[Rs_transient_for], 0, 0));
+    XSetTransientForHint (dpy, topwin, (Window)strtol (rs[Rs_transient_for], 0, 0));
 #endif
 
 #if ENABLE_EWMH
   long pid = getpid ();
 
-  XChangeProperty (dpy, top,
+  XChangeProperty (dpy, topwin,
                    xa[XA_NET_WM_PID], XA_CARDINAL, 32,
                    PropModeReplace, (unsigned char *)&pid, 1);
 
   // _NET_WM_WINDOW_TYPE is NORMAL, which is the default
 #endif
 
-  XSelectInput (dpy, top,
+  XSelectInput (dpy, topwin,
                 KeyPressMask
 #if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ENABLE_FRILLS || ISO_14755
                 | KeyReleaseMask
@@ -1474,7 +1472,7 @@
                 | FocusChangeMask | VisibilityChangeMask
                 | ExposureMask | StructureNotifyMask);
 
-  termwin_ev.start (display, top);
+  termwin_ev.start (display, topwin);
 
   /* vt cursor: Black-on-White is standard, but this is more popular */
   unsigned int shape = XC_xterm;
@@ -1491,7 +1489,7 @@
   TermWin_cursor = XCreateFontCursor (dpy, shape);
 
   /* the vt window */
-  vt = XCreateSimpleWindow (dpy, top,
+  vt = XCreateSimpleWindow (dpy, topwin,
                             window_vt_x, window_vt_y,
                             vt_width, vt_height,
                             0,
diff -urN rxvt-unicode-9.31-orig/src/main.C rxvt-unicode-9.31/src/main.C
--- rxvt-unicode-9.31-orig/src/main.C	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/main.C	2023-04-22 08:44:02 +0900
@@ -277,13 +277,13 @@
 
   delete selection_req;
 
-  if (env && memcmp (env, envv->begin (), envv->size () * sizeof (char *)))
+  if (env && memcmp (env, term_envv->begin (), term_envv->size () * sizeof (char *)))
     rxvt_warn ("env has been modified, probably as a result of a lib calling setenv.\n");
 
   delete [] env;
 
-  delete envv;
-  delete argv;
+  delete term_envv;
+  delete term_argv;
 
 #ifdef KEYSYM_RESOURCE
   delete keyboard;
@@ -1263,7 +1263,7 @@
 void
 rxvt_term::im_send_spot ()
 {
-  XPoint nspot;
+  XPoint spot;
   XVaNestedList preedit_attr;
 
   if (!Input_Context
@@ -1271,12 +1271,12 @@
       || !(input_style & (XIMPreeditPosition | XIMPreeditCallbacks)))
     return;
 
-  im_set_position (nspot);
+  im_set_position (spot);
 
-  if (nspot.x == spot.x && nspot.y == spot.y)
+  if (spot.x == last_spot.x && spot.y == last_spot.y)
     return;
 
-  spot = nspot;
+  last_spot = spot;
 
   preedit_attr = XVaCreateNestedList (0, XNSpotLocation, &spot, NULL);
   XSetICValues (Input_Context, XNPreeditAttributes, preedit_attr, NULL);
diff -urN rxvt-unicode-9.31-orig/src/rxvt.h rxvt-unicode-9.31/src/rxvt.h
--- rxvt-unicode-9.31-orig/src/rxvt.h	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/rxvt.h	2023-04-22 09:22:25 +0900
@@ -650,9 +650,6 @@
  *****************************************************************************
  */
 
-// speed hack, copy some member variable into a local variable of the same name
-#define dLocal(type,name)       type const name = this->name
-
 // for speed reasons, we assume that all codepoints 32 to 126 are
 // single-width.
 #define WCWIDTH(c)		(IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c))
@@ -806,8 +803,8 @@
   // this just extends beyond the BMP.
   unicode_t c1, c2;
 
-  compose_char (unicode_t c1, unicode_t c2)
-  : c1(c1), c2(c2)
+  compose_char (unicode_t c1_, unicode_t c2_)
+  : c1(c1_), c2(c2_)
   { }
 };
 
@@ -904,7 +901,7 @@
 /* ------------------------------------------------------------------------- */
 struct overlay_base
 {
-  int x, y, w, h; // overlay dimensions
+  int base_x, base_y, width, height; // overlay dimensions
   text_t **text;
   rend_t **rend;
 
@@ -1209,9 +1206,9 @@
 
   char           *locale;
   char            charsets[4];
-  char           *v_buffer;           /* pointer to physical buffer */
-  unsigned int    v_buflen;           /* size of area to write */
-  stringvec      *argv, *envv;        /* if != 0, will be freed at destroy time */
+  char           *v_buffer;              /* pointer to physical buffer */
+  unsigned int    v_buflen;              /* size of area to write */
+  stringvec      *term_argv, *term_envv; /* if != 0, will be freed at destroy time */
   char           **env;
 
 #ifdef KEYSYM_RESOURCE
@@ -1320,7 +1317,7 @@
   rxvt_xim *input_method;
   XIC      Input_Context;
   XIMStyle input_style;
-  XPoint   spot; // most recently sent spot position
+  XPoint   last_spot; // most recently sent spot position
 
   void im_destroy ();
   void im_cb (); im_watcher im_ev;
@@ -1456,7 +1453,7 @@
   void tt_paste (char *data, unsigned int len) noexcept;
   void paste (char *data, unsigned int len) noexcept;
   void scr_alloc () noexcept;
-  void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const noexcept;
+  void scr_blank_line (line_t &l, unsigned int col, unsigned int blank_width, rend_t efs) const noexcept;
   void scr_blank_screen_mem (line_t &l, rend_t efs) const noexcept;
   void scr_kill_char (line_t &l, int col) const noexcept;
   void scr_set_char_rend (line_t &l, int col, rend_t rend);
diff -urN rxvt-unicode-9.31-orig/src/rxvtd.C rxvt-unicode-9.31/src/rxvtd.C
--- rxvt-unicode-9.31-orig/src/rxvtd.C	2021-07-24 05:57:20 +0900
+++ rxvt-unicode-9.31/src/rxvtd.C	2023-04-22 09:30:33 +0900
@@ -57,13 +57,13 @@
   void log_msg (const char *msg);
   int getfd (int remote_fd);
 
-  server (int fd)
+  server (int fd_)
   {
     read_ev.set <server, &server::read_cb> (this);
     log_cb.set  <server, &server::log_msg> (this);
     getfd_cb.set<server, &server::getfd>   (this);
 
-    this->fd = fd;
+    fd = fd_;
     fcntl (fd, F_SETFD, FD_CLOEXEC);
     fcntl (fd, F_SETFL, 0);
     read_ev.start (fd, ev::READ);
@@ -82,7 +82,7 @@
   static int open (const char *sockname);
 };
 
-unix_listener::unix_listener (int fd) : fd (fd)
+unix_listener::unix_listener (int fd_) : fd (fd_)
 {
   accept_ev.set<unix_listener, &unix_listener::accept_cb> (this);
   fcntl (fd, F_SETFD, FD_CLOEXEC);
diff -urN rxvt-unicode-9.31-orig/src/rxvtfont.C rxvt-unicode-9.31/src/rxvtfont.C
--- rxvt-unicode-9.31-orig/src/rxvtfont.C	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/rxvtfont.C	2023-04-22 08:33:16 +0900
@@ -270,10 +270,9 @@
 {
   struct rxvt_fontset *fs;
 
-  rxvt_font_default (rxvt_fontset *fs)
-  : rxvt_font ()
+  rxvt_font_default (rxvt_fontset *fs_)
+  : rxvt_font (), fs (fs_)
   {
-    this->fs = fs;
   }
 
   rxvt_fontprop properties ()
@@ -358,16 +357,16 @@
 #if ENABLE_COMBINING
       compose_char *cc;
 #endif
-      int width = text - tp;
-      int fwidth = term->fwidth * width;
+      int cwidth = text - tp;
+      int fwidth = term->fwidth * cwidth;
 
 #ifdef BUILTIN_GLYPHS
       if (0x2500 <= t && t <= 0x259f)
         {
 # include "table/linedraw.h"
           uint16_t offs = linedraw_offs[t - 0x2500];
-          uint32_t *a = linedraw_command + (offs >> 4);
-          uint32_t *b = a + (offs & 15);
+          uint32_t *clist = linedraw_command + (offs >> 4);
+          uint32_t *clist_top = clist + (offs & 15);
 
           int W = fwidth;
           int H = term->fheight;
@@ -390,9 +389,9 @@
           gcv.line_width = 0;
           XChangeGC (disp, gc, GCLineWidth | GCCapStyle, &gcv);
 
-          while (a < b)
+          while (clist < clist_top)
             {
-              uint32_t command = *a++;
+              uint32_t command = *clist++;
 
               int op = (command >> 24) & 255;
               int a  = (command >> 20) & 15;
@@ -448,13 +447,13 @@
 #if ENABLE_COMBINING
       else if (IS_COMPOSE (t) && (cc = rxvt_composite[t]))
         {
-          min_it (width, 2); // we only support wcwidth up to 2
+          min_it (cwidth, 2); // we only support wcwidth up to 2
           text_t chrs[2];
           chrs [1] = NOCHAR;
 
           *chrs = cc->c1;
           rxvt_font *f1 = (*fs)[fs->find_font_idx (cc->c1)];
-          f1->draw (d, x, y, chrs, width, fg, bg);
+          f1->draw (d, x, y, chrs, cwidth, fg, bg);
 
           if (cc->c2 != NOCHAR)
             {
@@ -466,7 +465,7 @@
                                 ? f1
                                 : (*fs)[fs->find_font_idx (cc->c2)];
 
-              f2->draw (d, x, y, chrs, width, fg, Color_none);
+              f2->draw (d, x, y, chrs, cwidth, fg, Color_none);
             }
         }
 #endif
@@ -500,10 +499,9 @@
 {
   struct rxvt_fontset *fs;
 
-  rxvt_font_overflow (rxvt_fontset *fs)
-  : rxvt_font ()
+  rxvt_font_overflow (rxvt_fontset *fs_)
+  : rxvt_font (), fs (fs_)
   {
-    this->fs = fs;
   }
 
   rxvt_fontprop properties ()
@@ -574,18 +572,18 @@
   XFontStruct *f;
   bool enc2b, encm;
 
-  char *get_property (XFontStruct *f, Atom property, const char *repl) const;
+  char *get_property (XFontStruct *f_, Atom property, const char *repl) const;
   bool set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth);
   bool set_properties (rxvt_fontprop &p, XFontStruct *f);
   bool set_properties (rxvt_fontprop &p, const char *name);
 };
 
 char *
-rxvt_font_x11::get_property (XFontStruct *f, Atom property, const char *repl) const
+rxvt_font_x11::get_property (XFontStruct *f_, Atom property, const char *repl) const
 {
   unsigned long value;
 
-  if (XGetFontProperty (f, property, &value))
+  if (XGetFontProperty (f_, property, &value))
     return XGetAtomName (term->dpy, value);
   else
     return repl ? strdup (repl) : 0;
@@ -600,12 +598,12 @@
 }
 
 bool
-rxvt_font_x11::set_properties (rxvt_fontprop &p, int height, const char *weight, const char *slant, int avgwidth)
+rxvt_font_x11::set_properties (rxvt_fontprop &p, int height_, const char *weight, const char *slant, int avgwidth)
 {
   p.width  = width != rxvt_fontprop::unset ? width
            : avgwidth                      ? (avgwidth + 1) / 10
-                                           : (height + 1) / 2;
-  p.height = height;
+                                           : (height_ + 1) / 2;
+  p.height = height_;
   p.ascent = rxvt_fontprop::unset;
   p.weight = *weight == 'B' || *weight == 'b' ? rxvt_fontprop::bold : rxvt_fontprop::medium;
   p.slant  = *slant == 'r' || *slant == 'R' ? rxvt_fontprop::roman : rxvt_fontprop::italic;
@@ -614,42 +612,42 @@
 }
 
 bool
-rxvt_font_x11::set_properties (rxvt_fontprop &p, XFontStruct *f)
+rxvt_font_x11::set_properties (rxvt_fontprop &p, XFontStruct *f_)
 {
-  unsigned long height;
+  unsigned long height_;
 
 #if 0
-  if (!XGetFontProperty (f, XInternAtom (term->dpy, "PIXEL_SIZE", 0), &height))
+  if (!XGetFontProperty (f_, XInternAtom (term->dpy, "PIXEL_SIZE", 0), &height_))
     return false;
 #else
-  height = f->ascent + f->descent;
+  height_ = f_->ascent + f_->descent;
 #endif
 
   unsigned long avgwidth;
-  if (!XGetFontProperty (f, term->xa [XA_AVERAGE_WIDTH], &avgwidth))
+  if (!XGetFontProperty (f_, term->xa [XA_AVERAGE_WIDTH], &avgwidth))
     avgwidth = 0;
 
-  char *weight = get_property (f, term->xa [XA_WEIGHT_NAME], "medium");
-  char *slant  = get_property (f, term->xa [XA_SLANT], "r");
+  char *weight = get_property (f_, term->xa [XA_WEIGHT_NAME], "medium");
+  char *slant  = get_property (f_, term->xa [XA_SLANT], "r");
 
-  set_properties (p, height, weight, slant, avgwidth);
+  set_properties (p, height_, weight, slant, avgwidth);
 
   free (weight);
   free (slant);
 
-  p.ascent = f->ascent;
+  p.ascent = f_->ascent;
 
   return true;
 }
 
 bool
-rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name)
+rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name_)
 {
   dTermDisplay;
   int slashes = 0;
   const char *comp[13];
 
-  for (const char *c = name; *c; c++)
+  for (const char *c = name_; *c; c++)
     if (*c == '-')
       {
         comp[slashes++] = c + 1;
@@ -663,15 +661,15 @@
       && (*comp[11] >= '0' && *comp[11] <= '9'))
     return set_properties (p, atoi (comp[6]), comp[2], comp[3], atoi (comp[11]));
 
-  XFontStruct *f = XLoadQueryFont (disp, name);
+  XFontStruct *f_ = XLoadQueryFont (disp, name_);
 
-  if (f)
+  if (f_)
     {
       // the font should really exist now. if not, we have a problem
       // (e.g. if the user did xset fp rehash just when we were searching fonts).
       // in that case, just return garbage.
-      bool ret = set_properties (p, f);
-      XFreeFont (disp, f);
+      bool ret = set_properties (p, f_);
+      XFreeFont (disp, f_);
       return ret;
     }
   else
@@ -889,9 +887,9 @@
       if (!charset)
         charset = name;
 
-      int count = 13;
+      int hyphen = 13;
       while (*charset)
-        if (*charset++ == '-' && !--count)
+        if (*charset++ == '-' && !--hyphen)
           break;
 
       cs = codeset_from_name (charset);
@@ -1059,10 +1057,10 @@
   dTermDisplay;
   dTermGC;
 
-  bool slow = this->slow
-              || width  != term->fwidth
-              || height != term->fheight
-              || ascent != f->ascent;
+  bool is_slow = this->slow
+                 || width  != term->fwidth
+                 || height != term->fheight
+                 || ascent != f->ascent;
 
   int base = ascent; // sorry, incorrect: term->fbase;
 
@@ -1072,9 +1070,9 @@
 
   if (enc2b)
     {
-      const XChar2b *xc = enc_xchar2b (text, len, cs, slow);
+      const XChar2b *xc = enc_xchar2b (text, len, cs, is_slow);
 
-      if (bg == Color_bg && !slow)
+      if (bg == Color_bg && !is_slow)
         {
           v.background = term->pix_colors[bg];
           XChangeGC (disp, gc, GCForeground | GCBackground | GCFont, &v);
@@ -1086,7 +1084,7 @@
 
           XChangeGC (disp, gc, GCForeground | GCFont, &v);
 
-          if (slow)
+          if (is_slow)
             {
               do
                 {
@@ -1104,9 +1102,9 @@
     }
   else
     {
-      const char *xc = enc_char (text, len, cs, slow);
+      const char *xc = enc_char (text, len, cs, is_slow);
 
-      if (bg == Color_bg && !slow)
+      if (bg == Color_bg && !is_slow)
         {
           v.background = term->pix_colors[bg];
           XChangeGC (disp, gc, GCForeground | GCBackground | GCFont, &v);
@@ -1118,7 +1116,7 @@
 
           XChangeGC (disp, gc, GCForeground | GCFont, &v);
 
-          if (slow)
+          if (is_slow)
             {
               do
                 {
@@ -1594,8 +1592,8 @@
 
 /////////////////////////////////////////////////////////////////////////////
 
-rxvt_fontset::rxvt_fontset (rxvt_term *term)
-: fontdesc (0), term (term)
+rxvt_fontset::rxvt_fontset (rxvt_term *term_)
+: fontdesc (0), term (term_)
 {
   clear ();
 }
diff -urN rxvt-unicode-9.31-orig/src/rxvtfont.h rxvt-unicode-9.31/src/rxvtfont.h
--- rxvt-unicode-9.31-orig/src/rxvtfont.h	2021-06-18 04:33:35 +0900
+++ rxvt-unicode-9.31/src/rxvtfont.h	2023-04-22 08:11:13 +0900
@@ -29,7 +29,7 @@
 {
   // managed by the fontset
   rxvt_term *term;
-  void set_term (rxvt_term *term) { this->term = term; }
+  void set_term (rxvt_term *term_) { term = term_; }
 
   char *name;
   codeset cs;
@@ -85,7 +85,7 @@
   ~rxvt_fontset ();
 
   bool populate (const char *desc);
-  void set_prop (const rxvt_fontprop &prop, bool force_prop) { this->prop = prop; this->force_prop = force_prop; }
+  void set_prop (const rxvt_fontprop &prop_, bool force_prop_) { prop = prop_; force_prop = force_prop_; }
   int find_font_idx (uint32_t unicode);
   int find_font (const char *name) const;
   bool realize_font (int i);
diff -urN rxvt-unicode-9.31-orig/src/rxvtimg.C rxvt-unicode-9.31/src/rxvtimg.C
--- rxvt-unicode-9.31-orig/src/rxvtimg.C	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/rxvtimg.C	2023-04-22 09:15:28 +0900
@@ -65,10 +65,10 @@
     {
       mat3x3 &m = *this;
 
-      nv v = m[i][0] * x + m[i][1] * y + m[i][2];
-      nv w = m[2][0] * x + m[2][1] * y + m[2][2];
+      nv v_ = m[i][0] * x + m[i][1] * y + m[i][2];
+      nv w  = m[2][0] * x + m[2][1] * y + m[2][2];
 
-      return v * (1. / w);
+      return v_ * (1. / w);
     }
 
     static mat3x3 translate (nv x, nv y);
@@ -158,17 +158,17 @@
     Display *dpy;
 
     ecb_noinline
-    composer (rxvt_img *srcimg, rxvt_img *dstimg = 0)
-    : srcimg (srcimg), dstimg (dstimg), msk (0)
+    composer (rxvt_img *srcimg_, rxvt_img *dstimg_ = 0)
+    : srcimg (srcimg_), dstimg (dstimg_), msk (0)
     {
-      if (!this->dstimg)
-        this->dstimg = srcimg->new_empty ();
-      else if (!this->dstimg->pm) // somewhat unsatisfying
-        this->dstimg->alloc ();
-
-      dpy =       srcimg->d->dpy;
-      src =       srcimg->picture ();
-      dst = this->dstimg->picture ();
+      if (!dstimg)
+        dstimg = srcimg->new_empty ();
+      else if (!dstimg->pm) // somewhat unsatisfying
+        dstimg->alloc ();
+
+      dpy = srcimg->d->dpy;
+      src = srcimg->picture ();
+      dst = dstimg->picture ();
     }
 
     ecb_noinline
@@ -248,14 +248,14 @@
   return XRenderFindStandardFormat (dpy, PictStandardARGB32);
 }
 
-rxvt_img::rxvt_img (rxvt_screen *screen, XRenderPictFormat *format, int x, int y, int width, int height, int repeat)
-: d(screen->display), x(x), y(y), w(width), h(height), format(format), repeat(repeat),
+rxvt_img::rxvt_img (rxvt_screen *screen, XRenderPictFormat *format_, int x_, int y_, int width_, int height_, int repeat_)
+: d(screen->display), x(x_), y(y_), w(width_), h(height_), format(format_), repeat(repeat_),
   pm(0), ref(0)
 {
 }
 
-rxvt_img::rxvt_img (rxvt_display *display, XRenderPictFormat *format, int x, int y, int width, int height, int repeat)
-: d(display), x(x), y(y), w(width), h(height), format(format), repeat(repeat),
+rxvt_img::rxvt_img (rxvt_display *display, XRenderPictFormat *format_, int x_, int y_, int width_, int height_, int repeat_)
+: d(display), x(x_), y(y_), w(width_), h(height_), format(format_), repeat(repeat_),
   pm(0), ref(0)
 {
 }
@@ -486,13 +486,13 @@
 }
 
 void
-rxvt_img::fill (const rgba &c, int x, int y, int w, int h)
+rxvt_img::fill (const rgba &c, int base_x, int base_y, int width, int height)
 {
   XRenderColor rc = { c.r, c.g, c.b, c.a };
 
   Display *dpy = d->dpy;
   Picture src = picture ();
-  XRenderFillRectangle (dpy, PictOpSrc, src, &rc, x, y, w, h);
+  XRenderFillRectangle (dpy, PictOpSrc, src, &rc, base_x, base_y, width, height);
   XRenderFreePicture (dpy, src);
 }
 
@@ -793,12 +793,12 @@
 }
 
 rxvt_img *
-rxvt_img::sub_rect (int x, int y, int width, int height)
+rxvt_img::sub_rect (int base_x, int base_y, int width, int height)
 {
   rxvt_img *img = clone ();
 
-  img->x -= x;
-  img->y -= y;
+  img->x -= base_x;
+  img->y -= base_y;
 
   if (w != width || h != height)
     {
diff -urN rxvt-unicode-9.31-orig/src/rxvtimg.h rxvt-unicode-9.31/src/rxvtimg.h
--- rxvt-unicode-9.31-orig/src/rxvtimg.h	2018-08-28 14:19:45 +0900
+++ rxvt-unicode-9.31/src/rxvtimg.h	2023-04-22 09:15:35 +0900
@@ -41,8 +41,8 @@
     int w, h;
     bool ours; // false if we don't own the pixmap at all
 
-    pixref (int w, int h)
-    : cnt(1), w(w), h(h), ours(true)
+    pixref (int w_, int h_)
+    : cnt(1), w(w_), h(h_), ours(true)
     {
     }
   };
@@ -79,14 +79,14 @@
     y += dy;
   }
 
-  void repeat_mode (int repeat)
+  void repeat_mode (int repeat_)
   {
-    this->repeat = repeat;
+    repeat = repeat_;
   }
 
   void unshare (); // prepare for write
   void fill (const rgba &c);
-  void fill (const rgba &c, int x, int y, int w, int h);
+  void fill (const rgba &c, int base_x, int base_y, int width, int height);
   void add_alpha ();
   //void linear_gradient  (const XLinearGradient  *gradient, const XFixed *stops, const XRenderColor *colors, int nstops);
   //void radial_gradient  (const XRadialGradient  *gradient, const XFixed *stops, const XRenderColor *colors, int nstops);
@@ -121,7 +121,7 @@
   rxvt_img *reify (); // make x, y 0, make real width/height
   rxvt_img *blur (int rh, int rv);
   rxvt_img *clone ();
-  rxvt_img *sub_rect (int x, int y, int width, int height);
+  rxvt_img *sub_rect (int base_x, int base_y, int width, int height);
   rxvt_img *transform (const nv matrix[3][3]);
   rxvt_img *scale (int new_width, int new_height);
   rxvt_img *rotate (int cx, int cy, nv phi);
diff -urN rxvt-unicode-9.31-orig/src/rxvtperl.xs rxvt-unicode-9.31/src/rxvtperl.xs
--- rxvt-unicode-9.31-orig/src/rxvtperl.xs	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/rxvtperl.xs	2023-04-22 09:29:46 +0900
@@ -185,7 +185,7 @@
 public:
   HV *self;
 
-  overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border);
+  overlay (rxvt_term *THIS_, int x, int y, int w, int h, rend_t rstyle, int border_width);
   ~overlay ();
 
   void show ();
@@ -193,42 +193,42 @@
 
   void swap ();
 
-  void set (int x, int y, SV *str, SV *rend);
+  void set (int x, int y, SV *set_text, SV *set_rend);
 };
 
-overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle, int border)
-: THIS(THIS), border(border == 2), overlay_av (0)
+overlay::overlay (rxvt_term *THIS_, int x, int y, int w, int h, rend_t rstyle, int border_width)
+: THIS(THIS_), border(border_width == 2), overlay_av (0)
 {
-  x = x_;
-  y = y_;
-  w = w_;
-  h = h_;
+  base_x = x;
+  base_y = y;
+  width = w;
+  height = h;
 
-  if (w < 0) w = 0;
-  if (h < 0) h = 0;
+  if (width < 0) width = 0;
+  if (height < 0) height = 0;
 
   if (border == 2)
     {
-      w += 2;
-      h += 2;
+      width += 2;
+      height += 2;
     }
 
-  text = new text_t *[h];
-  rend = new rend_t *[h];
+  text = new text_t *[height];
+  rend = new rend_t *[height];
 
-  for (int y = 0; y < h; y++)
+  for (int line = 0; line < height; line++)
     {
-      text_t *tp = text[y] = new text_t[w];
-      rend_t *rp = rend[y] = new rend_t[w];
+      text_t *tp = text[line] = new text_t[width];
+      rend_t *rp = rend[line] = new rend_t[width];
 
       text_t t0, t1, t2;
       rend_t r = rstyle;
 
       if (border == 2)
         {
-          if (y == 0)
+          if (line == 0)
             t0 = 0x2554, t1 = 0x2550, t2 = 0x2557;
-          else if (y < h - 1)
+          else if (line < height - 1)
             t0 = 0x2551, t1 = 0x0020, t2 = 0x2551;
           else
             t0 = 0x255a, t1 = 0x2550, t2 = 0x255d;
@@ -236,7 +236,7 @@
           *tp++ = t0;
           *rp++ = r;
 
-          for (int x = w - 2; x-- > 0; )
+          for (int col = width - 2; col-- > 0; )
             {
               *tp++ = t1;
               *rp++ = r;
@@ -246,7 +246,7 @@
           *rp = r;
         }
       else
-        for (int x = w; x-- > 0; )
+        for (int col = width; col-- > 0; )
           {
             *tp++ = 0x0020;
             *rp++ = r;
@@ -260,7 +260,7 @@
 {
   hide ();
 
-  for (int y = h; y--; )
+  for (int y = height; y--; )
     {
       delete [] text[y];
       delete [] rend[y];
@@ -311,11 +311,11 @@
 
 void overlay::swap ()
 {
-  int ov_x = max (0, min (MOD (x, THIS->ncol), THIS->ncol - w));
-  int ov_y = max (0, min (MOD (y, THIS->nrow), THIS->nrow - h));
+  int ov_x = max (0, min (MOD (base_x, THIS->ncol), THIS->ncol - width));
+  int ov_y = max (0, min (MOD (base_y, THIS->nrow), THIS->nrow - height));
 
-  int ov_w = min (w, THIS->ncol - ov_x);
-  int ov_h = min (h, THIS->nrow - ov_y);
+  int ov_w = min (width, THIS->ncol - ov_x);
+  int ov_h = min (height, THIS->nrow - ov_y);
 
   // hide cursor if it is within the overlay area
   if (IN_RANGE_EXC (THIS->screen.cur.col - ov_x, 0, ov_w)
@@ -339,30 +339,30 @@
 
 }
 
-void overlay::set (int x, int y, SV *text, SV *rend)
+void overlay::set (int x, int y, SV *set_text, SV *set_rend)
 {
   x += border;
   y += border;
 
-  if (!IN_RANGE_EXC (y, 0, h - border))
+  if (!IN_RANGE_EXC (y, 0, height - border))
     return;
 
-  wchar_t *wtext = sv2wcs (text);
+  wchar_t *wtext = sv2wcs (set_text);
 
-  for (int col = min (wcslen (wtext), w - x - border); col--; )
-    this->text [y][x + col] = wtext [col];
+  for (int col = min (wcslen (wtext), width - x - border); col--; )
+    text [y][x + col] = wtext [col];
 
   free (wtext);
 
   if (rend)
     {
-      if (!SvROK (rend) || SvTYPE (SvRV (rend)) != SVt_PVAV)
+      if (!SvROK (set_rend) || SvTYPE (SvRV (set_rend)) != SVt_PVAV)
         croak ("rend must be arrayref");
 
-      AV *av = (AV *)SvRV (rend);
+      AV *av = (AV *)SvRV (set_rend);
 
-      for (int col = min (AvFILL (av) + 1, w - x - border); col--; )
-        this->rend [y][x + col] = SvIV (*av_fetch (av, col, 1));
+      for (int col = min (AvFILL (av) + 1, width - x - border); col--; )
+        rend [y][x + col] = SvIV (*av_fetch (av, col, 1));
     }
 
   THIS->want_refresh = 1;
@@ -1564,7 +1564,7 @@
         argv = 1
 	PPCODE:
 {
-	stringvec *vec = ix ? THIS->argv : THIS->envv;
+	stringvec *vec = ix ? THIS->term_argv : THIS->term_envv;
 
         EXTEND (SP, vec->size ());
 
diff -urN rxvt-unicode-9.31-orig/src/rxvttoolkit.C rxvt-unicode-9.31/src/rxvttoolkit.C
--- rxvt-unicode-9.31-orig/src/rxvttoolkit.C	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/rxvttoolkit.C	2023-04-22 09:10:28 +0900
@@ -97,9 +97,9 @@
 
 /////////////////////////////////////////////////////////////////////////////
 
-refcounted::refcounted (const char *id)
+refcounted::refcounted (const char *id_)
 {
-  this->id = strdup (id);
+  id = strdup (id_);
 }
 
 refcounted::~refcounted ()
@@ -316,8 +316,8 @@
 
 /////////////////////////////////////////////////////////////////////////////
 
-rxvt_display::rxvt_display (const char *id)
-: refcounted (id)
+rxvt_display::rxvt_display (const char *id_)
+: refcounted (id_)
 , selection_owner (0)
 , clipboard_owner (0)
 {
@@ -681,19 +681,19 @@
 
 rxvt_xim *rxvt_display::get_xim (const char *locale, const char *modifiers)
 {
-  char *id;
+  char *im_id;
   int l, m;
 
   l = strlen (locale);
   m = strlen (modifiers);
 
-  if (!(id = rxvt_temp_buf<char> (l + m + 2)))
+  if (!(im_id = rxvt_temp_buf<char> (l + m + 2)))
     return 0;
 
-  memcpy (id, locale, l); id[l] = '\n';
-  memcpy (id + l + 1, modifiers, m); id[l + m + 1] = 0;
+  memcpy (im_id, locale, l); im_id[l] = '\n';
+  memcpy (im_id + l + 1, modifiers, m); im_id[l + m + 1] = 0;
 
-  rxvt_xim *xim = xims.get (id);
+  rxvt_xim *xim = xims.get (im_id);
 
   return xim;
 }
@@ -825,41 +825,41 @@
 bool
 rxvt_color::set (rxvt_screen *screen, const char *name)
 {
-  rgba c;
+  rgba color;
   char eos;
   int skip = 0;
 
-  c.a = rgba::MAX_CC;
+  color.a = rgba::MAX_CC;
 
   // parse the nonstandard "[alphapercent]" prefix
-  if (1 <= sscanf (name, "[%hd]%n", &c.a, &skip))
+  if (1 <= sscanf (name, "[%hd]%n", &color.a, &skip))
     {
-      c.a = lerp<int, int, int> (0, rgba::MAX_CC, c.a);
+      color.a = lerp<int, int, int> (0, rgba::MAX_CC, color.a);
       name += skip;
     }
 
   // parse the non-standard "rgba:rrrr/gggg/bbbb/aaaa" format
-  if (strlen (name) != 4+5*4 || 4 != sscanf (name, "rgba:%4hx/%4hx/%4hx/%4hx%c", &c.r, &c.g, &c.b, &c.a, &eos))
+  if (strlen (name) != 4+5*4 || 4 != sscanf (name, "rgba:%4hx/%4hx/%4hx/%4hx%c", &color.r, &color.g, &color.b, &color.a, &eos))
     {
       XColor xc;
 
       if (XParseColor (screen->dpy, screen->cmap, name, &xc))
         {
-          c.r = xc.red;
-          c.g = xc.green;
-          c.b = xc.blue;
+          color.r = xc.red;
+          color.g = xc.green;
+          color.b = xc.blue;
         }
       else
         {
-          c.r = 0xffff;
-          c.g = 0x6969;
-          c.b = 0xb4b4;
+          color.r = 0xffff;
+          color.g = 0x6969;
+          color.b = 0xb4b4;
 
           rxvt_warn ("unable to parse color '%s', using pink instead.\n", name);
         }
     }
 
-  return set (screen, c);
+  return set (screen, color);
 }
 
 bool
@@ -950,12 +950,12 @@
 void
 rxvt_color::get (XColor &color) const
 {
-  rgba c;
-  get (c);
+  rgba c_rgba;
+  get (c_rgba);
 
-  color.red   = c.r;
-  color.green = c.g;
-  color.blue  = c.b;
+  color.red   = c_rgba.r;
+  color.green = c_rgba.g;
+  color.blue  = c_rgba.b;
   color.pixel = (Pixel)*this;
 }
 
@@ -975,22 +975,22 @@
 void
 rxvt_color::fade (rxvt_screen *screen, int percent, rxvt_color &result, const rgba &to)
 {
-  rgba c;
-  get (c);
+  rgba c_rgba;
+  get (c_rgba);
 
   result.set (
     screen,
     rgba (
-      lerp (c.r, to.r, percent),
-      lerp (c.g, to.g, percent),
-      lerp (c.b, to.b, percent),
-      lerp (c.a, to.a, percent)
+      lerp (c_rgba.r, to.r, percent),
+      lerp (c_rgba.g, to.g, percent),
+      lerp (c_rgba.b, to.b, percent),
+      lerp (c_rgba.a, to.a, percent)
     )
   );
 }
 
-rxvt_selection::rxvt_selection (rxvt_display *disp, int selnum, Time tm, Window win, Atom prop, rxvt_term *term)
-: display (disp), request_time (tm), request_win (win), request_prop (prop), term (term)
+rxvt_selection::rxvt_selection (rxvt_display *disp, int selnum, Time tm, Window win, Atom prop, rxvt_term *term_)
+: display (disp), request_time (tm), request_win (win), request_prop (prop), term (term_)
 {
   assert (selnum >= Sel_Primary && selnum <= Sel_Clipboard);
 
diff -urN rxvt-unicode-9.31-orig/src/rxvttoolkit.h rxvt-unicode-9.31/src/rxvttoolkit.h
--- rxvt-unicode-9.31-orig/src/rxvttoolkit.h	2016-06-29 22:47:19 +0900
+++ rxvt-unicode-9.31/src/rxvttoolkit.h	2023-04-22 08:13:11 +0900
@@ -165,12 +165,12 @@
   operator XftDraw *();
 #endif
 
-  rxvt_drawable (rxvt_screen *screen, Drawable drawable)
-  : screen(screen),
+  rxvt_drawable (rxvt_screen *screen_, Drawable drawable_)
+  : screen(screen_),
 #if XFT
     xftdrawable(0),
 #endif
-    drawable(drawable)
+    drawable(drawable_)
   { }
 
 #if XFT
@@ -189,7 +189,7 @@
 //public
   XIM xim;
 
-  rxvt_xim (const char *id) : refcounted (id) { }
+  rxvt_xim (const char *id_) : refcounted (id_) { }
   bool ref_init ();
   ~rxvt_xim ();
 };
@@ -299,9 +299,9 @@
 {
   Window window;
 
-  void start (rxvt_display *display, Window window)
+  void start (rxvt_display *display, Window window_)
   {
-    this->window = window;
+    window = window_;
     display->reg (this);
   }
 
@@ -326,8 +326,8 @@
   rgba ()
   { }
 
-  rgba (uint16_t r, uint16_t g, uint16_t b, uint16_t a = MAX_CC)
-  : r(r), g(g), b(b), a(a)
+  rgba (uint16_t r_, uint16_t g_, uint16_t b_, uint16_t a_ = MAX_CC)
+  : r(r_), g(g_), b(b_), a(a_)
   { }
 };
 
@@ -358,9 +358,9 @@
 
   operator rgba () const
   {
-    rgba c;
-    get (c);
-    return c;
+    rgba color;
+    get (color);
+    return color;
   }
   void get (rgba &color) const;
   void get (XColor &color) const;
diff -urN rxvt-unicode-9.31-orig/src/screen.C rxvt-unicode-9.31/src/screen.C
--- rxvt-unicode-9.31-orig/src/screen.C	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/screen.C	2023-04-22 09:23:26 +0900
@@ -97,13 +97,13 @@
 
 /* Fill part/all of a line with blanks. */
 void
-rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const noexcept
+rxvt_term::scr_blank_line (line_t &l, unsigned int col, unsigned int blank_width, rend_t efs) const noexcept
 {
   if (!l.valid ())
     {
       l.alloc ();
       col = 0;
-      width = ncol;
+      blank_width = ncol;
     }
 
   l.touch ();
@@ -114,7 +114,7 @@
   text_t *et = l.t + col;
   rend_t *er = l.r + col;
 
-  while (width--)
+  while (blank_width--)
     {
       *et++ = ' ';
       *er++ = efs;
@@ -798,7 +798,6 @@
 
   bool checksel;
   unicode_t c;
-  int ncol = this->ncol;
   const wchar_t *strend = str + len;
 
   want_refresh = 1;
@@ -897,7 +896,7 @@
       // further replacements, as wcwidth might return -1 for the line
       // drawing characters below as they might be invalid in the current
       // locale.
-      int width = WCWIDTH (c);
+      int cwidth = WCWIDTH (c);
 
       if (ecb_unlikely (charsets [screen.charset] == '0')) // DEC SPECIAL
         {
@@ -918,14 +917,14 @@
           if (c >= 0x41 && c <= 0x7e && vt100_0[c - 0x41])
             {
               c = vt100_0[c - 0x41];
-              width = 1; // vt100 line drawing characters are always single-width
+              cwidth = 1; // vt100 line drawing characters are always single-width
             }
         }
 
       if (ecb_unlikely (screen.flags & Screen_Insert))
-        scr_insdel_chars (width, INSERT);
+        scr_insdel_chars (cwidth, INSERT);
 
-      if (width != 0)
+      if (cwidth != 0)
         {
 #if !UNICODE_3
           // trim characters we can't store directly :(
@@ -940,7 +939,7 @@
           rend_t rend = SET_FONT (rstyle, FONTSET (rstyle)->find_font (c));
 
           // if the character doesn't fit into the remaining columns...
-          if (ecb_unlikely (screen.cur.col > ncol - width && ncol >= width))
+          if (ecb_unlikely (screen.cur.col > ncol - cwidth && ncol >= cwidth))
             {
               if (screen.flags & Screen_Autowrap)
                 {
@@ -950,7 +949,7 @@
                   --str;
                 }
               else
-                screen.cur.col = ncol - width;
+                screen.cur.col = ncol - cwidth;
             }
 
           // nuke the character at this position, if required
@@ -980,20 +979,20 @@
 
               c = NOCHAR;
             }
-          while (ecb_unlikely (--width > 0));
+          while (ecb_unlikely (--cwidth > 0));
 
           // pad with spaces when overwriting wide character with smaller one
-          for (int c = screen.cur.col; ecb_unlikely (c < ncol && line->t[c] == NOCHAR); c++)
+          for (int i = screen.cur.col; ecb_unlikely (i < ncol && line->t[i] == NOCHAR); i++)
             {
-              line->t[c] = ' ';
-              line->r[c] = rend;
+              line->t[i] = ' ';
+              line->r[i] = rend;
             }
 
 end_of_line:
           ;
         }
 #if ENABLE_COMBINING
-      else // width == 0
+      else // cwidth == 0
         {
           if (c != 0xfeff) // ignore BOM
             {
@@ -2048,7 +2047,6 @@
 {
   int16_t col, row,   /* column/row we're processing               */
           ocrow;      /* old cursor row                            */
-  int i;              /* tmp                                       */
   rend_t ccol1,  /* Cursor colour       */
          ccol2;  /* Cursor colour2      */
   rend_t cur_rend;
@@ -2095,18 +2093,18 @@
 
     if (showcursor)
       {
-        int col = screen.cur.col;
+        int c = screen.cur.col;
 
-        while (col && ROW(screen.cur.row).t[col] == NOCHAR)
-          col--;
+        while (c && ROW(screen.cur.row).t[c] == NOCHAR)
+          c--;
 
         cursorwidth = 1;
-        while (col + cursorwidth < ncol
-               && ROW(screen.cur.row).t[col + cursorwidth] == NOCHAR)
+        while (c + cursorwidth < ncol
+               && ROW(screen.cur.row).t[c + cursorwidth] == NOCHAR)
           cursorwidth++;
 
-        cur_rend = ROW(screen.cur.row).r[col];
-        cur_col = col;
+        cur_rend = ROW(screen.cur.row).r[c];
+        cur_col = c;
 
 #ifndef NO_CURSORCOLOR
         if (ISSET_PIXCOLOR (Color_cursor))
@@ -2273,7 +2271,8 @@
 
           int xpixel = Col2Pixel (col);
 
-          for (i = 0; ++col < ncol; )
+          int chcount;
+          for (chcount = 0; ++col < ncol; )
             {
               if (stp[col] == NOCHAR)
                 {
@@ -2281,7 +2280,7 @@
                   drp[col] = srp[col];
 
                   count++;
-                  i++;
+                  chcount++;
 
                   continue;
                 }
@@ -2294,23 +2293,23 @@
               if (stp[col] != dtp[col]
                   || !RS_SAME (srp[col], drp[col]))
                 {
-                  if (have_bg && (i++ > count / 2))
+                  if (have_bg && (chcount++ > count / 2))
                     break;
 
                   dtp[col] = stp[col];
                   drp[col] = rend;
-                  i = 0;
+                  chcount = 0;
                 }
-              else if (have_bg || (stp[col] != ' ' && ++i >= 16))
+              else if (have_bg || (stp[col] != ' ' && ++chcount >= 16))
                 break;
             }
 
-          col--;      /* went one too far.  move back */
-          count -= i; /* dump any matching trailing chars */
+          col--;            /* went one too far.  move back */
+          count -= chcount; /* dump any matching trailing chars */
 
           // sometimes we optimize away the trailing NOCHAR's, add them back
-          while (ecb_unlikely (i && text[count] == NOCHAR))
-            count++, i--;
+          while (ecb_unlikely (chcount && text[count] == NOCHAR))
+            count++, chcount--;
 
           /*
            * Determine the attributes for the string
@@ -2422,7 +2421,7 @@
             {
               // this is very ugly, maybe push it into ->draw?
 
-              for (i = 0; i < count; i++) /* don't draw empty strings */
+              for (int i = 0; i < count; i++) /* don't draw empty strings */
                 if (text[i] != ' ')
                   {
                     font->draw (*drawable, xpixel, ypixel, text, count, fore, Color_transparent);
@@ -2598,7 +2597,7 @@
 }
 
 void
-rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle1, rend_t rstyle2) noexcept
+rxvt_term::scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t style1, rend_t style2) noexcept
 {
   int view_end = view_start + nrow;
   int row, col;
@@ -2609,18 +2608,18 @@
       rend_t *srp = ROW(row).r;
 
       for (col = beg_col; col < end_col; col++)
-        srp[col] ^= rstyle1;
+        srp[col] ^= style1;
 
       while (col-- > beg_col && (stp[col] == NOCHAR || unicode::is_space (stp[col])))
-        srp[col] ^= rstyle2;
+        srp[col] ^= style2;
 
       if (++col < end_col)
-        srp[col] ^= rstyle2;
+        srp[col] ^= style2;
     }
 }
 
 void
-rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle) noexcept
+rxvt_term::scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t style) noexcept
 {
   int view_end = view_start + nrow;
   int row, col;
@@ -2638,11 +2637,11 @@
 
   for (; row < min (end_row, view_end); row++, col = 0)
     for (rend_t *srp = ROW(row).r; col < ncol; col++)
-      srp[col] ^= rstyle;
+      srp[col] ^= style;
 
   if (row == end_row)
     for (rend_t *srp = ROW(row).r; col < end_col; col++)
-      srp[col] ^= rstyle;
+      srp[col] ^= style;
 }
 
 /* ------------------------------------------------------------------------- */
@@ -3475,32 +3474,32 @@
       int selectlen;
       wchar_t *cl;
       enum {
-        enc_string        = XStringStyle,
-        enc_text          = XStdICCTextStyle,
-        enc_compound_text = XCompoundTextStyle,
+        style_string        = XStringStyle,
+        style_text          = XStdICCTextStyle,
+        style_compound_text = XCompoundTextStyle,
 #ifdef X_HAVE_UTF8_STRING
-        enc_utf8          = XUTF8StringStyle,
+        style_utf8          = XUTF8StringStyle,
 #else
-        enc_utf8          = -1,
+        style_utf8          = -1,
 #endif
       } style;
 
       if (target == XA_STRING)
         // we actually don't do XA_STRING, but who cares, as i18n clients
         // will ask for another format anyways.
-        style = enc_string;
+        style = style_string;
       else if (target == xa[XA_TEXT])
-        style = enc_text;
+        style = style_text;
       else if (target == xa[XA_COMPOUND_TEXT])
-        style = enc_compound_text;
+        style = style_compound_text;
 #if !ENABLE_MINIMAL
       else if (target == xa[XA_UTF8_STRING])
-        style = enc_utf8;
+        style = style_utf8;
 #endif
       else
         {
           target = xa[XA_COMPOUND_TEXT];
-          style = enc_compound_text;
+          style = style_compound_text;
         }
 
       if (rq.selection == XA_PRIMARY && selection.text)
@@ -3522,7 +3521,7 @@
 #if !ENABLE_MINIMAL
       // xlib is horribly broken with respect to UTF8_STRING, and nobody cares to fix it
       // so recode it manually
-      if (style == enc_utf8)
+      if (style == style_utf8)
         {
           freect = 1;
           ct.encoding = target;
@@ -3589,8 +3588,8 @@
   x -= 1; clamp_it (x, 0, ncol - w);
   y -= 1; clamp_it (y, 0, nrow - h);
 
-  ov.x = x; ov.y = y;
-  ov.w = w; ov.h = h;
+  ov.base_x = x; ov.base_y = y;
+  ov.width = w; ov.height = h;
 
   ov.text = new text_t *[h];
   ov.rend = new rend_t *[h];
@@ -3632,7 +3631,7 @@
 
   want_refresh = 1;
 
-  for (int y = 0; y < ov.h; y++)
+  for (int y = 0; y < ov.height; y++)
     {
       delete [] ov.text[y];
       delete [] ov.rend[y];
@@ -3645,7 +3644,7 @@
 void
 rxvt_term::scr_overlay_set (int x, int y, text_t text, rend_t rend) noexcept
 {
-  if (!ov.text || x >= ov.w - 2 || y >= ov.h - 2)
+  if (!ov.text || x >= ov.width - 2 || y >= ov.height - 2)
     return;
 
   x++, y++;
@@ -3667,9 +3666,9 @@
   while (*s)
     {
       text_t t = *s++;
-      int width = WCWIDTH (t);
+      int cwidth = WCWIDTH (t);
 
-      while (width--)
+      while (cwidth--)
         {
           scr_overlay_set (x++, y, t);
           t = NOCHAR;
@@ -3684,20 +3683,20 @@
     return;
 
   // hide cursor if it is within the overlay area
-  if (IN_RANGE_EXC (screen.cur.col - ov.x, 0, ov.w)
-      && IN_RANGE_EXC (screen.cur.row - ov.y, 0, ov.h))
+  if (IN_RANGE_EXC (screen.cur.col - ov.base_x, 0, ov.width)
+      && IN_RANGE_EXC (screen.cur.row - ov.base_y, 0, ov.height))
     screen.flags &= ~Screen_VisibleCursor;
 
   // swap screen mem with overlay
-  for (int y = ov.h; y--; )
+  for (int y = ov.height; y--; )
     {
       text_t *t1 = ov.text[y];
       rend_t *r1 = ov.rend[y];
 
-      text_t *t2 = ROW(y + ov.y + view_start).t + ov.x;
-      rend_t *r2 = ROW(y + ov.y + view_start).r + ov.x;
+      text_t *t2 = ROW(y + ov.base_y + view_start).t + ov.base_x;
+      rend_t *r2 = ROW(y + ov.base_y + view_start).r + ov.base_x;
 
-      for (int x = ov.w; x--; )
+      for (int x = ov.width; x--; )
         {
           text_t t = *t1; *t1++ = *t2; *t2++ = t;
           rend_t r = *r1; *r1++ = *r2; *r2++ = SET_FONT (r, FONTSET (r)->find_font (t));
diff -urN rxvt-unicode-9.31-orig/src/scrollbar-next.C rxvt-unicode-9.31/src/scrollbar-next.C
--- rxvt-unicode-9.31-orig/src/scrollbar-next.C	2023-04-22 07:33:16 +0900
+++ rxvt-unicode-9.31/src/scrollbar-next.C	2023-04-22 09:03:32 +0900
@@ -233,7 +233,7 @@
 }
 
 int
-scrollBar_t::show_next (int update)
+scrollBar_t::show_next (int do_update)
 {
   int height = end + SB_BUTTON_TOTAL_HEIGHT + SB_PADDING;
   Drawable src;
@@ -253,7 +253,7 @@
   else
       stipple_height -= SB_PADDING;
 
-  if (has_sb != last_has_sb || !update)
+  if (has_sb != last_has_sb || !do_update)
     {
       last_has_sb = has_sb;
       XFillRectangle (term->dpy, win, grayGC, 0, 0,
@@ -268,12 +268,12 @@
 
   if (term->top_row)
     {
-      if (last_top < top || !update)
+      if (last_top < top || !do_update)
         XFillRectangle (term->dpy, win, stippleGC,
                         SB_LEFT_PADDING, SB_PADDING + last_top,
                         SB_BUTTON_WIDTH, top - last_top);
 
-      if (bot < last_bot || !update)
+      if (bot < last_bot || !do_update)
         XFillRectangle (term->dpy, win, stippleGC,
                         SB_LEFT_PADDING, bot + SB_PADDING,
                         SB_BUTTON_WIDTH, (last_bot - bot));
diff -urN rxvt-unicode-9.31-orig/src/scrollbar-plain.C rxvt-unicode-9.31/src/scrollbar-plain.C
--- rxvt-unicode-9.31-orig/src/scrollbar-plain.C	2016-06-29 22:47:19 +0900
+++ rxvt-unicode-9.31/src/scrollbar-plain.C	2023-04-22 09:03:41 +0900
@@ -28,7 +28,7 @@
 #if defined(PLAIN_SCROLLBAR)
 
 int
-scrollBar_t::show_plain (int update)
+scrollBar_t::show_plain (int do_update)
 {
   int xsb = 0;
   int sbwidth = width - 1;
@@ -45,7 +45,7 @@
 
   xsb = term->option (Opt_scrollBar_right) ? 1 : 0;
 
-  if (update)
+  if (do_update)
     {
       if (last_top < top)
         XClearArea (term->dpy, win,
diff -urN rxvt-unicode-9.31-orig/src/scrollbar-rxvt.C rxvt-unicode-9.31/src/scrollbar-rxvt.C
--- rxvt-unicode-9.31-orig/src/scrollbar-rxvt.C	2016-06-29 22:47:19 +0900
+++ rxvt-unicode-9.31/src/scrollbar-rxvt.C	2023-04-22 09:03:20 +0900
@@ -148,7 +148,7 @@
 }
 
 int
-scrollBar_t::show_rxvt (int update)
+scrollBar_t::show_rxvt (int do_update)
 {
   int sbwidth = (int)width;
 
@@ -167,7 +167,7 @@
     }
   else
     {
-      if (update)
+      if (do_update)
         {
           if (last_top < top)
             XClearArea (term->dpy, win,
diff -urN rxvt-unicode-9.31-orig/src/scrollbar-xterm.C rxvt-unicode-9.31/src/scrollbar-xterm.C
--- rxvt-unicode-9.31-orig/src/scrollbar-xterm.C	2016-06-29 22:47:19 +0900
+++ rxvt-unicode-9.31/src/scrollbar-xterm.C	2023-04-22 09:03:50 +0900
@@ -32,7 +32,7 @@
 const unsigned char x_stp_bits[] = { 0xaa, 0x55 };
 
 int
-scrollBar_t::show_xterm (int update)
+scrollBar_t::show_xterm (int do_update)
 {
   int xsb = 0;
   int sbwidth = width - 1;
@@ -61,7 +61,7 @@
 
   xsb = term->option (Opt_scrollBar_right) ? 1 : 0;
 
-  if (update)
+  if (do_update)
     {
       if (last_top < top)
         XClearArea (term->dpy, win,
diff -urN rxvt-unicode-9.31-orig/src/scrollbar.C rxvt-unicode-9.31/src/scrollbar.C
--- rxvt-unicode-9.31-orig/src/scrollbar.C	2016-06-29 22:47:19 +0900
+++ rxvt-unicode-9.31/src/scrollbar.C	2023-04-22 09:02:09 +0900
@@ -133,12 +133,12 @@
 }
 
 void
-scrollBar_t::setup (rxvt_term *term)
+scrollBar_t::setup (rxvt_term *term_)
 {
   int i;
   const char *scrollalign, *scrollstyle, *thickness;
 
-  this->term = term;
+  term = term_;
   scrollalign = term->rs[Rs_scrollBar_align];
   scrollstyle = term->rs[Rs_scrollstyle];
   thickness = term->rs[Rs_scrollBar_thickness];
diff -urN rxvt-unicode-9.31-orig/src/scrollbar.h rxvt-unicode-9.31/src/scrollbar.h
--- rxvt-unicode-9.31-orig/src/scrollbar.h	2016-06-29 22:47:19 +0900
+++ rxvt-unicode-9.31/src/scrollbar.h	2023-04-22 09:03:13 +0900
@@ -154,13 +154,13 @@
   void update_data ();
 
   // scrollbar-next.C
-  int show_next (int);
+  int show_next (int do_update);
   // scrollbar-rxvt.C
-  int show_rxvt (int);
+  int show_rxvt (int do_update);
   // scrollbar-xterm.C
-  int show_xterm (int);
+  int show_xterm (int do_update);
   // scrollbar-plain.C
-  int show_plain (int);
+  int show_plain (int do_update);
 
   void init_next ();
 };
