all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Plewright <chris@createng.com>
To: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: doesn't this look incorrect?
Date: Mon, 28 Nov 2022 04:05:42 +0000	[thread overview]
Message-ID: <SYBP282MB269501ACAD79C5D794A4548EDB139@SYBP282MB2695.AUSP282.PROD.OUTLOOK.COM> (raw)

[-- Attachment #1: Type: text/plain, Size: 3364 bytes --]


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<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9723> /* The return code indicates key code size.  cpID is the codepage to
9724<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9724>    use for translation to Unicode; -1 means use the current console
9725<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9725>    input codepage.  */
9726<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9726> int
9727<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9727> w32_kbd_patch_key (KEY_EVENT_RECORD *event, int cpId)
9728<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9728> {
9729<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9729>   unsigned int key_code = event->wVirtualKeyCode;
9730<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9730>   unsigned int mods = event->dwControlKeyState;
9731<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9731>   BYTE keystate[256];
9732<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9732>   static BYTE ansi_code[4];
9733<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9733>   static int isdead = 0;
9734<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9734>
9735<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9735>   if (isdead == 2)
9736<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9736>     {
9737<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9737>       event->uChar.AsciiChar = ansi_code[2];
9738<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9738>       isdead = 0;
9739<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9739>       return 1;
9740<http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob;f=src/w32fns.c;h=887e5a1f7b74550044c0be0d40fd0bebab684eb7;hb=HEAD#l9740>     }


[-- Attachment #2: Type: text/html, Size: 10931 bytes --]

             reply	other threads:[~2022-11-28  4:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28  4:05 Christopher Plewright [this message]
2022-11-28  5:26 ` doesn't this look incorrect? Óscar Fuentes
2022-11-28  5:30   ` tomas
2022-11-28 12:19     ` Eli Zaretskii
2022-11-28 12:24       ` tomas
2022-11-28  5:34   ` Christopher Plewright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SYBP282MB269501ACAD79C5D794A4548EDB139@SYBP282MB2695.AUSP282.PROD.OUTLOOK.COM \
    --to=chris@createng.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.