home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / f / fix-10.zip / FIX-10 next >
Text File  |  1993-01-27  |  86KB  |  3,017 lines

  1.               Release 5 Public Patch #10
  2.                MIT X Consortium
  3.  
  4. To apply this patch:
  5.  
  6. cd to the top of the source tree (to the directory containing the "mit"
  7. and "contrib" subdirectories) and do:
  8.     patch -p -s < ThisFile
  9. Patch will work silently unless an error occurs.
  10. If you want to watch patch do its thing, leave out the "-s" argument to patch.
  11.  
  12. If you are running SunOS 4.1.2, change OSTeenyVersion in mit/config/sun.cf to
  13. have a value of 2.
  14.  
  15. Finally, to rebuild after applying this patch, cd to the "mit" subdirectory
  16. and do (if you are on a Sun running SunOS 4.1.2, or are running SunOS 4.1.1
  17. and have set SunPost411FCSLd to YES (see Patch #9)):
  18.     make Everything >& every.log
  19. or do (if you are on an SGI or Cray):
  20.     make Everything >& every.log
  21. otherwise do:
  22.     make -k >& make.log
  23.  
  24. Brief notes on what this patch fixes:
  25.  
  26. config: new SunOS ld (post-4.1.1 or 4.1.2) is still causing stupid problems
  27. Xlib: XrmGetQSearchList fails if db has only terminal resources
  28. Xlib: _XcmsResolveColorString fails to apply white adjust procedure
  29. Xlib: CIELuv conversion sometimes off by factor of 100
  30. Xlib: XListFonts gets lost if font name length >= 128 chars
  31. Xlib: GC flushing doesn't give extension access to dirty bits
  32. Xlib: (Xsi) XCreateFontSet doesn't free work area
  33. Xlib: (Xsi) XwcLookupString discards partial conversions
  34. Xlib: (Xsi) XOpenIM fails when network is disabled
  35. Xlib: (Xsi) UDC area incorrect in ja_JP.ujis
  36. Xlib: (Xsi) cannot draw JISX0212/CNS11643 2nd plane character
  37. Xlib: (Ximp) XGetICValues wrong for Area, AreaNeeded, SpotLocation
  38. Xlib: (Ximp) error in parsing CT extended segment
  39. Xt: shell RootGeometryManager missing resize in GeometryDone case
  40. Xt: shell RootGeometryManager does not implement Done semantics
  41. Xt: caching of failed conversions causes problems
  42. Xt: SetValues on override and transient resources has problems
  43. Xt: fails to set some WM_NORMAL_HINTS fields to reasonable values
  44. Xt: event handler setting cont_to_dispatch = False does not stop TM actions
  45. Xt: hangs while parsing certain translations
  46. Xt: fails to parse productions with event count and detail
  47. Xt: fails parsing translations with atom details on multiple displays
  48. Xt: obscure typo involving converters & multiple application contexts
  49. Xaw: Panner realize method envelops superclass method incorrectly
  50. xterm: public patch 9 introduced SGI pty problems
  51. xterm: fails to update menu when keyboard grab is forcibly deactivated
  52. xterm: ESC seq not updating App Cursor Keys menu
  53. xterm: restore ESC seq not updating Margin Bell menu
  54. xauth: use of getchar fails on some systems
  55. editres: will sometimes refuse to pop up the resource box
  56.  
  57.  
  58. Prereq: public-patch-9
  59.  
  60. *** /tmp/,RCSt1001439    Wed Mar 18 12:16:10 1992
  61. --- mit/bug-report    Wed Mar 18 12:16:45 1992
  62. ***************
  63. *** 2,8 ****
  64.   Subject: [area]: [synopsis]   [replace with actual area and short description]
  65.   
  66.   VERSION:
  67. !     R5, public-patch-9
  68.       [MIT public patches will edit this line to indicate the patch level]
  69.   
  70.   CLIENT MACHINE and OPERATING SYSTEM:
  71. --- 2,8 ----
  72.   Subject: [area]: [synopsis]   [replace with actual area and short description]
  73.   
  74.   VERSION:
  75. !     R5, public-patch-10
  76.       [MIT public patches will edit this line to indicate the patch level]
  77.   
  78.   CLIENT MACHINE and OPERATING SYSTEM:
  79. *** /tmp/,RCSt1001488    Wed Mar 18 13:14:29 1992
  80. --- mit/config/sun.cf    Wed Mar 18 13:14:30 1992
  81. ***************
  82. *** 1,9 ****
  83. ! XCOMM platform:  $XConsortium: sun.cf,v 1.71 91/12/20 11:18:34 rws Exp $
  84.   
  85.   #define OSName            SunOS 4.1.1
  86.   XCOMM operating system:  OSName
  87.   #define OSMajorVersion    4
  88.   #define OSMinorVersion    1
  89.   
  90.   #if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
  91.   /* We do not guarantee this will work */
  92. --- 1,10 ----
  93. ! XCOMM platform:  $XConsortium: sun.cf,v 1.72.1.1 92/03/18 13:13:37 rws Exp $
  94.   
  95.   #define OSName            SunOS 4.1.1
  96.   XCOMM operating system:  OSName
  97.   #define OSMajorVersion    4
  98.   #define OSMinorVersion    1
  99. + #define OSTeenyVersion    1
  100.   
  101.   #if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
  102.   /* We do not guarantee this will work */
  103. ***************
  104. *** 11,18 ****
  105.   #define StandardDefines   -DNOSTDHDRS
  106.   #endif
  107.   
  108. ! /* You ALSO need this if you have Sun ld patch 100170-06 to 4.1.1 */
  109. ! #if OSMajorVersion == 4 && OSMinorVersion > 1
  110.   #define SunPost411FCSLd      YES
  111.   #endif
  112.   
  113. --- 12,19 ----
  114.   #define StandardDefines   -DNOSTDHDRS
  115.   #endif
  116.   
  117. ! /* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
  118. ! #if OSMajorVersion == 4 && (OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1))
  119.   #define SunPost411FCSLd      YES
  120.   #endif
  121.   
  122. *** /tmp/,RCSt1000717    Tue Mar 17 14:59:21 1992
  123. --- mit/config/sunLib.tmpl    Tue Mar 17 14:59:24 1992
  124. ***************
  125. *** 1,4 ****
  126. ! XCOMM $XConsortium: sunLib.tmpl,v 1.14 91/12/20 11:19:05 rws Exp $
  127.   
  128.   /*
  129.    * SunOS shared library template
  130. --- 1,4 ----
  131. ! XCOMM $XConsortium: sunLib.tmpl,v 1.14.1.1 92/03/17 14:58:46 rws Exp $
  132.   
  133.   /*
  134.    * SunOS shared library template
  135. ***************
  136. *** 48,54 ****
  137.   /* Sun shared libraries are deficient in link semantics */
  138.           DEPXMULIB = _UseCat($(USRLIBDIR),$(XMUSRC),/libXmu.sa.$(SOXMUREV))
  139.          XMULIBONLY = _Use(-lXmu,-L$(XMUSRC) -lXmu)
  140. !            XMULIB = _Use(-lXmu,-L$(XMUSRC) -lXmu -L$(TOOLKITSRC))
  141.   #if !defined(UseInstalled) && !defined(XawClientLibs)
  142.   #define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
  143.   #endif
  144. --- 48,54 ----
  145.   /* Sun shared libraries are deficient in link semantics */
  146.           DEPXMULIB = _UseCat($(USRLIBDIR),$(XMUSRC),/libXmu.sa.$(SOXMUREV))
  147.          XMULIBONLY = _Use(-lXmu,-L$(XMUSRC) -lXmu)
  148. !            XMULIB = _Use(-lXmu,-L$(XMUSRC) -lXmu -L$(TOOLKITSRC) -L$(EXTENSIONSRC)/lib -L$(XLIBSRC))
  149.   #if !defined(UseInstalled) && !defined(XawClientLibs)
  150.   #define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
  151.   #endif
  152. *** /tmp/,RCSt1029830    Tue Mar 17 11:34:54 1992
  153. --- mit/lib/X/Xrm.c    Fri Jan 10 17:25:50 1992
  154. ***************
  155. *** 1,5 ****
  156.   /*
  157. !  * $XConsortium: Xrm.c,v 1.70 91/11/21 19:18:45 rws Exp $
  158.    */
  159.   
  160.   /***********************************************************
  161. --- 1,5 ----
  162.   /*
  163. !  * $XConsortium: Xrm.c,v 1.72 92/01/10 14:21:12 rws Exp $
  164.    */
  165.   
  166.   /***********************************************************
  167. ***************
  168. *** 1004,1009 ****
  169. --- 1004,1010 ----
  170.    *    Arguments: db - the database.
  171.    *                 str - a pointer to the string containing the database.
  172.    *                 filename - source filename, if any.
  173. +  *                 doall - whether to do all lines or just one
  174.    */
  175.   
  176.   /*
  177. ***************
  178. *** 1019,1028 ****
  179.   
  180.   static void GetIncludeFile();
  181.   
  182. ! static void GetDatabase(db, str, filename)
  183.       XrmDatabase db;
  184.       register char *str;
  185.       char *filename;
  186.   {
  187.       register char *ptr;
  188.       register XrmBits bits = 0;
  189. --- 1020,1030 ----
  190.   
  191.   static void GetIncludeFile();
  192.   
  193. ! static void GetDatabase(db, str, filename, doall)
  194.       XrmDatabase db;
  195.       register char *str;
  196.       char *filename;
  197. +     Bool doall;
  198.   {
  199.       register char *ptr;
  200.       register XrmBits bits = 0;
  201. ***************
  202. *** 1039,1044 ****
  203. --- 1041,1047 ----
  204.       XrmBinding bindings[LIST_SIZE];
  205.       XrmValue value;
  206.       Bool only_pcs;
  207. +     Bool dolines;
  208.   
  209.       if (!db)
  210.       return;
  211. ***************
  212. *** 1048,1054 ****
  213.   
  214.       (*db->methods->mbinit)(db->mbstate);
  215.       str--;
  216. !     while (!is_EOF(bits)) {
  217.   
  218.       /*
  219.        * First: Remove extra whitespace. 
  220. --- 1051,1059 ----
  221.   
  222.       (*db->methods->mbinit)(db->mbstate);
  223.       str--;
  224. !     dolines = True;
  225. !     while (!is_EOF(bits) && dolines) {
  226. !     dolines = doall;
  227.   
  228.       /*
  229.        * First: Remove extra whitespace. 
  230. ***************
  231. *** 1441,1447 ****
  232.   #endif
  233.   {
  234.       if (!*pdb) *pdb = NewDatabase();
  235. !     GetDatabase(*pdb, line, (char *)NULL);
  236.   }
  237.   
  238.   #if NeedFunctionPrototypes
  239. --- 1446,1452 ----
  240.   #endif
  241.   {
  242.       if (!*pdb) *pdb = NewDatabase();
  243. !     GetDatabase(*pdb, line, (char *)NULL, False);
  244.   }
  245.   
  246.   #if NeedFunctionPrototypes
  247. ***************
  248. *** 1455,1461 ****
  249.       XrmDatabase     db;
  250.   
  251.       db = NewDatabase();
  252. !     GetDatabase(db, data, (char *)NULL);
  253.       return db;
  254.   }
  255.   
  256. --- 1460,1466 ----
  257.       XrmDatabase     db;
  258.   
  259.       db = NewDatabase();
  260. !     GetDatabase(db, data, (char *)NULL, True);
  261.       return db;
  262.   }
  263.   
  264. ***************
  265. *** 1520,1526 ****
  266.       }
  267.       if (!(str = ReadInFile(realfname)))
  268.       return;
  269. !     GetDatabase(db, str, realfname);
  270.       Xfree(str);
  271.   }
  272.   
  273. --- 1525,1531 ----
  274.       }
  275.       if (!(str = ReadInFile(realfname)))
  276.       return;
  277. !     GetDatabase(db, str, realfname, True);
  278.       Xfree(str);
  279.   }
  280.   
  281. ***************
  282. *** 1539,1545 ****
  283.       return (XrmDatabase)NULL;
  284.   
  285.       db = NewDatabase();
  286. !     GetDatabase(db, str, filename);
  287.       Xfree(str);
  288.       return db;
  289.   }
  290. --- 1544,1550 ----
  291.       return (XrmDatabase)NULL;
  292.   
  293.       db = NewDatabase();
  294. !     GetDatabase(db, str, filename, True);
  295.       Xfree(str);
  296.       return db;
  297.   }
  298. ***************
  299. *** 1567,1573 ****
  300.           *target = db = NewDatabase();
  301.       } else
  302.       db = NewDatabase();
  303. !     GetDatabase(db, str, filename);
  304.       Xfree(str);
  305.       if (!override)
  306.       XrmCombineDatabase(db, target, False);
  307. --- 1572,1578 ----
  308.           *target = db = NewDatabase();
  309.       } else
  310.       db = NewDatabase();
  311. !     GetDatabase(db, str, filename, True);
  312.       Xfree(str);
  313.       if (!override)
  314.       XrmCombineDatabase(db, target, False);
  315. ***************
  316. *** 2127,2134 ****
  317.       if (db) {
  318.       table = db->table;
  319.       if (*names) {
  320. !         if (table && !table->leaf &&
  321. !         SearchNEntry(table, names, classes, &closure))
  322.           return False;
  323.       } else {
  324.           if (table && !table->leaf)
  325. --- 2132,2143 ----
  326.       if (db) {
  327.       table = db->table;
  328.       if (*names) {
  329. !         if (table && !table->leaf) {
  330. !         if (SearchNEntry(table, names, classes, &closure))
  331. !             return False;
  332. !         } else if (table && table->hasloose &&
  333. !                AppendLooseLEntry((LTable)table, names, classes,
  334. !                      &closure))
  335.           return False;
  336.       } else {
  337.           if (table && !table->leaf)
  338. ***************
  339. *** 2393,2402 ****
  340.           if (table && !table->leaf) {
  341.           if (GetNEntry(table, names, classes, &closure))
  342.               return True;
  343. !         table = table->next;
  344. !         }
  345. !         if (table && table->hasloose &&
  346. !         GetLooseVEntry((LTable)table, names, classes, &closure))
  347.           return True;
  348.       } else {
  349.           if (table && !table->leaf)
  350. --- 2402,2409 ----
  351.           if (table && !table->leaf) {
  352.           if (GetNEntry(table, names, classes, &closure))
  353.               return True;
  354. !         } else if (table && table->hasloose &&
  355. !                GetLooseVEntry((LTable)table, names, classes, &closure))
  356.           return True;
  357.       } else {
  358.           if (table && !table->leaf)
  359. *** /tmp/,RCSt1000469    Tue Mar 17 12:04:43 1992
  360. --- mit/lib/X/CIELuv.c    Tue Mar  3 14:16:34 1992
  361. ***************
  362. *** 1,4 ****
  363. ! /* $XConsortium: CIELuv.c,v 1.9 91/07/25 01:07:28 rws Exp $" */
  364.   
  365.   /*
  366.    * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
  367. --- 1,4 ----
  368. ! /* $XConsortium: CIELuv.c,v 1.10 92/03/03 14:15:02 rws Exp $" */
  369.   
  370.   /*
  371.    * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
  372. ***************
  373. *** 366,372 ****
  374.       Luv_return.L_star = 
  375.           (pColor->spec.CIEuvY.Y < 0.008856)
  376.           ?
  377. !         (pColor->spec.CIEuvY.Y * 9.0329)
  378.           :
  379.           ((XcmsFloat)(XCMS_CUBEROOT(pColor->spec.CIEuvY.Y) * 116.0) - 16.0);
  380.       tmpVal = 13.0 * (Luv_return.L_star / 100.0);
  381. --- 366,372 ----
  382.       Luv_return.L_star = 
  383.           (pColor->spec.CIEuvY.Y < 0.008856)
  384.           ?
  385. !         (pColor->spec.CIEuvY.Y * 903.29)
  386.           :
  387.           ((XcmsFloat)(XCMS_CUBEROOT(pColor->spec.CIEuvY.Y) * 116.0) - 16.0);
  388.       tmpVal = 13.0 * (Luv_return.L_star / 100.0);
  389. *** /tmp/,RCSt1000489    Tue Mar 17 12:06:40 1992
  390. --- mit/lib/X/XFontNames.c    Tue Mar  3 14:22:26 1992
  391. ***************
  392. *** 1,4 ****
  393. ! /* $XConsortium: XFontNames.c,v 11.25 91/01/29 08:39:45 rws Exp $ */
  394.   /* Copyright    Massachusetts Institute of Technology    1986    */
  395.   
  396.   /*
  397. --- 1,4 ----
  398. ! /* $XConsortium: XFontNames.c,v 11.26 92/03/03 14:21:22 rws Exp $ */
  399.   /* Copyright    Massachusetts Institute of Technology    1986    */
  400.   
  401.   /*
  402. ***************
  403. *** 68,79 ****
  404.       /*
  405.        * unpack into null terminated strings.
  406.        */
  407. !     length = *ch;
  408.       *ch = 1; /* make sure it is non-zero for XFreeFontNames */
  409.       for (i = 0; i < rep.nFonts; i++) {
  410.           flist[i] = ch + 1;  /* skip over length */
  411.           ch += length + 1;  /* find next length ... */
  412. !         length = *ch;
  413.           *ch = '\0';  /* and replace with null-termination */
  414.       }
  415.       }
  416. --- 68,79 ----
  417.       /*
  418.        * unpack into null terminated strings.
  419.        */
  420. !     length = *(unsigned char *)ch;
  421.       *ch = 1; /* make sure it is non-zero for XFreeFontNames */
  422.       for (i = 0; i < rep.nFonts; i++) {
  423.           flist[i] = ch + 1;  /* skip over length */
  424.           ch += length + 1;  /* find next length ... */
  425. !         length = *(unsigned char *)ch;
  426.           *ch = '\0';  /* and replace with null-termination */
  427.       }
  428.       }
  429. *** /tmp/,RCSt1000509    Tue Mar 17 12:07:37 1992
  430. --- mit/lib/X/XCrGC.c    Wed Mar  4 09:23:07 1992
  431. ***************
  432. *** 1,4 ****
  433. ! /* $XConsortium: XCrGC.c,v 11.36 91/04/14 13:53:01 rws Exp $ */
  434.   /* Copyright    Massachusetts Institute of Technology    1986    */
  435.   
  436.   /*
  437. --- 1,4 ----
  438. ! /* $XConsortium: XCrGC.c,v 11.38 92/03/04 09:22:18 rws Exp $ */
  439.   /* Copyright    Massachusetts Institute of Technology    1986    */
  440.   
  441.   /*
  442. ***************
  443. *** 47,52 ****
  444. --- 47,54 ----
  445.       4        /* dashes (list [4,4]) */
  446.   };
  447.   
  448. + static void _XGenerateGCList();
  449.   GC XCreateGC (dpy, d, valuemask, values)
  450.        register Display *dpy;
  451.        Drawable d;        /* Window or Pixmap for which depth matches */
  452. ***************
  453. *** 80,88 ****
  454.           _XGenerateGCList (dpy, gc, (xReq *) req);
  455.       ext = dpy->ext_procs;
  456.       while (ext) {        /* call out to any extensions interested */
  457. !     if (ext->create_GC != NULL) (*ext->create_GC)(dpy, gc, &ext->codes);
  458.       ext = ext->next;
  459.       }    
  460.       UnlockDisplay(dpy);
  461.       SyncHandle();
  462.       return (gc);
  463. --- 82,91 ----
  464.           _XGenerateGCList (dpy, gc, (xReq *) req);
  465.       ext = dpy->ext_procs;
  466.       while (ext) {        /* call out to any extensions interested */
  467. !     if (ext->create_GC) (*ext->create_GC)(dpy, gc, &ext->codes);
  468.       ext = ext->next;
  469.       }    
  470. +     gc->dirty = 0L; /* allow extensions to see dirty bits */
  471.       UnlockDisplay(dpy);
  472.       SyncHandle();
  473.       return (gc);
  474. ***************
  475. *** 90,99 ****
  476.   
  477.   /*
  478.    * GenerateGCList looks at the GC dirty bits, and appends all the required
  479. !  * long words to the request being generated.  Clears the dirty bits in
  480. !  * the GC.
  481.    */
  482.   
  483.   _XGenerateGCList (dpy, gc, req)
  484.       register Display *dpy;
  485.       xReq *req;
  486. --- 93,102 ----
  487.   
  488.   /*
  489.    * GenerateGCList looks at the GC dirty bits, and appends all the required
  490. !  * long words to the request being generated.
  491.    */
  492.   
  493. + static void
  494.   _XGenerateGCList (dpy, gc, req)
  495.       register Display *dpy;
  496.       xReq *req;
  497. ***************
  498. *** 145,151 ****
  499.   
  500.       nvalues <<= 2;
  501.       Data32 (dpy, (long *) values, nvalues);
  502. -     gc->dirty = 0L;
  503.   
  504.       }
  505.   
  506. --- 148,153 ----
  507. ***************
  508. *** 315,323 ****
  509.           _XGenerateGCList (dpy, gc, (xReq *) req);
  510.       ext = dpy->ext_procs;
  511.       while (ext) {        /* call out to any extensions interested */
  512. !         if (ext->flush_GC != NULL) (*ext->flush_GC)(dpy, gc, &ext->codes);
  513.           ext = ext->next;
  514.       }    
  515.       }
  516.   }
  517.   
  518. --- 317,326 ----
  519.           _XGenerateGCList (dpy, gc, (xReq *) req);
  520.       ext = dpy->ext_procs;
  521.       while (ext) {        /* call out to any extensions interested */
  522. !         if (ext->flush_GC) (*ext->flush_GC)(dpy, gc, &ext->codes);
  523.           ext = ext->next;
  524.       }    
  525. +     gc->dirty = 0L; /* allow extensions to see dirty bits */
  526.       }
  527.   }
  528.   
  529. *** /tmp/,RCSt1000428    Tue Mar 17 12:02:16 1992
  530. --- mit/lib/X/XcmsColNm.c    Tue Mar  3 12:17:04 1992
  531. ***************
  532. *** 1,4 ****
  533. ! /* $XConsortium: XcmsColNm.c,v 1.24 91/11/06 17:55:19 rws Exp $" */
  534.   
  535.   /*
  536.    * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
  537. --- 1,4 ----
  538. ! /* $XConsortium: XcmsColNm.c,v 1.25 92/03/03 12:16:07 rws Exp $" */
  539.   
  540.   /*
  541.    * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
  542. ***************
  543. *** 1014,1022 ****
  544.               ScreenWhitePointOfCCC(ccc), result_format,
  545.               pColor_exact_return, 1, (Bool *)NULL));
  546.           } else {
  547. !         if (_XcmsDIConvertColors(ccc, pColor_exact_return,
  548. !             &dbWhitePt, 1, XcmsCIEXYZFormat) == XcmsFailure) {
  549. !             return(XcmsFailure);
  550.           }
  551.           return (_XcmsDDConvertColors(ccc, pColor_exact_return, 1,
  552.               result_format, (Bool *)NULL));
  553. --- 1014,1024 ----
  554.               ScreenWhitePointOfCCC(ccc), result_format,
  555.               pColor_exact_return, 1, (Bool *)NULL));
  556.           } else {
  557. !         if (pColor_exact_return->format != XcmsCIEXYZFormat) {
  558. !             if (_XcmsDIConvertColors(ccc, pColor_exact_return,
  559. !                 &dbWhitePt, 1, XcmsCIEXYZFormat) == XcmsFailure) {
  560. !             return(XcmsFailure);
  561. !             }
  562.           }
  563.           return (_XcmsDDConvertColors(ccc, pColor_exact_return, 1,
  564.               result_format, (Bool *)NULL));
  565. ***************
  566. *** 1025,1044 ****
  567.           /*
  568.            * Target format is Device-Independent
  569.            *    Therefore, DI --> DI conversion
  570. -          *
  571. -          * Since DI->DI, we don't apply WhiteAdjustProc.
  572.            */
  573. !         if (_XcmsEqualWhitePts(ccc,
  574.               &dbWhitePt, pClientWhitePt)) {
  575. !         return (_XcmsDIConvertColors(ccc, pColor_exact_return,
  576. !             &dbWhitePt, 1, result_format));
  577.           } else {
  578. !         if (_XcmsDIConvertColors(ccc, pColor_exact_return,
  579. !             &dbWhitePt, 1, XcmsCIEXYZFormat) == XcmsFailure) {
  580. !             return(XcmsFailure);
  581.           }
  582. !         return(_XcmsDIConvertColors(ccc, pColor_exact_return,
  583. !             pClientWhitePt, 1, result_format));
  584.           }
  585.       }
  586.       }
  587. --- 1027,1080 ----
  588.           /*
  589.            * Target format is Device-Independent
  590.            *    Therefore, DI --> DI conversion
  591.            */
  592. !         if (ccc->whitePtAdjProc && !_XcmsEqualWhitePts(ccc,
  593.               &dbWhitePt, pClientWhitePt)) {
  594. !         /*
  595. !          * The calling routine wants to resolve this color
  596. !          * in terms if it's white point (i.e. Client White Point).
  597. !          * Therefore, apply white adjustment for the displacement
  598. !          * between dbWhitePt to clientWhitePt.
  599. !          */
  600. !         return((*ccc->whitePtAdjProc)(ccc, &dbWhitePt,
  601. !             pClientWhitePt, result_format,
  602. !             pColor_exact_return, 1, (Bool *)NULL));
  603. !         } else if (_XcmsEqualWhitePts(ccc,
  604. !             &dbWhitePt, pClientWhitePt)) {
  605. !         /*
  606. !          * Can use either dbWhitePt or pClientWhitePt to
  607. !          * convert to the result_format.
  608. !          */
  609. !         if (pColor_exact_return->format == result_format) {
  610. !             return(XcmsSuccess);
  611. !         } else {
  612. !             return (_XcmsDIConvertColors(ccc, pColor_exact_return,
  613. !                 &dbWhitePt, 1, result_format));
  614. !         }
  615.           } else {
  616. !         /*
  617. !          * Need to convert to a white point independent color
  618. !          * space (let's choose CIEXYZ) then convert to the
  619. !          * target color space.  Why? Lets assume that
  620. !          * pColor_exact_return->format and result format
  621. !          * are white point dependent format (e.g., CIELUV, CIELAB,
  622. !          * TekHVC ... same or any combination). If so, we'll
  623. !          * need to convert the color with dbWhitePt to an absolute
  624. !          * spec (i.e.  non-white point dependent) then convert that
  625. !          * absolute value with clientWhitePt to the result_format.
  626. !          */
  627. !         if (pColor_exact_return->format != XcmsCIEXYZFormat) {
  628. !             if (_XcmsDIConvertColors(ccc, pColor_exact_return,
  629. !                 &dbWhitePt, 1, XcmsCIEXYZFormat) == XcmsFailure) {
  630. !             return(XcmsFailure);
  631. !             }
  632.           }
  633. !         if (result_format == XcmsCIEXYZFormat) {
  634. !             return(XcmsSuccess);
  635. !         } else {
  636. !             return(_XcmsDIConvertColors(ccc, pColor_exact_return,
  637. !                 pClientWhitePt, 1, result_format));
  638. !         }
  639.           }
  640.       }
  641.       }
  642. *** /tmp/,RCSt1000153    Tue Mar 17 11:52:11 1992
  643. --- mit/lib/X/Xsi/ProtoFlt.c    Tue Mar  3 10:02:26 1992
  644. ***************
  645. *** 1,5 ****
  646.   /*
  647. !  * $XConsortium: ProtoFlt.c,v 1.25 91/12/02 16:50:26 rws Exp $
  648.    */
  649.   
  650.   /*
  651. --- 1,5 ----
  652.   /*
  653. !  * $XConsortium: ProtoFlt.c,v 1.26 92/03/03 10:01:17 rws Exp $
  654.    */
  655.   
  656.   /*
  657. ***************
  658. *** 95,101 ****
  659.           ret = _XConvertCTToMB(ic->mb, (unsigned char *)ic->ct_buf, length,
  660.                     mbuf, &mb_len, &scanned_bytes,
  661.                     (_State *)NULL);
  662. !         if (ret == Success) {
  663.   #ifdef macII
  664.           wc_len = 0;
  665.   #else
  666. --- 95,101 ----
  667.           ret = _XConvertCTToMB(ic->mb, (unsigned char *)ic->ct_buf, length,
  668.                     mbuf, &mb_len, &scanned_bytes,
  669.                     (_State *)NULL);
  670. !         if (ret >= 0) {
  671.   #ifdef macII
  672.           wc_len = 0;
  673.   #else
  674. ***************
  675. *** 106,112 ****
  676.               return;
  677.           }
  678.   #endif
  679. !         if (ret != Success) {
  680.           return;
  681.           }
  682.       } else {
  683. --- 106,112 ----
  684.               return;
  685.           }
  686.   #endif
  687. !         if (ret < 0) {
  688.           return;
  689.           }
  690.       } else {
  691. ***************
  692. *** 256,262 ****
  693.           ret = _XConvertCTToMB(ic->mb, (unsigned char *)ic->ct_buf,
  694.                         length, mbuf, &mb_len, &scanned_bytes,
  695.                         (_State *)NULL);
  696. !         if (ret == Success) {
  697.   #ifdef macII
  698.               wc_len = 0;
  699.   #else
  700. --- 256,262 ----
  701.           ret = _XConvertCTToMB(ic->mb, (unsigned char *)ic->ct_buf,
  702.                         length, mbuf, &mb_len, &scanned_bytes,
  703.                         (_State *)NULL);
  704. !         if (ret >= 0) {
  705.   #ifdef macII
  706.               wc_len = 0;
  707.   #else
  708. ***************
  709. *** 267,273 ****
  710.               return;
  711.           }
  712.   #endif
  713. !         if (ret != Success) {
  714.               return;
  715.           }
  716.           } else {
  717. --- 267,273 ----
  718.               return;
  719.           }
  720.   #endif
  721. !         if (ret < 0) {
  722.               return;
  723.           }
  724.           } else {
  725. *** /tmp/,RCSt1000172    Tue Mar 17 11:52:21 1992
  726. --- mit/lib/X/Xsi/XConnIM.c    Tue Mar  3 10:03:10 1992
  727. ***************
  728. *** 1,5 ****
  729.   /*
  730. !  * $XConsortium: XConnIM.c,v 1.16 91/08/12 17:22:22 rws Exp $
  731.    */
  732.   
  733.   /*
  734. --- 1,5 ----
  735.   /*
  736. !  * $XConsortium: XConnIM.c,v 1.17 92/03/03 10:02:09 rws Exp $
  737.    */
  738.   
  739.   /*
  740. ***************
  741. *** 61,69 ****
  742.       im->fd = -1;
  743.       return(False);
  744.   #else
  745. - #ifdef    UNIXCONN
  746. -     char        hostname[256];    /* My host name buffer */
  747. - #endif
  748.       char        im_hostname[256];/* Input manager host name buffer */
  749.       Atom        actual_type;
  750.       int            actual_format;
  751. --- 61,66 ----
  752. ***************
  753. *** 84,89 ****
  754. --- 81,87 ----
  755.       ximNormalReply    reply;
  756.       unsigned long    i;
  757.       unsigned short    s;
  758. +     int            inet_ok = 0;
  759.   
  760.       im->fd = -1;
  761.       /*
  762. ***************
  763. *** 109,123 ****
  764.       if (im->major_version != XIM_MAJOR_VERSION) return(False);
  765.       if (!(im->minor_version >= XIM_MINOR_VERSION)) return(False);
  766.   
  767. ! #ifdef    UNIXCONN
  768. !     if (gethostname(hostname, 256) < 0) {
  769. !     hostname[0] = '\0';
  770.       }
  771.       /*
  772. !      * If the hostname of gethostname is null or the hostname of the input
  773. !      * manager is null, attempts to open UNIX domain socket.
  774.        */
  775. !     if ((hostname[0] == '\0') || (im_hostname[0] == '\0')) {
  776.       saddr.sun_family = AF_UNIX;
  777.       strcpy(saddr.sun_path, XIM_UNIX_PATH);
  778.       if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
  779. --- 107,136 ----
  780.       if (im->major_version != XIM_MAJOR_VERSION) return(False);
  781.       if (!(im->minor_version >= XIM_MINOR_VERSION)) return(False);
  782.   
  783. ! #ifdef TCPCONN
  784. !     /*
  785. !      * Attempts to open INET domain socket.
  786. !      */
  787. !     if (hp = gethostbyname(im_hostname)) {
  788. !     bzero((char *)&saddr_in, (int)sizeof(saddr_in));
  789. !     bcopy(hp->h_addr, (char *)&saddr_in.sin_addr, hp->h_length);
  790. !     saddr_in.sin_family = AF_INET;
  791. !     saddr_in.sin_port = htons(port);
  792. !     if ((sd = socket(AF_INET, SOCK_STREAM, 0)) >= 0) {
  793. !         if (connect(sd, &saddr_in, sizeof(saddr_in)) >= 0) {
  794. !         inet_ok = 1;
  795. !         } else {
  796. !         close(sd);
  797. !         sd = -1;
  798. !         }
  799. !     }
  800.       }
  801. + #endif
  802. + #ifdef    UNIXCONN
  803.       /*
  804. !      * Attempts to open UNIX domain socket.
  805.        */
  806. !     if (inet_ok == 0) {
  807.       saddr.sun_family = AF_UNIX;
  808.       strcpy(saddr.sun_path, XIM_UNIX_PATH);
  809.       if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
  810. ***************
  811. *** 127,156 ****
  812.           close(sd);
  813.           return(False);
  814.       }
  815. -     } else {
  816. - #endif    /* UNIXCONN */
  817. - #ifdef TCPCONN
  818. -     /*
  819. -      * Attempts to open INET domain socket.
  820. -      */
  821. -     if ((hp = gethostbyname(im_hostname)) == NULL) {
  822. -         return(False);
  823. -     }
  824. -     bzero((char *)&saddr_in, (int)sizeof(saddr_in));
  825. -     bcopy(hp->h_addr, (char *)&saddr_in.sin_addr, hp->h_length);
  826. -     saddr_in.sin_family = AF_INET;
  827. -     saddr_in.sin_port = htons(port);
  828. -     if ((sd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
  829. -         return(False);
  830. -     }
  831. -     if (connect(sd, &saddr_in, sizeof(saddr_in)) < 0) {
  832. -         close(sd);
  833. -         return(False);
  834. -     }
  835. - #endif
  836. - #ifdef    UNIXCONN
  837.       }
  838.   #endif    /* UNIXCONN */
  839.   
  840.       /*
  841.        * Send the display name to the input manager. 
  842. --- 140,148 ----
  843.           close(sd);
  844.           return(False);
  845.       }
  846.       }
  847.   #endif    /* UNIXCONN */
  848. +     if (sd == -1) return(False);
  849.   
  850.       /*
  851.        * Send the display name to the input manager. 
  852. *** /tmp/,RCSt1000191    Tue Mar 17 11:52:32 1992
  853. --- mit/lib/X/Xsi/XCrFntSet.c    Tue Mar  3 10:01:24 1992
  854. ***************
  855. *** 1,5 ****
  856.   /*
  857. !  * $XConsortium: XCrFntSet.c,v 1.43 91/12/02 16:49:48 rws Exp $
  858.    */
  859.   
  860.   /*
  861. --- 1,5 ----
  862.   /*
  863. !  * $XConsortium: XCrFntSet.c,v 1.44 92/03/03 10:00:34 rws Exp $
  864.    */
  865.   
  866.   /*
  867. ***************
  868. *** 440,453 ****
  869.           if (matchCharset(fn, cset->cs_name, cset->cs_GLorGR) == True) {
  870.           dbg_printf("findFont: matched\n", 0, 0);
  871.           ret++;
  872. -         f_tmp[i] = fn;
  873.   #ifdef PRELOAD
  874.           if (!(s_tmp[i] = XLoadQueryFont(dpy, fn))) ret--;
  875.   #else /* PRELOAD */
  876.           if (!info)
  877.               list = XListFontsWithInfo(dpy, fname, 1, &count, &info);
  878. !         if(! (s_tmp[i] = (XFontStruct *) Xmalloc(sizeof(XFontStruct))))
  879.               return ret;
  880.   # ifndef MUSTCOPY
  881.           s_tmp[i] = info[0];
  882.   # else /* MUSTCOPY */
  883. --- 440,454 ----
  884.           if (matchCharset(fn, cset->cs_name, cset->cs_GLorGR) == True) {
  885.           dbg_printf("findFont: matched\n", 0, 0);
  886.           ret++;
  887.   #ifdef PRELOAD
  888.           if (!(s_tmp[i] = XLoadQueryFont(dpy, fn))) ret--;
  889.   #else /* PRELOAD */
  890.           if (!info)
  891.               list = XListFontsWithInfo(dpy, fname, 1, &count, &info);
  892. !         if(! (s_tmp[i] = (XFontStruct *) Xmalloc(sizeof(XFontStruct)))){
  893. !             Xfree((char *)fn);
  894.               return ret;
  895. +         }
  896.   # ifndef MUSTCOPY
  897.           s_tmp[i] = info[0];
  898.   # else /* MUSTCOPY */
  899. ***************
  900. *** 457,462 ****
  901. --- 458,468 ----
  902.           s_tmp[i]->fid = 0;
  903.   #endif /* PRELOAD */
  904.           id_tmp[i] = cset->cs_id;
  905. +         if(! (f_tmp[i] = (char *) Xmalloc(strlen(fn) + 1))) {
  906. +             Xfree((char *)fn);
  907. +             return --ret;
  908. +         }
  909. +         strcpy(f_tmp[i], fn);
  910.           } else {
  911.           f_tmp[i] = NULL;
  912.           }
  913. ***************
  914. *** 466,471 ****
  915. --- 472,478 ----
  916.       if (info) {
  917.       XFreeFontInfo(list, info, count);
  918.       }
  919. +     Xfree((char *)fn);
  920.       return ret;
  921.   
  922.   }
  923. ***************
  924. *** 678,684 ****
  925.       }
  926.   
  927.       if (!loadASCIIFONT) {
  928. !     f_tmp[0] = "fixed";    /* use defalt font */
  929.       s_tmp[0] = XLoadQueryFont(dpy, f_tmp[0]);
  930.       }
  931.   
  932. --- 685,693 ----
  933.       }
  934.   
  935.       if (!loadASCIIFONT) {
  936. !     if(! (f_tmp[0] = (char *)Xmalloc(strlen("fixed") + 1)))
  937. !         return NULL;
  938. !     strcpy(f_tmp[0], "fixed");    /* use defalt font */
  939.       s_tmp[0] = XLoadQueryFont(dpy, f_tmp[0]);
  940.       }
  941.   
  942. ***************
  943. *** 704,709 ****
  944. --- 713,721 ----
  945.                 &font_set->min_bounds, &font_set->max_bounds,
  946.                 &font_set->ascent, &font_set->descent);
  947.       font_set->core.default_string = NULL;
  948. +     for (i = 0; (int)i < found; i++) {
  949. +     Xfree((char *)f_tmp[i]);
  950. +     }
  951.   
  952.       /*
  953.        * set the ink bounding box of font_set.
  954. ***************
  955. *** 867,872 ****
  956. --- 879,887 ----
  957.                 &font_set->min_bounds, &font_set->max_bounds,
  958.                 &font_set->ascent, &font_set->descent);
  959.       font_set->core.default_string = NULL;
  960. +     for (i = 0; (int)i < found; i++) {
  961. +     Xfree((char *)f_tmp[i]);
  962. +     }
  963.   
  964.       /*
  965.        * set the ink bounding box of font_set.
  966. *** /tmp/,RCSt1000211    Tue Mar 17 11:52:41 1992
  967. --- mit/lib/X/Xsi/XIMKeyBind.c    Tue Mar  3 10:02:30 1992
  968. ***************
  969. *** 1,5 ****
  970.   /*
  971. !  * $XConsortium: XIMKeyBind.c,v 1.21 91/12/02 16:42:44 rws Exp $
  972.    */
  973.   
  974.   /*
  975. --- 1,5 ----
  976.   /*
  977. !  * $XConsortium: XIMKeyBind.c,v 1.22 92/03/03 10:01:53 rws Exp $
  978.    */
  979.   
  980.   /*
  981. ***************
  982. *** 67,73 ****
  983.           mbuf = _XAllocScratch(ev->display, ret_len);
  984.           ret = _XConvertCTToMB(ic->mb, ptr, length, mbuf,
  985.                     &ret_len, &scanned_bytes, (_State *)NULL);
  986. !         if (ret == Success) {
  987.   #ifdef macII
  988.           ret_len = 0;
  989.   #else
  990. --- 67,73 ----
  991.           mbuf = _XAllocScratch(ev->display, ret_len);
  992.           ret = _XConvertCTToMB(ic->mb, ptr, length, mbuf,
  993.                     &ret_len, &scanned_bytes, (_State *)NULL);
  994. !         if (ret >= 0) {
  995.   #ifdef macII
  996.           ret_len = 0;
  997.   #else
  998. ***************
  999. *** 78,84 ****
  1000.               ret = XBufferOverflow;
  1001.           }
  1002.   #endif
  1003. !         if (ret != Success) {
  1004.           *status = XBufferOverflow;
  1005.           return(0);
  1006.           }
  1007. --- 78,84 ----
  1008.               ret = XBufferOverflow;
  1009.           }
  1010.   #endif
  1011. !         if (ret < 0) {
  1012.           *status = XBufferOverflow;
  1013.           return(0);
  1014.           }
  1015. ***************
  1016. *** 104,112 ****
  1017.           }
  1018.   #ifdef X_WCHAR
  1019.           /* XXX BUG Need to save current status */
  1020. !         _XConvertMBToWC(ic->wc, (unsigned char *)buf, ret_len,
  1021.                   (wchar *)buffer, &nchars, &scanned_bytes,
  1022.                   (_State *)NULL);
  1023.           ret_len = nchars;
  1024.           /* XXX BUG Need to restore saved status */
  1025.   #else
  1026. --- 104,116 ----
  1027.           }
  1028.   #ifdef X_WCHAR
  1029.           /* XXX BUG Need to save current status */
  1030. !         ret = _XConvertMBToWC(ic->wc, (unsigned char *)buf, ret_len,
  1031.                   (wchar *)buffer, &nchars, &scanned_bytes,
  1032.                   (_State *)NULL);
  1033. +         if (ret < 0) {
  1034. +         *status = XBufferOverflow;
  1035. +         return(0);
  1036. +         }
  1037.           ret_len = nchars;
  1038.           /* XXX BUG Need to restore saved status */
  1039.   #else
  1040. ***************
  1041. *** 150,156 ****
  1042.           ret_len = nbytes;
  1043.           ret = _XConvertCTToMB(ic->mb, ptr, length, (unsigned char *)buffer,
  1044.                     &ret_len, &scanned_bytes, (_State *)NULL);
  1045. !         if (ret != Success) {
  1046.           *status = XBufferOverflow;
  1047.           return(0);
  1048.           }
  1049. --- 154,160 ----
  1050.           ret_len = nbytes;
  1051.           ret = _XConvertCTToMB(ic->mb, ptr, length, (unsigned char *)buffer,
  1052.                     &ret_len, &scanned_bytes, (_State *)NULL);
  1053. !         if (ret < 0) {
  1054.           *status = XBufferOverflow;
  1055.           return(0);
  1056.           }
  1057. ***************
  1058. *** 163,169 ****
  1059.                         (unsigned char *)buffer,
  1060.                         &ret_len, &scanned_bytes,
  1061.                         (_State *)NULL);
  1062. !         if (ret != Success) {
  1063.               *status = XBufferOverflow;
  1064.               return(0);
  1065.           }
  1066. --- 167,173 ----
  1067.                         (unsigned char *)buffer,
  1068.                         &ret_len, &scanned_bytes,
  1069.                         (_State *)NULL);
  1070. !         if (ret < 0) {
  1071.               *status = XBufferOverflow;
  1072.               return(0);
  1073.           }
  1074. *** /tmp/,RCSt1000782    Tue Mar 17 15:30:58 1992
  1075. --- mit/lib/X/Xsi/XInitCT.c    Tue Mar  3 10:04:01 1992
  1076. ***************
  1077. *** 1,5 ****
  1078.   /*
  1079. !  * $XConsortium: XInitCT.c,v 1.16 91/09/18 16:29:54 rws Exp $
  1080.    */
  1081.   
  1082.   /*
  1083. --- 1,5 ----
  1084.   /*
  1085. !  * $XConsortium: XInitCT.c,v 1.17 92/03/03 10:02:52 rws Exp $
  1086.    */
  1087.   
  1088.   /*
  1089. ***************
  1090. *** 546,554 ****
  1091.       _CSID            ind, i;
  1092.       _CSID             n = ISOStateTableNum;
  1093.   
  1094. ! #define PosSub(s1, s2) ((s1 >= s2) ? (s1 - s2) : ~0L)
  1095.   
  1096.       *woffset = ptr->state_woffset;
  1097.       ind = CODESET0;
  1098.       disp_min = PosSub(wc, ptr->state_woffset);
  1099.       if (disp_min == (wchar) ~0L) {
  1100. --- 546,555 ----
  1101.       _CSID            ind, i;
  1102.       _CSID             n = ISOStateTableNum;
  1103.   
  1104. ! #define PosSub(s1, s2) (((s1) >= (s2)) ? ((s1) - (s2)) : ~0L)
  1105.   
  1106.       *woffset = ptr->state_woffset;
  1107. +     wc &= ~0x7f;
  1108.       ind = CODESET0;
  1109.       disp_min = PosSub(wc, ptr->state_woffset);
  1110.       if (disp_min == (wchar) ~0L) {
  1111. ***************
  1112. *** 558,566 ****
  1113.       if (disp_min < 0x80)
  1114.       return(CODESET0);
  1115.       for (i = 1, ptr++; i < n; i++, ptr++) {
  1116. !         if (((new = PosSub(wc, ptr->state_woffset)) > 0) && (new < disp_min)) {
  1117.               *woffset = ptr->state_woffset;
  1118. !         if ((new < 0x80) || (ptr->state_length == 2 && new < 0x8000))
  1119.           return(i);
  1120.               ind = i;
  1121.               disp_min = new;
  1122. --- 559,571 ----
  1123.       if (disp_min < 0x80)
  1124.       return(CODESET0);
  1125.       for (i = 1, ptr++; i < n; i++, ptr++) {
  1126. !     if (ptr->state_length == 2)
  1127. !         new = PosSub(wc & ~0x7f00, ptr->state_woffset);
  1128. !     else
  1129. !         new = PosSub(wc, ptr->state_woffset);
  1130. !         if ((new >= 0) && (new < disp_min)) {
  1131.               *woffset = ptr->state_woffset;
  1132. !         if (new < 0x80)
  1133.           return(i);
  1134.               ind = i;
  1135.               disp_min = new;
  1136. *** /tmp/,RCSt1000246    Tue Mar 17 11:54:17 1992
  1137. --- mit/lib/nls/Xsi/ja_JP.ujis    Tue Mar  3 10:00:18 1992
  1138. ***************
  1139. *** 1,5 ****
  1140.   #
  1141. ! # $XConsortium: ja_JP.ujis,v 1.7 91/06/29 20:02:02 xguest Exp $
  1142.   #
  1143.   # Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
  1144.   #                      and Nippon Telegraph and Telephone Corporation
  1145. --- 1,5 ----
  1146.   #
  1147. ! # $XConsortium: ja_JP.ujis,v 1.8 92/03/03 09:59:32 rws Exp $
  1148.   #
  1149.   # Copyright 1990, 1991 by OMRON Corporation, NTT Software Corporation,
  1150.   #                      and Nippon Telegraph and Telephone Corporation
  1151. ***************
  1152. *** 103,109 ****
  1153.   (8fa1a1=2121:7e7e)
  1154.   #
  1155.   # UDC
  1156. ! (f5a1=2121:2d7e)
  1157.   END XLC_CODESET
  1158.   #
  1159.   # END OF FILE
  1160. --- 103,109 ----
  1161.   (8fa1a1=2121:7e7e)
  1162.   #
  1163.   # UDC
  1164. ! (f5a1=2121:2a7e)
  1165.   END XLC_CODESET
  1166.   #
  1167.   # END OF FILE
  1168. *** /tmp/,RCSt1000330    Tue Mar 17 11:57:46 1992
  1169. --- mit/lib/X/Ximp/XimpIC.c    Tue Mar  3 11:03:57 1992
  1170. ***************
  1171. *** 1,4 ****
  1172. ! /* $XConsortium: XimpIC.c,v 1.4 91/10/07 17:48:30 rws Exp $ */
  1173.   /******************************************************************
  1174.   
  1175.                 Copyright 1991, by FUJITSU LIMITED
  1176. --- 1,4 ----
  1177. ! /* $XConsortium: XimpIC.c,v 1.5 92/03/03 11:03:14 rws Exp $ */
  1178.   /******************************************************************
  1179.   
  1180.                 Copyright 1991, by FUJITSU LIMITED
  1181. ***************
  1182. *** 58,63 ****
  1183. --- 58,71 ----
  1184.   static void         _Ximp_AttributesSetL();
  1185.   extern void         _Ximp_IM_SendMessage();
  1186.   
  1187. + #if NeedFunctionPrototypes
  1188. + extern Bool _Ximp_XimFilter_Keypress (
  1189. +     Display *d, 
  1190. +     Window w, 
  1191. +     XEvent *ev, 
  1192. +     XPointer client_data);
  1193. + #endif
  1194.   static XICMethodsRec Ximp_ic_methods = {
  1195.                   _Ximp_DestroyIC,     /* destroy */
  1196.                   _Ximp_SetFocus,      /* set_focus */
  1197. ***************
  1198. *** 75,81 ****
  1199.       Display        *d;
  1200.       Window        w;
  1201.       XEvent        *ev;
  1202. !     XPointer    *client_data;
  1203.   {
  1204.       extern Bool    _Ximp_Keypress ();
  1205.   
  1206. --- 83,89 ----
  1207.       Display        *d;
  1208.       Window        w;
  1209.       XEvent        *ev;
  1210. !     XPointer    client_data;
  1211.   {
  1212.       extern Bool    _Ximp_Keypress ();
  1213.   
  1214. ***************
  1215. *** 138,144 ****
  1216.                   ic->core.focus_window,
  1217.                   KeyPress, KeyPress,
  1218.                   _Ximp_XimFilter_Keypress,
  1219. !                 ic);
  1220.           current_xic = ic;
  1221.       }
  1222.       return((XIC)ic);
  1223. --- 146,152 ----
  1224.                   ic->core.focus_window,
  1225.                   KeyPress, KeyPress,
  1226.                   _Ximp_XimFilter_Keypress,
  1227. !                 (XPointer)ic);
  1228.           current_xic = ic;
  1229.       }
  1230.       return((XIC)ic);
  1231. ***************
  1232. *** 159,165 ****
  1233.               _XUnregisterFilter (ic->core.im->core.display,
  1234.                       ic->core.focus_window,
  1235.                       _Ximp_XimFilter_Keypress,
  1236. !                     current_xic);
  1237.               current_xic = 0;
  1238.           }
  1239.       }
  1240. --- 167,173 ----
  1241.               _XUnregisterFilter (ic->core.im->core.display,
  1242.                       ic->core.focus_window,
  1243.                       _Ximp_XimFilter_Keypress,
  1244. !                     (XPointer)current_xic);
  1245.               current_xic = 0;
  1246.           }
  1247.       }
  1248. ***************
  1249. *** 177,188 ****
  1250.               _XUnregisterFilter (ic->core.im->core.display,
  1251.                           ic->core.focus_window,
  1252.                           _Ximp_XimFilter_Keypress,
  1253. !                         current_xic);
  1254.           _XRegisterFilterByType (ic->core.im->core.display,
  1255.                       ic->core.focus_window,
  1256.                       KeyPress, KeyPress,
  1257.                       _Ximp_XimFilter_Keypress,
  1258. !                     ic);
  1259.           current_xic = ic;
  1260.       }
  1261.       return;
  1262. --- 185,196 ----
  1263.               _XUnregisterFilter (ic->core.im->core.display,
  1264.                           ic->core.focus_window,
  1265.                           _Ximp_XimFilter_Keypress,
  1266. !                         (XPointer)current_xic);
  1267.           _XRegisterFilterByType (ic->core.im->core.display,
  1268.                       ic->core.focus_window,
  1269.                       KeyPress, KeyPress,
  1270.                       _Ximp_XimFilter_Keypress,
  1271. !                     (XPointer)ic);
  1272.           current_xic = ic;
  1273.       }
  1274.       return;
  1275. ***************
  1276. *** 198,204 ****
  1277.               _XUnregisterFilter (ic->core.im->core.display,
  1278.                       ic->core.focus_window,
  1279.                       _Ximp_XimFilter_Keypress,
  1280. !                     current_xic);
  1281.               current_xic = 0;
  1282.           }
  1283.       }
  1284. --- 206,212 ----
  1285.               _XUnregisterFilter (ic->core.im->core.display,
  1286.                       ic->core.focus_window,
  1287.                       _Ximp_XimFilter_Keypress,
  1288. !                     (XPointer)current_xic);
  1289.               current_xic = 0;
  1290.           }
  1291.       }
  1292. *** /tmp/,RCSt1000347    Tue Mar 17 11:57:56 1992
  1293. --- mit/lib/X/Ximp/XimpLkup.c    Tue Mar  3 11:04:03 1992
  1294. ***************
  1295. *** 1,4 ****
  1296. ! /* $XConsortium: XimpLkup.c,v 1.5 91/10/07 17:49:03 rws Exp $ */
  1297.   /******************************************************************
  1298.   
  1299.                 Copyright 1991, by Sony Corporation
  1300. --- 1,4 ----
  1301. ! /* $XConsortium: XimpLkup.c,v 1.6 92/03/03 11:03:23 rws Exp $ */
  1302.   /******************************************************************
  1303.   
  1304.                 Copyright 1991, by Sony Corporation
  1305. ***************
  1306. *** 71,76 ****
  1307. --- 71,84 ----
  1308.   static void        _Ximp_CallCallback();
  1309.   static void        _Ximp_ProcError();
  1310.   
  1311. + #if NeedFunctionPrototypes
  1312. + static Bool
  1313. + _Ximp_ResetPredicate(
  1314. +     Display *d,
  1315. +     XEvent *ev,
  1316. +     XPointer parg);
  1317. + #endif
  1318.   typedef struct {
  1319.       Atom type;
  1320.       ICID icid;
  1321. ***************
  1322. *** 78,88 ****
  1323.   } XimpResetPredArgRec, *XimpResetPredArg;
  1324.   
  1325.   static Bool
  1326. ! _Ximp_ResetPredicate(d, ev, arg)
  1327.   Display *d;
  1328.   XEvent *ev;
  1329. ! XimpResetPredArg arg;
  1330.   {
  1331.       if (ev->type == ClientMessage) {
  1332.           if (ev->xclient.message_type == arg->type) {
  1333.               if ((ev->xclient.format == 32) &&
  1334. --- 86,97 ----
  1335.   } XimpResetPredArgRec, *XimpResetPredArg;
  1336.   
  1337.   static Bool
  1338. ! _Ximp_ResetPredicate(d, ev, parg)
  1339.   Display *d;
  1340.   XEvent *ev;
  1341. ! XPointer parg;
  1342.   {
  1343. +     XimpResetPredArg arg = (XimpResetPredArg)parg;
  1344.       if (ev->type == ClientMessage) {
  1345.           if (ev->xclient.message_type == arg->type) {
  1346.               if ((ev->xclient.format == 32) &&
  1347. ***************
  1348. *** 128,134 ****
  1349.           Arg.icid = ic->ximp_icpart->icid;
  1350.           Arg.owner = ((Ximp_XIM)ic->core.im)->ximp_impart->fe_window;
  1351.           while(_time_flag != 1) {
  1352. !             if( (XCheckIfEvent(ic->core.im->core.display, &event, _Ximp_ResetPredicate, &Arg)) == False) {
  1353.   #ifdef XIMP_SIGNAL
  1354.                   sleep(1);
  1355.   #endif /* XIMP_SIGNAL */
  1356. --- 137,143 ----
  1357.           Arg.icid = ic->ximp_icpart->icid;
  1358.           Arg.owner = ((Ximp_XIM)ic->core.im)->ximp_impart->fe_window;
  1359.           while(_time_flag != 1) {
  1360. !             if( (XCheckIfEvent(ic->core.im->core.display, &event, _Ximp_ResetPredicate, (XPointer)&Arg)) == False) {
  1361.   #ifdef XIMP_SIGNAL
  1362.                   sleep(1);
  1363.   #endif /* XIMP_SIGNAL */
  1364. ***************
  1365. *** 198,204 ****
  1366.   
  1367.       if (!ct) return(NULL);
  1368.       mb = Xmalloc(length);
  1369. !     _Ximp_cttombs(ic->core.im->core.lcd, ct, strlen(ct), mb, &length, NULL);
  1370.       mb[length] = '\0';
  1371.       return(mb);
  1372.   }
  1373. --- 207,213 ----
  1374.   
  1375.       if (!ct) return(NULL);
  1376.       mb = Xmalloc(length);
  1377. !     _Ximp_cttombs(ic->core.im->core.lcd, ct, strlen((char *)ct), mb, &length, NULL);
  1378.       mb[length] = '\0';
  1379.       return(mb);
  1380.   }
  1381. ***************
  1382. *** 213,219 ****
  1383.   
  1384.       if (!ct) return(NULL);
  1385.       wc = (wchar_t *)Xmalloc(length * sizeof(wchar_t));
  1386. !     _Ximp_cttowcs(ic->core.im->core.lcd, ct, strlen(ct), wc, &length, NULL);
  1387.       wc[length] = (wchar_t)0;
  1388.       return(wc);
  1389.   }
  1390. --- 222,228 ----
  1391.   
  1392.       if (!ct) return(NULL);
  1393.       wc = (wchar_t *)Xmalloc(length * sizeof(wchar_t));
  1394. !     _Ximp_cttowcs(ic->core.im->core.lcd, ct, strlen((char *)ct), wc, &length, NULL);
  1395.       wc[length] = (wchar_t)0;
  1396.       return(wc);
  1397.   }
  1398. ***************
  1399. *** 547,553 ****
  1400.       XChangeProperty(ic->core.im->core.display, ic->core.client_window,
  1401.               ((Ximp_XIM)ic->core.im)->ximp_impart->version_id,
  1402.               XA_STRING, 8, PropModeReplace,
  1403. !             XIMP_PROTOCOL_VERSION, strlen(XIMP_PROTOCOL_VERSION));
  1404.       XFlush(ic->core.im->core.display);
  1405.   
  1406.       mask = ic->ximp_icpart->proto_mask;
  1407. --- 556,562 ----
  1408.       XChangeProperty(ic->core.im->core.display, ic->core.client_window,
  1409.               ((Ximp_XIM)ic->core.im)->ximp_impart->version_id,
  1410.               XA_STRING, 8, PropModeReplace,
  1411. !             (unsigned char *)XIMP_PROTOCOL_VERSION, strlen(XIMP_PROTOCOL_VERSION));
  1412.       XFlush(ic->core.im->core.display);
  1413.   
  1414.       mask = ic->ximp_icpart->proto_mask;
  1415. ***************
  1416. *** 849,855 ****
  1417.               _Ximp_ProcKeypress (d, w, ev);
  1418.               _Ximp_MakeKeypress (d, w, ev);
  1419.               ev->send_event = False ;
  1420. !             XPutBackEvent(d, ev);
  1421.               break ;
  1422.           case XIMP_CREATE_RETURN:
  1423.               _Ximp_ProcCreateReturn (d, w, ev);
  1424. --- 858,864 ----
  1425.               _Ximp_ProcKeypress (d, w, ev);
  1426.               _Ximp_MakeKeypress (d, w, ev);
  1427.               ev->send_event = False ;
  1428. !             XPutBackEvent(d, (XEvent *)ev);
  1429.               break ;
  1430.           case XIMP_CREATE_RETURN:
  1431.               _Ximp_ProcCreateReturn (d, w, ev);
  1432. ***************
  1433. *** 864,870 ****
  1434.               _Ximp_ProcReadProperty (d, w, ev);
  1435.               _Ximp_MakeKeypress (d, w, ev);
  1436.               ev->send_event = False ;
  1437. !             XPutBackEvent(d, ev);
  1438.               break ;
  1439.           case XIMP_ERROR:
  1440.               _Ximp_ProcError (d, w, ev);
  1441. --- 873,879 ----
  1442.               _Ximp_ProcReadProperty (d, w, ev);
  1443.               _Ximp_MakeKeypress (d, w, ev);
  1444.               ev->send_event = False ;
  1445. !             XPutBackEvent(d, (XEvent *)ev);
  1446.               break ;
  1447.           case XIMP_ERROR:
  1448.               _Ximp_ProcError (d, w, ev);
  1449. ***************
  1450. *** 891,897 ****
  1451.           _Ximp_ProcReadMessage (d, w, ev);
  1452.           _Ximp_MakeKeypress (d, w, ev);
  1453.           ev->send_event = False ;
  1454. !         XPutBackEvent(d, ev);
  1455.           }
  1456.       return (True);
  1457.   }
  1458. --- 900,906 ----
  1459.           _Ximp_ProcReadMessage (d, w, ev);
  1460.           _Ximp_MakeKeypress (d, w, ev);
  1461.           ev->send_event = False ;
  1462. !         XPutBackEvent(d, (XEvent *)ev);
  1463.           }
  1464.       return (True);
  1465.   }
  1466. *** /tmp/,RCSt1000365    Tue Mar 17 11:58:07 1992
  1467. --- mit/lib/X/Ximp/XimpCT.c    Tue Mar  3 11:03:18 1992
  1468. ***************
  1469. *** 1,4 ****
  1470. ! /* $XConsortium: XimpCT.c,v 1.2 91/07/30 14:27:12 rws Exp $ */
  1471.   /*
  1472.    * Copyright 1990, 1991 by TOSHIBA Corp.
  1473.    * Copyright 1990, 1991 by SORD Computer Corp.
  1474. --- 1,4 ----
  1475. ! /* $XConsortium: XimpCT.c,v 1.3 92/03/03 11:02:11 rws Exp $ */
  1476.   /*
  1477.    * Copyright 1990, 1991 by TOSHIBA Corp.
  1478.    * Copyright 1990, 1991 by SORD Computer Corp.
  1479. ***************
  1480. *** 213,219 ****
  1481.           if (ctext_len < 1)
  1482.           return -1;
  1483.   
  1484. !         if (ctext_len > 4 && *ctptr++ == '%') {
  1485.           ch = *ctptr++;
  1486.           if (ch < 0x30 || ch > 0x3f)
  1487.               goto unknown;
  1488. --- 213,219 ----
  1489.           if (ctext_len < 1)
  1490.           return -1;
  1491.   
  1492. !         if (ctext_len > 4 && *ctptr++ == '/') {
  1493.           ch = *ctptr++;
  1494.           if (ch < 0x30 || ch > 0x3f)
  1495.               goto unknown;
  1496. *** /tmp/,RCSt1000382    Tue Mar 17 11:58:16 1992
  1497. --- mit/lib/X/Ximp/XimpICG.c    Tue Mar  3 11:02:23 1992
  1498. ***************
  1499. *** 1,4 ****
  1500. ! /* $XConsortium: XimpICG.c,v 1.5 91/10/10 20:08:25 rws Exp $ */
  1501.   /******************************************************************
  1502.   
  1503.       Copyright 1991, by FUJITSU LIMITED.
  1504. --- 1,4 ----
  1505. ! /* $XConsortium: XimpICG.c,v 1.6 92/03/03 11:01:06 rws Exp $ */
  1506.   /******************************************************************
  1507.   
  1508.       Copyright 1991, by FUJITSU LIMITED.
  1509. ***************
  1510. *** 153,158 ****
  1511. --- 153,159 ----
  1512.       int         im_font_flag    = 0;
  1513.       Ximp_PreeditPropRec    *preedit_data;
  1514.       XIMCallback     *p_callback;
  1515. +     XPointer    *xptr;
  1516.   
  1517.       if(((Ximp_XIM)ic->core.im)->ximp_impart->inputserver) {
  1518.           for(mask = 0, p = vl; p->name != NULL; p++) {
  1519. ***************
  1520. *** 209,221 ****
  1521.               }
  1522.           } else if(strcmp(p->name, XNAreaNeeded)==0) {
  1523.               if(im_preedit_flag) {
  1524. !                 p_rect =  (XRectangle *)(p->value) ;
  1525.                   p_rect->x  = p_rect->y  = 0;
  1526.                   p_rect->width   = preedit_data->AreaNeeded.width;
  1527.                   p_rect->height  = preedit_data->AreaNeeded.height;
  1528.               } else {
  1529.                   if(ic->ximp_icpart->proto_mask & XIMP_PRE_AREANEED_MASK) {
  1530. !                         p_rect = (XRectangle *)(p->value) ;
  1531.                       p_rect->x  = p_rect->y  = 0;
  1532.                       p_rect->width   = ic->core.preedit_attr.area_needed.width;
  1533.                       p_rect->height  = ic->core.preedit_attr.area_needed.height;
  1534. --- 210,226 ----
  1535.               }
  1536.           } else if(strcmp(p->name, XNAreaNeeded)==0) {
  1537.               if(im_preedit_flag) {
  1538. !                 p_rect = (XRectangle *)Xmalloc(sizeof(XRectangle));
  1539. !                 xptr = (XPointer *)p->value;
  1540. !                 *xptr = (XPointer)p_rect;
  1541.                   p_rect->x  = p_rect->y  = 0;
  1542.                   p_rect->width   = preedit_data->AreaNeeded.width;
  1543.                   p_rect->height  = preedit_data->AreaNeeded.height;
  1544.               } else {
  1545.                   if(ic->ximp_icpart->proto_mask & XIMP_PRE_AREANEED_MASK) {
  1546. !                     p_rect = (XRectangle *)Xmalloc(sizeof(XRectangle));
  1547. !                     xptr = (XPointer *)p->value;
  1548. !                     *xptr = (XPointer)p_rect;
  1549.                       p_rect->x  = p_rect->y  = 0;
  1550.                       p_rect->width   = ic->core.preedit_attr.area_needed.width;
  1551.                       p_rect->height  = ic->core.preedit_attr.area_needed.height;
  1552. ***************
  1553. *** 226,237 ****
  1554.               }
  1555.           } else if(strcmp(p->name, XNSpotLocation)==0) {
  1556.               if(im_preedit_flag) {
  1557. !                     p_point = (XPoint *)(p->value);
  1558.                   p_point->x = preedit_data->SpotLocation.x;
  1559.                   p_point->y = preedit_data->SpotLocation.y;
  1560.               } else {
  1561.                   if(ic->ximp_icpart->proto_mask & XIMP_PRE_SPOTL_MASK) {
  1562. !                         p_point = (XPoint *)(p->value);
  1563.                       p_point->x = ic->core.preedit_attr.spot_location.x;
  1564.                       p_point->y = ic->core.preedit_attr.spot_location.y;
  1565.                   } else {
  1566. --- 231,246 ----
  1567.               }
  1568.           } else if(strcmp(p->name, XNSpotLocation)==0) {
  1569.               if(im_preedit_flag) {
  1570. !                 p_point = (XPoint *)Xmalloc(sizeof(XPoint));
  1571. !                 xptr = (XPointer *)p->value;
  1572. !                 *xptr = (XPointer)p_point;
  1573.                   p_point->x = preedit_data->SpotLocation.x;
  1574.                   p_point->y = preedit_data->SpotLocation.y;
  1575.               } else {
  1576.                   if(ic->ximp_icpart->proto_mask & XIMP_PRE_SPOTL_MASK) {
  1577. !                     p_point = (XPoint *)Xmalloc(sizeof(XPoint));
  1578. !                     xptr = (XPointer *)p->value;
  1579. !                     *xptr = (XPointer)p_point;
  1580.                       p_point->x = ic->core.preedit_attr.spot_location.x;
  1581.                       p_point->y = ic->core.preedit_attr.spot_location.y;
  1582.                   } else {
  1583. ***************
  1584. *** 391,396 ****
  1585. --- 400,406 ----
  1586.       int         im_font_flag    = 0;
  1587.       Ximp_StatusPropRec    *status_data;
  1588.       XIMCallback     *p_callback;
  1589. +     XPointer    *xptr;
  1590.   
  1591.       if(((Ximp_XIM)ic->core.im)->ximp_impart->inputserver) {
  1592.           for(mask = 0, p = vl; p->name != NULL; p++) {
  1593. ***************
  1594. *** 446,458 ****
  1595.               }
  1596.           } else if(strcmp(p->name, XNAreaNeeded)==0) {
  1597.               if(im_status_flag) {
  1598. !                 p_rect =  (XRectangle *)(p->value) ;
  1599.                   p_rect->x  = p_rect->y  = 0;
  1600.                   p_rect->width   = status_data->AreaNeeded.width;
  1601.                   p_rect->height  = status_data->AreaNeeded.height;
  1602.               } else {
  1603.                   if(ic->ximp_icpart->proto_mask & XIMP_STS_AREANEED_MASK) {
  1604. !                     p_rect =  (XRectangle *)(p->value) ;
  1605.                       p_rect->x  = p_rect->y  = 0;
  1606.                       p_rect->width   = ic->core.status_attr.area_needed.width;
  1607.                       p_rect->height  = ic->core.status_attr.area_needed.height;
  1608. --- 456,472 ----
  1609.               }
  1610.           } else if(strcmp(p->name, XNAreaNeeded)==0) {
  1611.               if(im_status_flag) {
  1612. !                 p_rect = (XRectangle *)Xmalloc(sizeof(XRectangle));
  1613. !                 xptr = (XPointer *)p->value;
  1614. !                 *xptr = (XPointer)p_rect;
  1615.                   p_rect->x  = p_rect->y  = 0;
  1616.                   p_rect->width   = status_data->AreaNeeded.width;
  1617.                   p_rect->height  = status_data->AreaNeeded.height;
  1618.               } else {
  1619.                   if(ic->ximp_icpart->proto_mask & XIMP_STS_AREANEED_MASK) {
  1620. !                     p_rect = (XRectangle *)Xmalloc(sizeof(XRectangle));
  1621. !                     xptr = (XPointer *)p->value;
  1622. !                     *xptr = (XPointer)p_rect;
  1623.                       p_rect->x  = p_rect->y  = 0;
  1624.                       p_rect->width   = ic->core.status_attr.area_needed.width;
  1625.                       p_rect->height  = ic->core.status_attr.area_needed.height;
  1626. *** /tmp/,RCSt1000399    Tue Mar 17 11:58:24 1992
  1627. --- mit/lib/X/Ximp/XimpRm.c    Tue Mar  3 11:04:09 1992
  1628. ***************
  1629. *** 1,4 ****
  1630. ! /* $XConsortium: XimpRm.c,v 1.2 91/10/07 17:50:27 rws Exp $ */
  1631.   /******************************************************************
  1632.   
  1633.                 Copyright 1991, by FUJITSU LIMITED
  1634. --- 1,4 ----
  1635. ! /* $XConsortium: XimpRm.c,v 1.3 92/03/03 11:03:30 rws Exp $ */
  1636.   /******************************************************************
  1637.   
  1638.                 Copyright 1991, by FUJITSU LIMITED
  1639. ***************
  1640. *** 124,130 ****
  1641.       XColor         screen_def, exact_def;
  1642.       int         num;
  1643.   
  1644. !     im = (Ximp_XIM)XIMOfIC(ic);
  1645.       if(im->core.rdb == NULL)
  1646.           return;
  1647.   
  1648. --- 124,130 ----
  1649.       XColor         screen_def, exact_def;
  1650.       int         num;
  1651.   
  1652. !     im = (Ximp_XIM)XIMOfIC((XIC)ic);
  1653.       if(im->core.rdb == NULL)
  1654.           return;
  1655.   
  1656. *** /tmp/,RCSt1029884    Tue Mar 17 11:38:34 1992
  1657. --- mit/lib/Xt/Shell.c    Fri Feb 21 12:42:37 1992
  1658. ***************
  1659. *** 1,4 ****
  1660. ! /* $XConsortium: Shell.c,v 1.120 91/12/06 16:16:40 converse Exp $ */
  1661.   
  1662.   /***********************************************************
  1663.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  1664. --- 1,4 ----
  1665. ! /* $XConsortium: Shell.c,v 1.124 92/02/21 12:34:32 converse Exp $ */
  1666.   
  1667.   /***********************************************************
  1668.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  1669. ***************
  1670. *** 1104,1111 ****
  1671.           || sizep->max_aspect.y != XtUnspecifiedShellInt) {
  1672.           sizep->flags |= PAspect;
  1673.       }
  1674. !     if(w->wm.base_width != XtUnspecifiedShellInt
  1675. !        || w->wm.base_height != XtUnspecifiedShellInt) {
  1676.           sizep->flags |= PBaseSize;
  1677.           if (w->wm.base_width == XtUnspecifiedShellInt)
  1678.           w->wm.base_width = 0;
  1679. --- 1104,1112 ----
  1680.           || sizep->max_aspect.y != XtUnspecifiedShellInt) {
  1681.           sizep->flags |= PAspect;
  1682.       }
  1683. !     if (sizep->flags & PBaseSize
  1684. !         || w->wm.base_width != XtUnspecifiedShellInt
  1685. !         || w->wm.base_height != XtUnspecifiedShellInt) {
  1686.           sizep->flags |= PBaseSize;
  1687.           if (w->wm.base_width == XtUnspecifiedShellInt)
  1688.           w->wm.base_width = 0;
  1689. ***************
  1690. *** 1112,1124 ****
  1691.           if (w->wm.base_height == XtUnspecifiedShellInt)
  1692.           w->wm.base_height = 0;
  1693.       }
  1694. !     if (sizep->width_inc != XtUnspecifiedShellInt
  1695.           || sizep->height_inc != XtUnspecifiedShellInt) {
  1696.           if (sizep->width_inc < 1) sizep->width_inc = 1;
  1697.           if (sizep->height_inc < 1) sizep->height_inc = 1;
  1698.           sizep->flags |= PResizeInc;
  1699.       }
  1700. !     if (sizep->max_width != XtUnspecifiedShellInt
  1701.           || sizep->max_height != XtUnspecifiedShellInt) {
  1702.           sizep->flags |= PMaxSize;
  1703.           if (sizep->max_width == XtUnspecifiedShellInt)
  1704. --- 1113,1127 ----
  1705.           if (w->wm.base_height == XtUnspecifiedShellInt)
  1706.           w->wm.base_height = 0;
  1707.       }
  1708. !     if (sizep->flags & PResizeInc
  1709. !         || sizep->width_inc != XtUnspecifiedShellInt
  1710.           || sizep->height_inc != XtUnspecifiedShellInt) {
  1711.           if (sizep->width_inc < 1) sizep->width_inc = 1;
  1712.           if (sizep->height_inc < 1) sizep->height_inc = 1;
  1713.           sizep->flags |= PResizeInc;
  1714.       }
  1715. !     if (sizep->flags & PMaxSize
  1716. !         || sizep->max_width != XtUnspecifiedShellInt
  1717.           || sizep->max_height != XtUnspecifiedShellInt) {
  1718.           sizep->flags |= PMaxSize;
  1719.           if (sizep->max_width == XtUnspecifiedShellInt)
  1720. ***************
  1721. *** 1126,1133 ****
  1722.           if (sizep->max_height == XtUnspecifiedShellInt)
  1723.           sizep->max_height = BIGSIZE;
  1724.       }
  1725. !     if(sizep->min_width != XtUnspecifiedShellInt
  1726. !        || sizep->min_height != XtUnspecifiedShellInt) {
  1727.           sizep->flags |= PMinSize;
  1728.           if (sizep->min_width == XtUnspecifiedShellInt)
  1729.           sizep->min_width = 1;
  1730. --- 1129,1137 ----
  1731.           if (sizep->max_height == XtUnspecifiedShellInt)
  1732.           sizep->max_height = BIGSIZE;
  1733.       }
  1734. !     if (sizep->flags & PMinSize
  1735. !         || sizep->min_width != XtUnspecifiedShellInt
  1736. !         || sizep->min_height != XtUnspecifiedShellInt) {
  1737.           sizep->flags |= PMinSize;
  1738.           if (sizep->min_width == XtUnspecifiedShellInt)
  1739.           sizep->min_width = 1;
  1740. ***************
  1741. *** 1766,1777 ****
  1742.       _SetWMSizeHints((WMShellWidget)w);
  1743.       }
  1744.   
  1745. !     if (w->shell.override_redirect) return XtGeometryDone;
  1746.   
  1747.       /* If no non-stacking bits are set, there's no way to tell whether
  1748.          or not this worked, so assume it did */
  1749.   
  1750. !     if (!(mask & ~(CWStackMode | CWSibling))) return XtGeometryDone;
  1751.   
  1752.       if (wm && ((WMShellWidget)w)->wm.wait_for_wm == FALSE) {
  1753.           /* the window manager is sick
  1754. --- 1770,1781 ----
  1755.       _SetWMSizeHints((WMShellWidget)w);
  1756.       }
  1757.   
  1758. !     if (w->shell.override_redirect) return XtGeometryYes;
  1759.   
  1760.       /* If no non-stacking bits are set, there's no way to tell whether
  1761.          or not this worked, so assume it did */
  1762.   
  1763. !     if (!(mask & ~(CWStackMode | CWSibling))) return XtGeometryYes;
  1764.   
  1765.       if (wm && ((WMShellWidget)w)->wm.wait_for_wm == FALSE) {
  1766.           /* the window manager is sick
  1767. ***************
  1768. *** 1818,1824 ****
  1769.               w->shell.client_specified |= _XtShellPositionValid;
  1770.           }
  1771.           else w->shell.client_specified &= ~_XtShellPositionValid;
  1772. !         return XtGeometryDone;
  1773.           }
  1774.       } else if (!wm ||
  1775.              (event.type == ClientMessage &&
  1776. --- 1822,1828 ----
  1777.               w->shell.client_specified |= _XtShellPositionValid;
  1778.           }
  1779.           else w->shell.client_specified &= ~_XtShellPositionValid;
  1780. !         return XtGeometryYes;
  1781.           }
  1782.       } else if (!wm ||
  1783.              (event.type == ClientMessage &&
  1784. ***************
  1785. *** 1830,1836 ****
  1786.           w->core.x = event.xclient.data.s[0];
  1787.           w->core.y = event.xclient.data.s[1];
  1788.           w->shell.client_specified |= _XtShellPositionValid;
  1789. !         return XtGeometryDone;
  1790.       } else XtAppWarningMsg(XtWidgetToApplicationContext((Widget)w),
  1791.                      "internalError", "shell", XtCXtToolkitError,
  1792.                      "Shell's window manager interaction is broken",
  1793. --- 1834,1840 ----
  1794.           w->core.x = event.xclient.data.s[0];
  1795.           w->core.y = event.xclient.data.s[1];
  1796.           w->shell.client_specified |= _XtShellPositionValid;
  1797. !         return XtGeometryYes;
  1798.       } else XtAppWarningMsg(XtWidgetToApplicationContext((Widget)w),
  1799.                      "internalError", "shell", XtCXtToolkitError,
  1800.                      "Shell's window manager interaction is broken",
  1801. ***************
  1802. *** 1948,1956 ****
  1803.       }
  1804.   #undef NEQ
  1805.   
  1806. !      if (set_prop && nwmshell->wm.transient != owmshell->wm.transient) {
  1807.            if (nwmshell->wm.transient) {
  1808.           if (!XtIsTransientShell(new) &&
  1809.               nwmshell->wm.wm_hints.window_group != 
  1810.                  XtUnspecifiedWindowGroup)
  1811.               XSetTransientForHint(XtDisplay(new), XtWindow(new),
  1812. --- 1952,1962 ----
  1813.       }
  1814.   #undef NEQ
  1815.   
  1816. !      if (XtIsRealized(new) &&
  1817. !         nwmshell->wm.transient != owmshell->wm.transient) {
  1818.            if (nwmshell->wm.transient) {
  1819.           if (!XtIsTransientShell(new) &&
  1820. +             !nwmshell->shell.override_redirect &&
  1821.               nwmshell->wm.wm_hints.window_group != 
  1822.                  XtUnspecifiedWindowGroup)
  1823.               XSetTransientForHint(XtDisplay(new), XtWindow(new),
  1824. ***************
  1825. *** 1973,1982 ****
  1826.       TransientShellWidget new = (TransientShellWidget)newW;
  1827.       
  1828.       if (XtIsRealized(newW)
  1829. !     && ((new->transient.transient_for != old->transient.transient_for)
  1830. !         || (new->transient.transient_for == NULL
  1831. !         && (new->wm.wm_hints.window_group
  1832. !             != old->wm.wm_hints.window_group)))) {
  1833.   
  1834.       _SetTransientForHint(new, True);
  1835.       }
  1836. --- 1979,1989 ----
  1837.       TransientShellWidget new = (TransientShellWidget)newW;
  1838.       
  1839.       if (XtIsRealized(newW)
  1840. !     && ((new->wm.transient && !old->wm.transient)
  1841. !         || ((new->transient.transient_for != old->transient.transient_for)
  1842. !         || (new->transient.transient_for == NULL
  1843. !             && (new->wm.wm_hints.window_group
  1844. !             != old->wm.wm_hints.window_group))))) {
  1845.   
  1846.       _SetTransientForHint(new, True);
  1847.       }
  1848. *** /tmp/,RCSt1029904    Tue Mar 17 11:40:32 1992
  1849. --- mit/lib/Xt/Geometry.c    Tue Feb 11 17:14:44 1992
  1850. ***************
  1851. *** 1,4 ****
  1852. ! /* $XConsortium: Geometry.c,v 1.54 91/09/23 11:09:45 converse Exp $ */
  1853.   
  1854.   /***********************************************************
  1855.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  1856. --- 1,4 ----
  1857. ! /* $XConsortium: Geometry.c,v 1.55 92/02/11 17:13:18 converse Exp $ */
  1858.   
  1859.   /***********************************************************
  1860.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  1861. ***************
  1862. *** 68,74 ****
  1863.       XtGeometryResult returnCode;
  1864.       Widget parent = widget->core.parent;
  1865.       XtGeometryMask    changeMask;
  1866. !     Boolean managed, parentRealized;
  1867.       XWindowChanges changes;
  1868.   
  1869.       *clear_rect_obj = FALSE;
  1870. --- 68,74 ----
  1871.       XtGeometryResult returnCode;
  1872.       Widget parent = widget->core.parent;
  1873.       XtGeometryMask    changeMask;
  1874. !     Boolean managed, parentRealized, rgm = False;
  1875.       XWindowChanges changes;
  1876.   
  1877.       *clear_rect_obj = FALSE;
  1878. ***************
  1879. *** 84,89 ****
  1880. --- 84,90 ----
  1881.           if (  ext->version == XtShellExtensionVersion
  1882.             && ext->record_size == sizeof(ShellClassExtensionRec)) {
  1883.           manager = ext->root_geometry_manager;
  1884. +         rgm = True;
  1885.           } else {
  1886.           String params[1];
  1887.           Cardinal num_params = 1;
  1888. ***************
  1889. *** 215,220 ****
  1890. --- 216,224 ----
  1891.       }
  1892.   
  1893.       if (XtIsWidget(widget)) {    /* reconfigure the window (if needed) */
  1894. +     if (rgm) return returnCode;
  1895.       if (changes.x != widget->core.x) {
  1896.            changeMask |= CWX;
  1897.            changes.x = widget->core.x;
  1898. *** /tmp/,RCSt1029924    Tue Mar 17 11:41:32 1992
  1899. --- mit/lib/Xt/Convert.c    Thu Feb 27 17:09:51 1992
  1900. ***************
  1901. *** 1,4 ****
  1902. ! /* $XConsortium: Convert.c,v 1.63 91/11/26 13:54:29 converse Exp $ */
  1903.   
  1904.   /***********************************************************
  1905.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  1906. --- 1,4 ----
  1907. ! /* $XConsortium: Convert.c,v 1.65 92/02/27 17:08:12 converse Exp $ */
  1908.   
  1909.   /***********************************************************
  1910.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  1911. ***************
  1912. *** 64,70 ****
  1913.       ConverterPtr rec;
  1914.       int i;
  1915.       XtCacheType cache_type;
  1916. !     for (i = CONVERTHASHSIZE; --i >- 0; ) {
  1917.           for (rec = *globalConverterTable++; rec; rec = rec->next) {
  1918.           cache_type = rec->cache_type;
  1919.           if (rec->do_ref_count)
  1920. --- 64,70 ----
  1921.       ConverterPtr rec;
  1922.       int i;
  1923.       XtCacheType cache_type;
  1924. !     for (i = CONVERTHASHSIZE; --i >= 0; ) {
  1925.           for (rec = *globalConverterTable++; rec; rec = rec->next) {
  1926.           cache_type = rec->cache_type;
  1927.           if (rec->do_ref_count)
  1928. ***************
  1929. *** 738,747 ****
  1930. --- 738,755 ----
  1931.       {
  1932.       Heap *heap;
  1933.       XtPointer closure = NULL;
  1934. +     unsigned int supplied_size = to->size;
  1935.       Boolean do_ref = cP->do_ref_count && cache_ref_return;
  1936.       Boolean do_free = False;
  1937.       Boolean retval =
  1938.           (*(XtTypeConverter)converter)(dpy, args, &num_args, from, to, &closure);
  1939. +     if (retval == False && supplied_size < to->size) {
  1940. +         /* programmer error: caller must allocate sufficient storage */
  1941. +         *cache_ref_return = NULL;
  1942. +         return False;
  1943. +     }
  1944.       if ((cP->cache_type == XtCacheNone) || do_ref) {
  1945.           heap = NULL;
  1946.           do_free = True;
  1947. *** /tmp/,RCSt1029964    Tue Mar 17 11:44:10 1992
  1948. --- mit/lib/Xt/Event.c    Fri Feb 21 15:56:45 1992
  1949. ***************
  1950. *** 1,4 ****
  1951. ! /* $XConsortium: Event.c,v 1.135 91/10/25 13:19:23 converse Exp $ */
  1952.   
  1953.   /***********************************************************
  1954.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  1955. --- 1,4 ----
  1956. ! /* $XConsortium: Event.c,v 1.136 92/02/21 15:54:06 converse Exp $ */
  1957.   
  1958.   /***********************************************************
  1959.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  1960. ***************
  1961. *** 510,516 ****
  1962.   
  1963.   #define EHMAXSIZE 25 /* do not make whopping big */
  1964.   
  1965. ! static void CallEventHandlers(widget, event, mask)
  1966.       Widget     widget;
  1967.       XEvent    *event;
  1968.       EventMask  mask;
  1969. --- 510,516 ----
  1970.   
  1971.   #define EHMAXSIZE 25 /* do not make whopping big */
  1972.   
  1973. ! static Boolean CallEventHandlers(widget, event, mask)
  1974.       Widget     widget;
  1975.       XEvent    *event;
  1976.       EventMask  mask;
  1977. ***************
  1978. *** 551,556 ****
  1979. --- 551,557 ----
  1980.       (*(proc[i]))(widget, closure[i], event, &cont_to_disp);
  1981.       if (numprocs > EHMAXSIZE)
  1982.       XtFree((char *)proc);
  1983. +     return cont_to_disp;
  1984.   }
  1985.   
  1986.   static Region nullRegion;
  1987. ***************
  1988. *** 574,579 ****
  1989. --- 575,581 ----
  1990.       XEvent nextEvent;
  1991.       Boolean was_dispatched = XtDidNothing;
  1992.       Boolean call_tm = XtDidNothing;
  1993. +     Boolean cont_to_disp;
  1994.   
  1995.       if (XFilterEvent(event, XtWindow(widget)))
  1996.       return XtDidFilter;
  1997. ***************
  1998. *** 652,657 ****
  1999. --- 654,661 ----
  2000.       if (widget->core.tm.translations &&
  2001.       (mask & widget->core.tm.translations->eventMask))
  2002.       call_tm = XtDidDispatch;
  2003. +     cont_to_disp = True;
  2004.       p=widget->core.event_table;
  2005.       if (p) {
  2006.       if (p->next) {
  2007. ***************
  2008. *** 673,682 ****
  2009.           }
  2010.           if (numprocs) {
  2011.           if (p) {
  2012. !             CallEventHandlers(widget, event, mask);
  2013.           } else {
  2014.               int i;
  2015. -             Boolean cont_to_disp = True;
  2016.               for (i = 0; i < numprocs && cont_to_disp; i++)
  2017.               (*(proc[i]))(widget, closure[i], event, &cont_to_disp);
  2018.           }
  2019. --- 677,685 ----
  2020.           }
  2021.           if (numprocs) {
  2022.           if (p) {
  2023. !             cont_to_disp = CallEventHandlers(widget, event, mask);
  2024.           } else {
  2025.               int i;
  2026.               for (i = 0; i < numprocs && cont_to_disp; i++)
  2027.               (*(proc[i]))(widget, closure[i], event, &cont_to_disp);
  2028.           }
  2029. ***************
  2030. *** 683,694 ****
  2031.           was_dispatched = XtDidDispatch;
  2032.           }
  2033.       } else if (mask & p->mask) {
  2034.           was_dispatched = XtDidDispatch;
  2035. -         (*p->proc)(widget, p->closure, event, &was_dispatched);
  2036. -         was_dispatched = XtDidDispatch;
  2037.       }
  2038.       }
  2039. !     if (call_tm)
  2040.       _XtTranslateEvent(widget, event);
  2041.       return (was_dispatched|call_tm);
  2042.   }
  2043. --- 686,696 ----
  2044.           was_dispatched = XtDidDispatch;
  2045.           }
  2046.       } else if (mask & p->mask) {
  2047. +         (*p->proc)(widget, p->closure, event, &cont_to_disp);
  2048.           was_dispatched = XtDidDispatch;
  2049.       }
  2050.       }
  2051. !     if (call_tm && cont_to_disp)
  2052.       _XtTranslateEvent(widget, event);
  2053.       return (was_dispatched|call_tm);
  2054.   }
  2055. *** /tmp/,RCSt1029986    Tue Mar 17 11:45:45 1992
  2056. --- mit/lib/Xt/TranslateI.h    Mon Feb 24 17:44:54 1992
  2057. ***************
  2058. *** 1,4 ****
  2059. ! /* $XConsortium: TranslateI.h,v 1.42 91/06/14 17:58:41 converse Exp $ */
  2060.   
  2061.   /***********************************************************
  2062.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  2063. --- 1,4 ----
  2064. ! /* $XConsortium: TranslateI.h,v 1.43 92/02/24 17:42:20 converse Exp $ */
  2065.   
  2066.   /***********************************************************
  2067.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  2068. ***************
  2069. *** 59,64 ****
  2070. --- 59,65 ----
  2071.   typedef struct _LateBindings {
  2072.       unsigned int knot:1;
  2073.       unsigned int pair:1;
  2074. +     unsigned short ref_count;    /* garbage collection */
  2075.       KeySym keysym;
  2076.   } LateBindings, *LateBindingsPtr;
  2077.   
  2078. *** /tmp/,RCSt1000106    Tue Mar 17 11:47:21 1992
  2079. --- mit/lib/Xt/TMparse.c    Thu Mar  5 18:49:55 1992
  2080. ***************
  2081. *** 1,4 ****
  2082. ! /* $XConsortium: TMparse.c,v 1.123 91/07/28 11:52:14 swick Exp $ */
  2083.   
  2084.   /***********************************************************
  2085.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  2086. --- 1,4 ----
  2087. ! /* $XConsortium: TMparse.c,v 1.128 92/03/05 18:48:55 converse Exp $ */
  2088.   
  2089.   /***********************************************************
  2090.   Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  2091. ***************
  2092. *** 528,533 ****
  2093. --- 528,535 ----
  2094.           *lateBindings = temp;
  2095.           temp[count].knot = notL;
  2096.           temp[count].pair = pair;
  2097. +     if (count == 0)
  2098. +         temp[count].ref_count = 1;
  2099.           temp[count++].keysym = keysymL;
  2100.           if (keysymR){
  2101.               temp[count].knot = notR;
  2102. ***************
  2103. *** 1012,1019 ****
  2104.       EventPtr event;
  2105.       Boolean* error;
  2106.   {
  2107. -     char atomName[1000], *start;
  2108.       ScanWhitespace(str);
  2109.   
  2110.       if (*str == ',' || *str == ':') {
  2111. --- 1014,1019 ----
  2112. ***************
  2113. *** 1021,1026 ****
  2114. --- 1021,1027 ----
  2115.       event->event.eventCode = 0L;
  2116.           event->event.eventCodeMask = 0L;
  2117.       } else {
  2118. +     char *start, atomName[1000];
  2119.       start = str;
  2120.       while (
  2121.           *str != ','
  2122. ***************
  2123. *** 1037,1043 ****
  2124.       bcopy(start, atomName, str-start);
  2125.       atomName[str-start] = '\0';
  2126.       event->event.eventCode = XrmStringToQuark(atomName);
  2127. -     event->event.eventCodeMask = ~0L;
  2128.       event->event.matchEvent = _XtMatchAtom;
  2129.       }
  2130.       return str;
  2131. --- 1038,1043 ----
  2132. ***************
  2133. *** 1046,1055 ****
  2134.   static ModifierMask buttonModifierMasks[] = {
  2135.       0, Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask
  2136.   };
  2137.   
  2138. ! static String ParseEvent(str, event,error)
  2139.       register String str;
  2140.       EventPtr    event;
  2141.       Boolean* error;
  2142.   {
  2143.       Cardinal    tmEvent;
  2144. --- 1046,1058 ----
  2145.   static ModifierMask buttonModifierMasks[] = {
  2146.       0, Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask
  2147.   };
  2148. + static String ParseRepeat();
  2149.   
  2150. ! static String ParseEvent(str, event, reps, plus, error)
  2151.       register String str;
  2152.       EventPtr    event;
  2153. +     int*    reps;
  2154. +     Boolean*    plus;
  2155.       Boolean* error;
  2156.   {
  2157.       Cardinal    tmEvent;
  2158. ***************
  2159. *** 1070,1075 ****
  2160. --- 1073,1082 ----
  2161.            return PanicModeRecovery(str);
  2162.       }
  2163.       else str++;
  2164. +     if (*str == '(') {
  2165. +     str = ParseRepeat(str, reps, plus, error);
  2166. +     if (*error) return str;
  2167. +     }
  2168.       str = (*(events[tmEvent].parseDetail))(
  2169.           str, events[tmEvent].closure, event,error);
  2170.       if (*error) return str;
  2171. ***************
  2172. *** 1136,1141 ****
  2173. --- 1143,1156 ----
  2174.       return str;
  2175.   }
  2176.   
  2177. + static EventSeqRec timerEventRec = {
  2178. +     {0, 0, NULL, _XtEventTimerEventType, 0L, 0L, NULL},
  2179. +     /* (StatePtr) -1 */ NULL,
  2180. +     NULL,
  2181. +     NULL
  2182. + };
  2183.   static void RepeatDown(eventP, reps, actionsP)
  2184.       EventPtr *eventP;
  2185.       int reps;
  2186. ***************
  2187. *** 1146,1158 ****
  2188.       EventPtr upEvent = &upEventRec;
  2189.       register int i;
  2190.   
  2191. -     static EventSeqRec timerEventRec = {
  2192. -     {0, 0,NULL, _XtEventTimerEventType, 0L, 0L,NULL},
  2193. -     /* (StatePtr) -1 */ NULL,
  2194. -     NULL,
  2195. -     NULL
  2196. -     };
  2197.       downEvent = event = *eventP;
  2198.       *upEvent = *downEvent;
  2199.       upEvent->event.eventType = ((event->event.eventType == ButtonPress) ?
  2200. --- 1161,1166 ----
  2201. ***************
  2202. *** 1163,1168 ****
  2203. --- 1171,1179 ----
  2204.       upEvent->event.modifiers
  2205.           |= buttonModifierMasks[event->event.eventCode];
  2206.   
  2207. +     if (event->event.lateModifiers)
  2208. +     event->event.lateModifiers->ref_count += (reps - 1) * 2;
  2209.       for (i=1; i<reps; i++) {
  2210.   
  2211.       /* up */
  2212. ***************
  2213. *** 1197,1209 ****
  2214.       EventPtr upEvent = &upEventRec;
  2215.       register int i;
  2216.   
  2217. -     static EventSeqRec timerEventRec = {
  2218. -     {0, 0,NULL, _XtEventTimerEventType, 0L, 0L,NULL},
  2219. -     /* (StatePtr) -1 */ NULL,
  2220. -     NULL,
  2221. -     NULL
  2222. -     };
  2223.       downEvent = event = *eventP;
  2224.       *upEvent = *downEvent;
  2225.       upEvent->event.eventType = ((event->event.eventType == ButtonPress) ?
  2226. --- 1208,1213 ----
  2227. ***************
  2228. *** 1214,1219 ****
  2229. --- 1218,1226 ----
  2230.       upEvent->event.modifiers
  2231.           |= buttonModifierMasks[event->event.eventCode];
  2232.   
  2233. +     if (event->event.lateModifiers)
  2234. +     event->event.lateModifiers->ref_count += reps * 2 - 1;
  2235.       for (i=0; i<reps; i++) {
  2236.   
  2237.       if (i > 0) {
  2238. ***************
  2239. *** 1251,1263 ****
  2240.       EventPtr upEvent = &upEventRec;
  2241.       register int i;
  2242.   
  2243. -     static EventSeqRec timerEventRec = {
  2244. -     {0, 0,NULL, _XtEventTimerEventType, 0L, 0L,NULL},
  2245. -     /* (StatePtr) -1 */ NULL,
  2246. -     NULL,
  2247. -     NULL
  2248. -     };
  2249.       /* the event currently sitting in *eventP is an "up" event */
  2250.       /* we want to make it a "down" event followed by an "up" event, */
  2251.       /* so that sequence matching on the "state" side works correctly. */
  2252. --- 1258,1263 ----
  2253. ***************
  2254. *** 1272,1277 ****
  2255. --- 1272,1280 ----
  2256.       downEvent->event.modifiers
  2257.           &= ~buttonModifierMasks[event->event.eventCode];
  2258.   
  2259. +     if (event->event.lateModifiers)
  2260. +     event->event.lateModifiers->ref_count += reps * 2 - 1;
  2261.       /* up */
  2262.       event->next = XtNew(EventSeqRec);
  2263.       event = event->next;
  2264. ***************
  2265. *** 1311,1323 ****
  2266.       EventPtr upEvent = &upEventRec;
  2267.       register int i;
  2268.   
  2269. -     static EventSeqRec timerEventRec = {
  2270. -     {0, 0,NULL, _XtEventTimerEventType, 0L, 0L,NULL},
  2271. -     /* (StatePtr) -1 */ NULL,
  2272. -     NULL,
  2273. -     NULL
  2274. -     };
  2275.       /* the event currently sitting in *eventP is an "up" event */
  2276.       /* we want to make it a "down" event followed by an "up" event, */
  2277.       /* so that sequence matching on the "state" side works correctly. */
  2278. --- 1314,1319 ----
  2279. ***************
  2280. *** 1332,1337 ****
  2281. --- 1328,1336 ----
  2282.       downEvent->event.modifiers
  2283.           &= ~buttonModifierMasks[event->event.eventCode];
  2284.   
  2285. +     if (event->event.lateModifiers)
  2286. +     event->event.lateModifiers->ref_count += reps * 2;
  2287.       for (i=0; i<reps; i++) {
  2288.   
  2289.       /* up */
  2290. ***************
  2291. *** 1366,1371 ****
  2292. --- 1365,1373 ----
  2293.   
  2294.       tempEvent = event = *eventP;
  2295.   
  2296. +     if (event->event.lateModifiers)
  2297. +     event->event.lateModifiers->ref_count += reps - 1;
  2298.       for (i=1; i<reps; i++) {
  2299.       event->next = XtNew(EventSeqRec);
  2300.       event = event->next;
  2301. ***************
  2302. *** 1386,1391 ****
  2303. --- 1388,1396 ----
  2304.   
  2305.       tempEvent = event = *eventP;
  2306.   
  2307. +     if (event->event.lateModifiers)
  2308. +     event->event.lateModifiers->ref_count += reps - 1;
  2309.       for (i=1; i<reps; i++) {
  2310.       event->next = XtNew(EventSeqRec);
  2311.       event = event->next;
  2312. ***************
  2313. *** 1423,1445 ****
  2314.       }
  2315.   }
  2316.   
  2317. ! static String ParseRepeat(str, eventP, actionsP)
  2318.       register String str;
  2319. !     EventPtr *eventP;
  2320. !     ActionPtr **actionsP;
  2321.   {
  2322. -     int reps;
  2323. -     Boolean plus = FALSE;
  2324. -     String right_paren;
  2325.   
  2326.       /*** Parse the repetitions, for double click etc... ***/
  2327. !     if (*str != '(') return str;
  2328.       str++;
  2329. !     right_paren = str;
  2330. !     ScanFor(right_paren, ')');
  2331. !     if (isascii(*str) && isdigit(*str)) {
  2332.       String start = str;
  2333. !     char repStr[100];
  2334.       int len;
  2335.   
  2336.       ScanNumeric(str);
  2337. --- 1428,1446 ----
  2338.       }
  2339.   }
  2340.   
  2341. ! static String ParseRepeat(str, reps, plus, error)
  2342.       register String str;
  2343. !     int    *reps;
  2344. !     Boolean *plus, *error;
  2345.   {
  2346.   
  2347.       /*** Parse the repetitions, for double click etc... ***/
  2348. !     if (*str != '(' || !(isdigit(str[1]) || str[1] == '+' || str[1] == ')'))
  2349. !     return str;
  2350.       str++;
  2351. !     if (isdigit(*str)) {
  2352.       String start = str;
  2353. !     char repStr[7];
  2354.       int len;
  2355.   
  2356.       ScanNumeric(str);
  2357. ***************
  2358. *** 1447,1464 ****
  2359.       if (len < sizeof repStr) {
  2360.           bcopy(start, repStr, len);
  2361.           repStr[len] = '\0';
  2362. !         reps = StrToNum(repStr);
  2363.       } else {
  2364. !         Syntax ("Repeat count too large; ignored.", "");
  2365. !         return right_paren;
  2366.       }
  2367. !     } else {
  2368.       Syntax("Missing repeat count.","");
  2369. !     return right_paren;
  2370.       }
  2371.   
  2372.       if (*str == '+') {
  2373. !     plus = TRUE;
  2374.       str++;
  2375.       }
  2376.       if (*str == ')')
  2377. --- 1448,1468 ----
  2378.       if (len < sizeof repStr) {
  2379.           bcopy(start, repStr, len);
  2380.           repStr[len] = '\0';
  2381. !         *reps = StrToNum(repStr);
  2382.       } else {
  2383. !         Syntax("Repeat count too large.", "");
  2384. !         *error = True;
  2385. !         return str;
  2386.       }
  2387. !     }
  2388. !     if (*reps == 0) {
  2389.       Syntax("Missing repeat count.","");
  2390. !     *error = True;
  2391. !     return str;
  2392.       }
  2393.   
  2394.       if (*str == '+') {
  2395. !     *plus = TRUE;
  2396.       str++;
  2397.       }
  2398.       if (*str == ')')
  2399. ***************
  2400. *** 1465,1475 ****
  2401.       str++;
  2402.       else {
  2403.       Syntax("Missing ')'.","");
  2404. !     return right_paren;
  2405.       }
  2406.   
  2407. -     if (reps > 1 || plus) RepeatEvent(eventP, reps, plus, actionsP);
  2408.       return str;
  2409.   }
  2410.   
  2411. --- 1469,1477 ----
  2412.       str++;
  2413.       else {
  2414.       Syntax("Missing ')'.","");
  2415. !     *error = True;
  2416.       }
  2417.   
  2418.       return str;
  2419.   }
  2420.   
  2421. ***************
  2422. *** 1525,1530 ****
  2423. --- 1527,1535 ----
  2424.                }
  2425.                else str++;
  2426.       } else {
  2427. +         int reps = 0;
  2428. +         Boolean plus = False;
  2429.               event = XtNew(EventRec);
  2430.               event->event = nullEvent;
  2431.               event->state = /* (StatePtr) -1 */ NULL;
  2432. ***************
  2433. *** 1531,1541 ****
  2434.               event->next = NULL;
  2435.               event->actions = NULL;
  2436.   
  2437. !         str = ParseEvent(str, event,error);
  2438.               if (*error) return str;
  2439.           *nextEvent = event;
  2440.           *actionsP = &event->actions;
  2441. !         str = ParseRepeat(str, &event, actionsP);
  2442.           nextEvent = &event->next;
  2443.       }
  2444.       ScanWhitespace(str);
  2445. --- 1536,1547 ----
  2446.               event->next = NULL;
  2447.               event->actions = NULL;
  2448.   
  2449. !         str = ParseEvent(str, event, &reps, &plus, error);
  2450.               if (*error) return str;
  2451.           *nextEvent = event;
  2452.           *actionsP = &event->actions;
  2453. !         if (reps > 1 || plus)
  2454. !         RepeatEvent(&event, reps, plus, actionsP);
  2455.           nextEvent = &event->next;
  2456.       }
  2457.       ScanWhitespace(str);
  2458. *** /tmp/,RCSt1000130    Tue Mar 17 11:48:45 1992
  2459. --- mit/lib/Xt/TMstate.c    Thu Feb 27 17:06:01 1992
  2460. ***************
  2461. *** 1,4 ****
  2462. ! /* $XConsortium: TMstate.c,v 1.159 91/12/03 16:33:34 converse Exp $ */
  2463.   /*LINTLIBRARY*/
  2464.   
  2465.   /***********************************************************
  2466. --- 1,4 ----
  2467. ! /* $XConsortium: TMstate.c,v 1.161 92/02/27 17:04:04 converse Exp $ */
  2468.   /*LINTLIBRARY*/
  2469.   
  2470.   /***********************************************************
  2471. ***************
  2472. *** 299,305 ****
  2473.            * late modifiers. If there isn't a match we use the
  2474.            * parser's copy
  2475.            */
  2476. !         if (event->lateModifiers) {
  2477.               XtFree((char *)event->lateModifiers);
  2478.               event->lateModifiers = NULL;
  2479.           }
  2480. --- 299,306 ----
  2481.            * late modifiers. If there isn't a match we use the
  2482.            * parser's copy
  2483.            */
  2484. !         if (event->lateModifiers &&
  2485. !             --event->lateModifiers->ref_count == 0) {
  2486.               XtFree((char *)event->lateModifiers);
  2487.               event->lateModifiers = NULL;
  2488.           }
  2489. ***************
  2490. *** 396,409 ****
  2491.       TMModifierMatch    modMatch;
  2492.       TMEventPtr         eventSeq;
  2493.   {
  2494. !     if (typeMatch->eventCodeMask) {    /* first time? */
  2495. !     typeMatch->eventCode = XInternAtom( eventSeq->xev->xany.display,
  2496. !                         XrmQuarkToString(typeMatch->eventCode),
  2497. !                         False
  2498. !                       );
  2499. !     typeMatch->eventCodeMask = 0L;
  2500. !     }
  2501. !     return (typeMatch->eventCode == eventSeq->event.eventCode);
  2502.   }
  2503.   
  2504.   #define IsOn(vec,idx) ((vec)[(idx)>>3] & (1 << ((idx) & 7)))
  2505. --- 397,408 ----
  2506.       TMModifierMatch    modMatch;
  2507.       TMEventPtr         eventSeq;
  2508.   {
  2509. !     Atom    atom;
  2510. !     atom = XInternAtom(eventSeq->xev->xany.display, 
  2511. !                XrmQuarkToString(typeMatch->eventCode),
  2512. !                False);
  2513. !     return (atom == eventSeq->event.eventCode);
  2514.   }
  2515.   
  2516.   #define IsOn(vec,idx) ((vec)[(idx)>>3] & (1 << ((idx) & 7)))
  2517. *** /tmp/,RCSt1000448    Tue Mar 17 12:03:39 1992
  2518. --- mit/lib/Xaw/Panner.c    Tue Mar  3 13:54:13 1992
  2519. ***************
  2520. *** 1,5 ****
  2521.   /*
  2522. !  * $XConsortium: Panner.c,v 1.43 91/08/26 10:53:17 gildea Exp $
  2523.    *
  2524.    * Copyright 1989 Massachusetts Institute of Technology
  2525.    *
  2526. --- 1,5 ----
  2527.   /*
  2528. !  * $XConsortium: Panner.c,v 1.45 92/03/03 13:52:26 converse Exp $
  2529.    *
  2530.    * Copyright 1989 Massachusetts Institute of Technology
  2531.    *
  2532. ***************
  2533. *** 483,490 ****
  2534.    *****************************************************************************/
  2535.   
  2536.   
  2537. ! static void Initialize (greq, gnew)
  2538.       Widget greq, gnew;
  2539.   {
  2540.       PannerWidget req = (PannerWidget) greq, new = (PannerWidget) gnew;
  2541.       Dimension defwidth, defheight;
  2542. --- 483,492 ----
  2543.    *****************************************************************************/
  2544.   
  2545.   
  2546. ! static void Initialize (greq, gnew, args, num_args)
  2547.       Widget greq, gnew;
  2548. +     ArgList args;
  2549. +     Cardinal *num_args;
  2550.   {
  2551.       PannerWidget req = (PannerWidget) greq, new = (PannerWidget) gnew;
  2552.       Dimension defwidth, defheight;
  2553. ***************
  2554. *** 531,537 ****
  2555.           gotpm = TRUE;
  2556.       }
  2557.       }
  2558. !     (*gw->core.widget_class->core_class.superclass->core_class.realize)
  2559.         (gw, valuemaskp, attr);
  2560.   
  2561.       if (gotpm) XFreePixmap (XtDisplay(gw), pm);
  2562. --- 533,539 ----
  2563.           gotpm = TRUE;
  2564.       }
  2565.       }
  2566. !     (*pannerWidgetClass->core_class.superclass->core_class.realize)
  2567.         (gw, valuemaskp, attr);
  2568.   
  2569.       if (gotpm) XFreePixmap (XtDisplay(gw), pm);
  2570. ***************
  2571. *** 599,606 ****
  2572.   
  2573.   
  2574.   /* ARGSUSED */
  2575. ! static Boolean SetValues (gcur, greq, gnew)
  2576.       Widget gcur, greq, gnew;
  2577.   {
  2578.       PannerWidget cur = (PannerWidget) gcur;
  2579.       PannerWidget new = (PannerWidget) gnew;
  2580. --- 601,610 ----
  2581.   
  2582.   
  2583.   /* ARGSUSED */
  2584. ! static Boolean SetValues (gcur, greq, gnew, args, num_args)
  2585.       Widget gcur, greq, gnew;
  2586. +     ArgList args;
  2587. +     Cardinal *num_args;
  2588.   {
  2589.       PannerWidget cur = (PannerWidget) gcur;
  2590.       PannerWidget new = (PannerWidget) gnew;
  2591. *** /tmp/,RCSt1000745    Tue Mar 17 15:21:29 1992
  2592. --- mit/clients/xterm/Imakefile    Wed Mar 11 17:36:06 1992
  2593. ***************
  2594. *** 1,4 ****
  2595. ! XCOMM $XConsortium: Imakefile,v 1.55 91/09/22 11:40:47 rws Exp $
  2596.   XCOMM
  2597.   XCOMM                         Attention xterm porters
  2598.   XCOMM
  2599. --- 1,4 ----
  2600. ! XCOMM $XConsortium: Imakefile,v 1.56 92/03/11 17:35:22 gildea Exp $
  2601.   XCOMM
  2602.   XCOMM                         Attention xterm porters
  2603.   XCOMM
  2604. ***************
  2605. *** 20,26 ****
  2606.            PTYLIB = -lpucc
  2607.   #endif
  2608.   
  2609. !    MAIN_DEFINES = -DUTMP $(TTYGROUPDEF) $(PUCCPTYDDEF)
  2610.      MISC_DEFINES = /* -DALLOWLOGFILEEXEC */
  2611.   
  2612.             SRCS1 = button.c charproc.c cursor.c data.c input.c \
  2613. --- 20,31 ----
  2614.            PTYLIB = -lpucc
  2615.   #endif
  2616.   
  2617. !  OSMAJORVERSION = OSMajorVersion
  2618. !  OSMINORVERSION = OSMinorVersion
  2619. !    MAIN_DEFINES = -DUTMP $(TTYGROUPDEF) $(PUCCPTYDDEF) \
  2620. !           -DOSMAJORVERSION=$(OSMAJORVERSION) \
  2621. !           -DOSMINORVERSION=$(OSMINORVERSION)
  2622.      MISC_DEFINES = /* -DALLOWLOGFILEEXEC */
  2623.   
  2624.             SRCS1 = button.c charproc.c cursor.c data.c input.c \
  2625. *** /tmp/,RCSt1000549    Tue Mar 17 12:09:36 1992
  2626. --- mit/clients/xterm/main.c    Wed Mar 11 17:37:01 1992
  2627. ***************
  2628. *** 1,5 ****
  2629.   #ifndef lint
  2630. ! static char *rid="$XConsortium: main.c,v 1.199 91/12/23 17:02:24 gildea Exp $";
  2631.   #endif /* lint */
  2632.   
  2633.   /*
  2634. --- 1,5 ----
  2635.   #ifndef lint
  2636. ! static char *rid="$XConsortium: main.c,v 1.200 92/03/11 17:36:12 gildea Exp $";
  2637.   #endif /* lint */
  2638.   
  2639.   /*
  2640. ***************
  2641. *** 1208,1214 ****
  2642.       strcpy(ttydev, ttyname(*pty));
  2643.       return 0;
  2644.   #endif
  2645. ! #ifdef sgi
  2646.       {
  2647.           char    *tty_name;
  2648.   
  2649. --- 1208,1214 ----
  2650.       strcpy(ttydev, ttyname(*pty));
  2651.       return 0;
  2652.   #endif
  2653. ! #if defined(sgi) && OSMAJORVERSION >= 4
  2654.       {
  2655.           char    *tty_name;
  2656.   
  2657. ***************
  2658. *** 1237,1243 ****
  2659.   #ifdef USE_GET_PSEUDOTTY
  2660.       return ((*pty = getpseudotty (&ttydev, &ptydev)) >= 0 ? 0 : 1);
  2661.   #else
  2662. ! #if (defined(umips) && defined (SYSTYPE_SYSV))
  2663.       struct stat fstat_buf;
  2664.   
  2665.       *pty = open ("/dev/ptc", O_RDWR);
  2666. --- 1237,1243 ----
  2667.   #ifdef USE_GET_PSEUDOTTY
  2668.       return ((*pty = getpseudotty (&ttydev, &ptydev)) >= 0 ? 0 : 1);
  2669.   #else
  2670. ! #if (defined(sgi) && OSMAJORVERSION < 4) || (defined(umips) && defined (SYSTYPE_SYSV))
  2671.       struct stat fstat_buf;
  2672.   
  2673.       *pty = open ("/dev/ptc", O_RDWR);
  2674. *** /tmp/,RCSt1000569    Tue Mar 17 12:10:45 1992
  2675. --- mit/clients/xterm/misc.c    Fri Mar 13 17:04:37 1992
  2676. ***************
  2677. *** 1,5 ****
  2678.   /*
  2679. !  *    $XConsortium: misc.c,v 1.90 91/07/25 17:59:05 rws Exp $
  2680.    */
  2681.   
  2682.   /*
  2683. --- 1,5 ----
  2684.   /*
  2685. !  *    $XConsortium: misc.c,v 1.92 92/03/13 17:02:08 gildea Exp $
  2686.    */
  2687.   
  2688.   /*
  2689. ***************
  2690. *** 254,262 ****
  2691.                      (event->detail == NotifyPointer) ? INWINDOW :
  2692.                                     FOCUS);
  2693.           if (screen->grabbedKbd && (event->mode == NotifyUngrab)) {
  2694. -             screen->grabbedKbd = FALSE;
  2695. -             ReverseVideo(term);
  2696.               XBell(screen->display, 100);
  2697.           }
  2698.       }
  2699.   }
  2700. --- 254,263 ----
  2701.                      (event->detail == NotifyPointer) ? INWINDOW :
  2702.                                     FOCUS);
  2703.           if (screen->grabbedKbd && (event->mode == NotifyUngrab)) {
  2704.               XBell(screen->display, 100);
  2705. +             ReverseVideo(term);
  2706. +             screen->grabbedKbd = FALSE;
  2707. +             update_securekbd();
  2708.           }
  2709.       }
  2710.   }
  2711. ***************
  2712. *** 570,576 ****
  2713.   
  2714.       cp = screen->TekEmu ? Tbptr : bptr;
  2715.       if((i = cp - screen->logstart) > 0)
  2716. !         write(screen->logfd, screen->logstart, i);
  2717.       screen->logstart = screen->TekEmu ? Tbuffer : buffer;
  2718.   }
  2719.   
  2720. --- 571,577 ----
  2721.   
  2722.       cp = screen->TekEmu ? Tbptr : bptr;
  2723.       if((i = cp - screen->logstart) > 0)
  2724. !         write(screen->logfd, (char *)screen->logstart, i);
  2725.       screen->logstart = screen->TekEmu ? Tbuffer : buffer;
  2726.   }
  2727.   
  2728. *** /tmp/,RCSt1000589    Tue Mar 17 12:12:00 1992
  2729. --- mit/clients/xterm/charproc.c    Fri Mar 13 18:01:33 1992
  2730. ***************
  2731. *** 1,5 ****
  2732.   /*
  2733. !  * $XConsortium: charproc.c,v 1.173 91/07/22 11:32:49 gildea Exp $
  2734.    */
  2735.   
  2736.   /*
  2737. --- 1,5 ----
  2738.   /*
  2739. !  * $XConsortium: charproc.c,v 1.176 92/03/13 18:00:30 gildea Exp $
  2740.    */
  2741.   
  2742.   /*
  2743. ***************
  2744. *** 1253,1259 ****
  2745.       if (select_mask & pty_mask && eventMode == NORMAL) {
  2746.           if (screen->logging)
  2747.           FlushLog(screen);
  2748. !         bcnt = read(screen->respond, bptr = buffer, BUF_SIZE);
  2749.           if (bcnt < 0) {
  2750.           if (errno == EIO)
  2751.               Cleanup (0);
  2752. --- 1253,1259 ----
  2753.       if (select_mask & pty_mask && eventMode == NORMAL) {
  2754.           if (screen->logging)
  2755.           FlushLog(screen);
  2756. !         bcnt = read(screen->respond, (char *)(bptr = buffer), BUF_SIZE);
  2757.           if (bcnt < 0) {
  2758.           if (errno == EIO)
  2759.               Cleanup (0);
  2760. ***************
  2761. *** 1508,1513 ****
  2762. --- 1508,1514 ----
  2763.           switch (param[i]) {
  2764.           case 1:            /* DECCKM            */
  2765.               (*func)(&termw->keyboard.flags, CURSOR_APL);
  2766. +             update_appcursor();
  2767.               break;
  2768.           case 2:            /* ANSI/VT52 mode        */
  2769.               if (func == bitset) {
  2770. ***************
  2771. *** 1587,1593 ****
  2772.                   screen->send_mouse_pos = 0;
  2773.               break;
  2774.           case 38:        /* DECTEK            */
  2775. !             if(func == bitset & !(screen->inhibit & I_TEK)) {
  2776.                   if(screen->logging) {
  2777.                       FlushLog(screen);
  2778.                       screen->logstart = Tbuffer;
  2779. --- 1588,1594 ----
  2780.                   screen->send_mouse_pos = 0;
  2781.               break;
  2782.           case 38:        /* DECTEK            */
  2783. !             if(func == bitset && !(screen->inhibit & I_TEK)) {
  2784.                   if(screen->logging) {
  2785.                       FlushLog(screen);
  2786.                       screen->logstart = Tbuffer;
  2787. ***************
  2788. *** 1812,1818 ****
  2789.           case 44:        /* margin bell            */
  2790.               if(!(screen->marginbell = screen->save_modes[12]))
  2791.                   screen->bellarmed = -1;
  2792. !             update_visualbell();
  2793.               break;
  2794.           case 45:        /* reverse wraparound    */
  2795.               termw->flags &= ~REVERSEWRAP;
  2796. --- 1813,1819 ----
  2797.           case 44:        /* margin bell            */
  2798.               if(!(screen->marginbell = screen->save_modes[12]))
  2799.                   screen->bellarmed = -1;
  2800. !             update_marginbell();
  2801.               break;
  2802.           case 45:        /* reverse wraparound    */
  2803.               termw->flags &= ~REVERSEWRAP;
  2804. ***************
  2805. *** 2149,2158 ****
  2806.   }
  2807.   
  2808.   
  2809. ! static void VTInitialize (request, new)
  2810. !    XtermWidget request, new;
  2811.   {
  2812.      int i;
  2813.      /* Zero out the entire "screen" component of "new" widget,
  2814.         then do field-by-field assigment of "screen" fields
  2815.         that are named in the resource list. */
  2816. --- 2150,2165 ----
  2817.   }
  2818.   
  2819.   
  2820. ! /* ARGSUSED */
  2821. ! static void VTInitialize (wrequest, wnew, args, num_args)
  2822. !    Widget wrequest, wnew;
  2823. !    ArgList args;
  2824. !    Cardinal *num_args;
  2825.   {
  2826. +    XtermWidget request = (XtermWidget) wrequest;
  2827. +    XtermWidget new     = (XtermWidget) wnew;
  2828.      int i;
  2829.      /* Zero out the entire "screen" component of "new" widget,
  2830.         then do field-by-field assigment of "screen" fields
  2831.         that are named in the resource list. */
  2832. ***************
  2833. *** 2402,2408 ****
  2834.       screen->bot_marg = screen->max_row = Height(screen) /
  2835.                   screen->fullVwin.f_height - 1;
  2836.   
  2837. !     screen->sc.row = screen->sc.col = screen->sc.flags = NULL;
  2838.   
  2839.       /* Mark screen buffer as unallocated.  We wait until the run loop so
  2840.          that the child process does not fork and exec with all the dynamic
  2841. --- 2409,2415 ----
  2842.       screen->bot_marg = screen->max_row = Height(screen) /
  2843.                   screen->fullVwin.f_height - 1;
  2844.   
  2845. !     screen->sc.row = screen->sc.col = screen->sc.flags = 0;
  2846.   
  2847.       /* Mark screen buffer as unallocated.  We wait until the run loop so
  2848.          that the child process does not fork and exec with all the dynamic
  2849. ***************
  2850. *** 2411,2417 ****
  2851.       if (!tekWidget)            /* if not called after fork */
  2852.         screen->buf = screen->allbuf = NULL;
  2853.   
  2854. !     screen->do_wrap = NULL;
  2855.       screen->scrolls = screen->incopy = 0;
  2856.       set_vt_box (screen);
  2857.   
  2858. --- 2418,2424 ----
  2859.       if (!tekWidget)            /* if not called after fork */
  2860.         screen->buf = screen->allbuf = NULL;
  2861.   
  2862. !     screen->do_wrap = 0;
  2863.       screen->scrolls = screen->incopy = 0;
  2864.       set_vt_box (screen);
  2865.   
  2866. ***************
  2867. *** 2641,2647 ****
  2868.       term->flags &= ~ORIGIN;
  2869.       if(full) {
  2870.           TabReset (term->tabs);
  2871. !         term->keyboard.flags = NULL;
  2872.           update_appcursor();
  2873.           update_appkeypad();
  2874.           screen->gsets[0] = 'B';
  2875. --- 2648,2654 ----
  2876.       term->flags &= ~ORIGIN;
  2877.       if(full) {
  2878.           TabReset (term->tabs);
  2879. !         term->keyboard.flags = 0;
  2880.           update_appcursor();
  2881.           update_appkeypad();
  2882.           screen->gsets[0] = 'B';
  2883. *** /tmp/,RCSt1029848    Tue Mar 17 11:36:12 1992
  2884. --- mit/clients/editres/widgets.c    Tue Feb 11 11:49:17 1992
  2885. ***************
  2886. *** 1,5 ****
  2887.   /*
  2888. !  * $XConsortium: widgets.c,v 1.19 91/12/06 17:20:00 dave Exp $
  2889.    *
  2890.    * Copyright 1989 Massachusetts Institute of Technology
  2891.    *
  2892. --- 1,5 ----
  2893.   /*
  2894. !  * $XConsortium: widgets.c,v 1.20 92/02/11 11:44:24 dave Exp $
  2895.    *
  2896.    * Copyright 1989 Massachusetts Institute of Technology
  2897.    *
  2898. ***************
  2899. *** 835,840 ****
  2900. --- 835,842 ----
  2901.       WNode * node = (WNode *) ptr;
  2902.       NameInfo *old_name, *name = node->resources->res_box->name_info;
  2903.       
  2904. +     global_resource_box_up = FALSE;
  2905.       XtFree((XtPointer) node->resources->res_box);
  2906.       node->resources->res_box = NULL;
  2907.   
  2908. *** /tmp/,RCSt1029866    Tue Mar 17 11:37:36 1992
  2909. --- mit/clients/editres/handler.c    Tue Feb 11 11:49:22 1992
  2910. ***************
  2911. *** 1,5 ****
  2912.   /*
  2913. !  * $XConsortium: handler.c,v 1.25 91/10/09 17:36:13 dave Exp $
  2914.    *
  2915.    * Copyright 1989 Massachusetts Institute of Technology
  2916.    *
  2917. --- 1,5 ----
  2918.   /*
  2919. !  * $XConsortium: handler.c,v 1.26 92/02/11 11:45:31 dave Exp $
  2920.    *
  2921.    * Copyright 1989 Massachusetts Institute of Technology
  2922.    *
  2923. ***************
  2924. *** 561,569 ****
  2925.   XtPointer shell_ptr, junk;
  2926.   {
  2927.       Widget shell = (Widget) shell_ptr;
  2928. -     if (streq(XtName(shell), RESOURCE_BOX))
  2929. -     global_resource_box_up = FALSE;
  2930.   
  2931.       XtPopdown(shell);
  2932.       XtDestroyWidget(shell);
  2933. --- 561,566 ----
  2934. *** /tmp/,RCSt1029944    Tue Mar 17 11:42:43 1992
  2935. --- mit/clients/xauth/process.c    Tue Feb 18 18:05:08 1992
  2936. ***************
  2937. *** 1,5 ****
  2938.   /*
  2939. !  * $XConsortium: process.c,v 1.41 92/01/22 23:39:12 gildea Exp $
  2940.    *
  2941.    * Copyright 1989 Massachusetts Institute of Technology
  2942.    *
  2943. --- 1,5 ----
  2944.   /*
  2945. !  * $XConsortium: process.c,v 1.42 92/02/18 18:05:00 gildea Exp $
  2946.    *
  2947.    * Copyright 1989 Massachusetts Institute of Technology
  2948.    *
  2949. ***************
  2950. *** 330,348 ****
  2951.   {
  2952.       char *s;
  2953.       register char *cp;
  2954. !     char buf[2];
  2955.   
  2956.       cp = s = malloc (n);
  2957.       if (!cp) return 0;
  2958.   
  2959.       while (n > 0) {
  2960. !     if ((buf[0] = getinput (fp)) == EOF || buf[0] == '\n' ||
  2961. !         (buf[1] = getinput (fp)) == EOF || buf[1] == '\n') {
  2962.           free (s);
  2963.           return 0;
  2964.       }
  2965. !     *cp = (char) ((hexvalues[(unsigned int)buf[0]] * 16) + 
  2966. !               hexvalues[(unsigned int)buf[1]]);
  2967.       cp++;
  2968.       n--;
  2969.       }
  2970. --- 330,347 ----
  2971.   {
  2972.       char *s;
  2973.       register char *cp;
  2974. !     int c1, c2;
  2975.   
  2976.       cp = s = malloc (n);
  2977.       if (!cp) return 0;
  2978.   
  2979.       while (n > 0) {
  2980. !     if ((c1 = getinput (fp)) == EOF || c1 == '\n' ||
  2981. !         (c2 = getinput (fp)) == EOF || c2 == '\n') {
  2982.           free (s);
  2983.           return 0;
  2984.       }
  2985. !     *cp = (char) ((hexvalues[c1] * 16) + hexvalues[c2]);
  2986.       cp++;
  2987.       n--;
  2988.       }
  2989.