emacs-devel
[Top][All Lists]
Advanced

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

doesn't this look incorrect?


From: Christopher Plewright
Subject: doesn't this look incorrect?
Date: Mon, 28 Nov 2022 04:05:42 +0000

 

See Lines  9733 to 9735: in emacs:  src/w32fns.c 

 

  static int isdead = 0;

    

  if (isdead == 2)

 

This is apparently a mistake.  This sort of thing usually happens when refactoring gets screwed up.

 

Seems to have been there for a long time!?   Trying to guess what the original intention might have been here;

 

http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD

 

 

9723 /* The return code indicates key code size.  cpID is the codepage to

9724    use for translation to Unicode; -1 means use the current console

9725    input codepage.  */

9726 int

9727 w32_kbd_patch_key (KEY_EVENT_RECORD *event, int cpId)

9728 {

9729   unsigned int key_code = event->wVirtualKeyCode;

9730   unsigned int mods = event->dwControlKeyState;

9731   BYTE keystate[256];

9732   static BYTE ansi_code[4];

9733   static int isdead = 0;

9734

9735   if (isdead == 2)

9736     {

9737       event->uChar.AsciiChar = ansi_code[2];

9738       isdead = 0;

9739       return 1;

9740     }

 


reply via email to

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