home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / bug-lucid-emacs / text0032.txt < prev    next >
Encoding:
Text File  |  1993-07-04  |  10.8 KB  |  357 lines

  1. I didn't have time to test the beta for 19.6 (I was only given a week,
  2. which is too short a time for testing PD software at our site - I need
  3. at least 2 weeks notice to have a reasonable chance of installing and
  4. trying a new release of anything:-).  Anyway, that's why I'm posting
  5. this - it is the diffs I used to make 19.6 on our system (your mileage
  6. may vary, etc. etc.).  I hope that Jaimie will include at least some
  7. of them in the next release and perhaps more comment notes also (for
  8. the changes not included:-).
  9.  
  10. The last diff, for file event-Xt.c, is a hack to provide proper
  11. support for the keypad on AIX.  Note that you have to define two
  12. values in config.h (which are included in the diffs here).  If other
  13. people have servers that don't convert keysyms well for numlock, then
  14. you might want to look at this change also (I provided the #defines so
  15. the action could be turned on or off easily).
  16.  
  17. Of special note are the changes to s-aix3-2.h (for HAVE_TIMEVAL and
  18. the index/rindex stuff) and to config.h for the compile switch (thanks
  19. to a previous poster who built the image -O -Q; that provides an image
  20. that is smaller 14Meg to 5Meg and seems to run faster).  I don't have
  21. xpm installed (yet, I plan to once the header file moves to
  22. /usr/local/include/X11).  Also, a Sun-ism crept back into the Makefile
  23. in etc - you shouldn't do -Bstatic there!  (Note: you'll see that I
  24. built those tools -O -Q also).
  25.  
  26. I hope this helps people out.  Have fun! - Bob
  27. =====>8 Cut here and enjoy? 8<=====
  28. *** /misc/lucid/lemacs-19.6/etc/Makefile-dist    Wed Apr 14 10:50:05 1993
  29. --- /misc/lucid/lemacs-19.6/etc/Makefile    Wed Apr 14 10:50:08 1993
  30. ***************
  31. *** 6,12 ****
  32.   
  33.   # make sure executables are linked statically.
  34.   # add -DUSG for SysV movemail and timer
  35. ! CFLAGS= -g -Bstatic
  36.   # For Xenix.  Needed for movemail
  37.   #  LOADLIBES= -lx
  38.   
  39. --- 6,12 ----
  40.   
  41.   # make sure executables are linked statically.
  42.   # add -DUSG for SysV movemail and timer
  43. ! CFLAGS= -O -Q
  44.   # For Xenix.  Needed for movemail
  45.   #  LOADLIBES= -lx
  46.   
  47. *** /misc/lucid/lemacs-19.6/src/s/s-aix3-2.h-dist    Tue Apr 13 12:03:12 1993
  48. --- /misc/lucid/lemacs-19.6/src/s/s-aix3-2.h    Tue Apr 13 17:05:06 1993
  49. ***************
  50. *** 20,29 ****
  51. --- 20,46 ----
  52.   #ifndef __S_AIX3_2_H
  53.   #define __S_AIX3_2_H 1
  54.   
  55. + #ifdef index
  56. + #undef index
  57. + #endif
  58. + #ifdef rindex
  59. + #undef rindex
  60. + #endif
  61.   #include "s-aix3-1.h"
  62.   
  63.   #define NEED_REALPATH
  64.   #define HAVE_SETPRIORITY
  65. + #define NEED_TIME_H
  66. + #ifdef index
  67. + #undef index
  68. + #endif
  69. + #ifdef rindex
  70. + #undef rindex
  71. + #endif
  72.   
  73.   #pragma alloca
  74.   
  75. *** /misc/lucid/lemacs-19.6/src/config.h-dist    Thu Apr  1 15:13:00 1993
  76. --- /misc/lucid/lemacs-19.6/src/config.h    Tue Apr 13 17:03:20 1993
  77. ***************
  78. *** 34,40 ****
  79.      This has to come before include the m- file.
  80.    */
  81.   
  82. ! #define USE_GCC
  83.   /* #define USE_LCC */
  84.   
  85.   /* Include here a s- file that describes the system type you are using.
  86. --- 34,40 ----
  87.      This has to come before include the m- file.
  88.    */
  89.   
  90. ! /* #define USE_GCC */
  91.   /* #define USE_LCC */
  92.   
  93.   /* Include here a s- file that describes the system type you are using.
  94. ***************
  95. *** 42,48 ****
  96.      the s- files to use for them.  See s-template.h for documentation on 
  97.      writing s- files.
  98.    */
  99. ! #include "s/s-sunos4shr.h"
  100.   
  101.   /* Include here a m- file that describes the machine and system you use.
  102.      See the file ../etc/MACHINES for a list of machines and the names of 
  103. --- 42,48 ----
  104.      the s- files to use for them.  See s-template.h for documentation on 
  105.      writing s- files.
  106.    */
  107. ! #include "s/s-aix3-2.h"
  108.   
  109.   /* Include here a m- file that describes the machine and system you use.
  110.      See the file ../etc/MACHINES for a list of machines and the names of 
  111. ***************
  112. *** 49,55 ****
  113.      the m- files to use for them.   See m-template.h for info on what m- 
  114.      files should define.
  115.    */
  116. ! #include "m/m-sparc.h"
  117.   
  118.   /* Load in the conversion definitions if this system
  119.      needs them and the source file being compiled has not
  120. --- 49,55 ----
  121.      the m- files to use for them.   See m-template.h for info on what m- 
  122.      files should define.
  123.    */
  124. ! #include "m/m-ibmrs6000.h"
  125.   
  126.   /* Load in the conversion definitions if this system
  127.      needs them and the source file being compiled has not
  128. ***************
  129. *** 72,79 ****
  130.   #endif
  131.   
  132.   /* Define HAVE_XPM if you have the `xpm' library and want emacs to use it. */
  133. ! #define HAVE_XPM
  134.   
  135.   /* Define `subprocesses' if you want to have code for asynchronous
  136.      subprocesses (as used in M-x compile and M-x shell).  These do not
  137.      work for some USG systems yet; for the ones where they work, the
  138. --- 72,85 ----
  139.   #endif
  140.   
  141.   /* Define HAVE_XPM if you have the `xpm' library and want emacs to use it. */
  142. ! /* #define HAVE_XPM */
  143.   
  144. + /*
  145. +    Define numlock behavior if default is not good. */
  146. + #define SPECIAL_NUM_LOCK_BEHAVIOR
  147. + #define NUM_LOCK_MODIFIER Mod5Mask
  148.   /* Define `subprocesses' if you want to have code for asynchronous
  149.      subprocesses (as used in M-x compile and M-x shell).  These do not
  150.      work for some USG systems yet; for the ones where they work, the
  151. ***************
  152. *** 129,138 ****
  153. --- 135,146 ----
  154.      If you have trouble with _malloc being multiply-defined, or if you're
  155.      on a NeXT (or possibly MACH in general) comment out the next four lines.
  156.    */
  157. + /*
  158.   #ifdef SYSTEM_MALLOC
  159.   #undef SYSTEM_MALLOC
  160.   #endif
  161.   #define GNU_MALLOC
  162. + */
  163.   
  164.   /* The SunOS 4.1 version of localtime() allocates 8 bytes and writes to 9,
  165.      which causes predictably bad problems unless you use the SunOS version
  166. ***************
  167. *** 197,203 ****
  168.   
  169.      See the comments in lwlib/Imakefile for more info.
  170.    */
  171. ! /* #define LWLIB_USES_MOTIF */
  172.   /* #define LWLIB_USES_OLIT */
  173.   
  174.   /* Energize requires Motif. */
  175. --- 205,211 ----
  176.   
  177.      See the comments in lwlib/Imakefile for more info.
  178.    */
  179. ! #define LWLIB_USES_MOTIF
  180.   /* #define LWLIB_USES_OLIT */
  181.   
  182.   /* Energize requires Motif. */
  183. ***************
  184. *** 214,220 ****
  185.      X libraries aren't in a place that your loader can find on its own,
  186.      you might want to add "-L/..." or something similar.  */
  187.   
  188. ! /* #define LD_SWITCH_SITE -L/x11r4/usr.`arch`/lib */
  189.   
  190.   /* Define C_SWITCH_SITE to contain any special flags your compiler may
  191.      need.  For instance, if you've defined HAVE_X_WINDOWS above and your
  192. --- 222,228 ----
  193.      X libraries aren't in a place that your loader can find on its own,
  194.      you might want to add "-L/..." or something similar.  */
  195.   
  196. ! #define LD_SWITCH_SITE -L/usr/local/lib
  197.   
  198.   /* Define C_SWITCH_SITE to contain any special flags your compiler may
  199.      need.  For instance, if you've defined HAVE_X_WINDOWS above and your
  200. ***************
  201. *** 221,227 ****
  202.      X include files aren't in a place that your compiler can find on its
  203.      own, you might want to add "-I/..." or something similar.  */
  204.   
  205. ! /* #define C_SWITCH_SITE -I/x11r4/usr/include */
  206.   
  207.   #ifdef USE_GCC
  208.   /* Depending on how GCC is installed, you may need to add the gcc library
  209. --- 229,235 ----
  210.      X include files aren't in a place that your compiler can find on its
  211.      own, you might want to add "-I/..." or something similar.  */
  212.   
  213. ! /* #define C_SWITCH_SITE -O -Q */
  214.   
  215.   #ifdef USE_GCC
  216.   /* Depending on how GCC is installed, you may need to add the gcc library
  217. ***************
  218. *** 241,246 ****
  219. --- 249,256 ----
  220.   # undef C_OPTIMIZE_SWITCH
  221.   # define C_OPTIMIZE_SWITCH -O4 -Oi -G
  222.   #endif
  223. + #define C_OPTIMIZE_SWITCH -O -Q
  224.   
  225.   /* If you are using SunOS 4.1.1 and X11r5, then you need this patch.
  226.      There is a stupid bug in the SunOS libc.a: two functions which X11r5
  227. *** /misc/lucid/lemacs-19.6/src/event-Xt.c-dist    Tue Apr 13 11:58:41 1993
  228. --- /misc/lucid/lemacs-19.6/src/event-Xt.c    Tue Apr 13 12:01:36 1993
  229. ***************
  230. *** 40,45 ****
  231. --- 40,49 ----
  232.   static void describe_event ();
  233.   void emacs_Xt_focus_event_handler ();
  234.   
  235. + #ifdef SPECIAL_NUM_LOCK_BEHAVIOR
  236. + static void ConvertNumLockKeys ( );
  237. + #endif
  238.   /* The timestamp of the last button or key event used by emacs itself.
  239.      This is used for asserting selections and input focus. */
  240.   Time mouse_timestamp;
  241. ***************
  242. *** 376,381 ****
  243. --- 380,464 ----
  244.   
  245.   static XComposeStatus *x_compose_status;
  246.   
  247. + #ifdef SPECIAL_NUM_LOCK_BEHAVIOR
  248. + static void ConvertNumLockKeys ( KeySym *keysym, XKeyEvent *xKey )
  249. + {
  250. +     if ( ( xKey->state & NUM_LOCK_MODIFIER ) == NUM_LOCK_MODIFIER )             /* Num Lock is on in here. */
  251. +     {
  252. +         switch ( *keysym )                                                      /* Now, only change keypad keys. */
  253. +         {
  254. +             /*******************************************************************/
  255. +             /* Here we convert keypad keysyms to numeric keysyms.              */
  256. +             /*******************************************************************/
  257. +             case XK_KP_0:
  258. +             {
  259. +                 *keysym = XK_0;
  260. +                 break;
  261. +             }
  262. +             case XK_KP_1:
  263. +             {
  264. +                 *keysym = XK_1;
  265. +                 break;
  266. +             }
  267. +             case XK_KP_2:
  268. +             {
  269. +                 *keysym = XK_2;
  270. +                 break;
  271. +             }
  272. +             case XK_KP_3:
  273. +             {
  274. +                 *keysym = XK_3;
  275. +                 break;
  276. +             }
  277. +             case XK_KP_4:
  278. +             {
  279. +                 *keysym = XK_4;
  280. +                 break;
  281. +             }
  282. +             case XK_KP_5:
  283. +             {
  284. +                 *keysym = XK_5;
  285. +                 break;
  286. +             }
  287. +             case XK_KP_6:
  288. +             {
  289. +                 *keysym = XK_6;
  290. +                 break;
  291. +             }
  292. +             case XK_KP_7:
  293. +             {
  294. +                 *keysym = XK_7;
  295. +                 break;
  296. +             }
  297. +             case XK_KP_8:
  298. +             {
  299. +                 *keysym = XK_8;
  300. +                 break;
  301. +             }
  302. +             case XK_KP_9:
  303. +             {
  304. +                 *keysym = XK_9;
  305. +                 break;
  306. +             }
  307. +             case XK_KP_Decimal:
  308. +             {
  309. +                 *keysym = XK_period;
  310. +                 break;
  311. +             }
  312. +         }
  313. +     }
  314. + }
  315. + #endif
  316.   static Lisp_Object
  317.   x_to_emacs_keysym (event, simple_p)
  318.        XEvent *event;
  319. ***************
  320. *** 388,393 ****
  321. --- 471,480 ----
  322.     XLookupString (&event->xkey, 0, 0, &keysym, x_compose_status);
  323.     UNBLOCK_INPUT;
  324.     
  325. + #ifdef SPECIAL_NUM_LOCK_BEHAVIOR
  326. +   ConvertNumLockKeys ( &keysym, &event->xkey );
  327. + #endif
  328.     if (keysym >= XK_exclam && keysym <= XK_asciitilde)
  329.       /* We must assume that the X keysym numbers for the ASCII graphic
  330.          characters are the same as their ASCII codes.  */
  331. =====>8 Cut here and enjoy? 8<=====
  332. -- 
  333. ===============================================================================
  334. The opinions expressed above are those of Bob Hays and not SPSS, Inc.
  335.  bobhays@spss.com  Phone: (312) 329-3529 | "I do not remember the anal probe"
  336.                    Fax:   (312) 329-3657 |  - Passion Fish
  337.  
  338.