🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99949

Bug in GNU EMACS source file.

#99949
From: CI
Date: Tue, 10 Apr 1990 19:46
69 lines
2396 bytes
Hello.

Here is a bug report in data declaration of MouseMap.

Symptom: In file keymap.c, and x11fns.c, 
	MouseMap should be struct Lisp_Object instead of its pointer.
	(keymap.c, x11fns.c)

The only use of MouseMap in x11fns.c is as the 1st parameter to access_keymap().
And access_keymap() takes Lisp_Object as its first parameter.

	cf.
	Lisp_Object
	access_keymap (map, idx)
	     Lisp_Object map;
	     register int idx;
	...

COMMENT: This may not be a big problem on the SUN-3, and other
ordinary computers. But on a segmented machines, or computers that may
have several different pointer representations such as DG MV Eclipse
(almost deceased machine...), this can be a problem.

FIX: Here is how I changed it.

In keymap.c

... near the start of the file...
#ifdef HAVE_X_WINDOWS
#if 0
struct Lisp_Vector *MouseMap;		/* Keymap for mouse commands */
#else
/* CI Patch */
Lisp_Object MouseMap;		/* Keymap for mouse commands */
#endif
#endif /* HAVE_X_WINDOWS */

	.... in syms_of_keymap () near the end of file. ....

#ifdef HAVE_X_WINDOWS
  tem = Fmake_keymap ();
#if 0
  MouseMap = XVECTOR (tem);
#else
  MouseMap = tem;		/* CI Patch */
#endif
  Fset (intern ("mouse-map"), tem);
#endif /* HAVE_X_WINDOWS */


In x11fns.c
... near the start of file ...
#if 0
extern struct Lisp_Vector *MouseMap;
#else
extern Lisp_Object MouseMap; /* CI patch: */
#endif

Cf. 	... The only place MouseMap is used in x11fns.c...
		mouse_cmd
		  = get_keyelt (access_keymap (MouseMap, com_letter));



   Chiaki Ishikawa                        Phone:+81-3-5702-0351
 Personal Media Corp.                       FAX:+81-3-5702-0359
   1-7-7 Hiratsuka,     		 UUCP: uunet!pmcgw!ishikawa
 Shinagawa-ku, Tokyo 142	
Technical Details
Message-ID: <9004101946.AA06078@sun00.pmc.co.jp>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bu.edu!snorkelwacker!tut.cis.ohio-state.edu!pmc.co.jp!ishikawa

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,662384b9d18e76e2,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-04-11 03:17:31 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bu.edu!snorkelwacker!tut.cis.ohio-state.edu!pmc.co.jp!ishikawa
From: ishikawa@pmc.co.jp (CI)
Newsgroups: gnu.emacs.bug
Subject: Bug in GNU EMACS source file.
Message-ID: <9004101946.AA06078@sun00.pmc.co.jp>
Date: 10 Apr 90 19:46:20 GMT
Sender: daemon@tut.cis.ohio-state.edu
Reply-To: uunet!pmcgw!ishikawa@uunet.uu.net
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 69
Posted: Tue Apr 10 20:46:20 1990