home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume18 / x11fix16 / part03 < prev    next >
Encoding:
Text File  |  1992-08-02  |  12.9 KB  |  390 lines

  1. Newsgroups: comp.sources.x
  2. Path: uunet!haven.umd.edu!darwin.sura.net!mips!msi!dcmartin
  3. From: Bob Scheifler <rws@expo.lcs.mit.edu>
  4. Subject: v18i080: X11R5 public fix #16, Part03/03
  5. Message-ID: <1992Aug3.143909.29963@msi.com>
  6. Originator: dcmartin@fascet
  7. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  8. Organization: Molecular Simulations, Inc.
  9. References: <csx-18i078-X11-fix16@uunet.UU.NET>
  10. Date: Mon, 3 Aug 1992 14:39:09 GMT
  11. Approved: dcmartin@msi.com
  12. Lines: 376
  13.  
  14. Submitted-by: Bob Scheifler <rws@expo.lcs.mit.edu>
  15. Posting-number: Volume 18, Issue 80
  16. Archive-name: X11-fix16/part03
  17.  
  18. #!/bin/sh
  19. # this is part.03 (part 3 of a multipart archive)
  20. # do not concatenate these parts, unpack them in order with /bin/sh
  21. # file fix-16 continued
  22. #
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 3; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. if test ! -f _shar_wnt_.tmp; then
  36.     echo 'x - still skipping fix-16'
  37. else
  38. echo 'x - continuing file fix-16'
  39. sed 's/^X//' << 'SHAR_EOF' >> 'fix-16' &&
  40. !         XSelectInput( ic->core.im->core.display, ic->core.client_window,
  41. !               war.your_event_mask );
  42. X      }
  43. +     return(ret);
  44. + }
  45. X  
  46. X  char *
  47. X  _Ximp_SetICValueData(ic, values, mode, change_mask)
  48. ***************
  49. *** 144,158 ****
  50. X          else if(strcmp(p->name, XNClientWindow)==0) {
  51. X              if(!(ic->ximp_icpart->value_mask & XIMP_CLIENT_WIN)) {
  52. X                  if(mode == XIMP_SET_IC && (ic->ximp_icpart->icid)) {
  53. !                     _Ximp_IM_SendMessage(ic, XIMP_DESTROY, NULL, NULL, NULL);
  54. !                     XDestroyWindow(ic->core.im->core.display,
  55. !                                ic->core.client_window);
  56. !                     ic->core.client_window = (Window)p->value;
  57. X                      ic->ximp_icpart->value_mask |= XIMP_CLIENT_WIN;
  58. X                      if(_Ximp_SetOpenXIMP(ic, mode) == False) {
  59. X                          return_name = p->name;
  60. X                          break;
  61. X                          }
  62. X                      *change_mask = NULL;
  63. X                      }
  64. X                  else { /* XIMP_CREATE_IC | (XIMP_SET_IC && XIMP_START_IC) */
  65. --- 240,264 ----
  66. X          else if(strcmp(p->name, XNClientWindow)==0) {
  67. X              if(!(ic->ximp_icpart->value_mask & XIMP_CLIENT_WIN)) {
  68. X                  if(mode == XIMP_SET_IC && (ic->ximp_icpart->icid)) {
  69. !                     long    icid_old, icid_new;
  70. !                     Window    client_window;
  71. !                     icid_old = ic->ximp_icpart->icid;
  72. !                     client_window = ic->core.client_window;
  73. X                      ic->ximp_icpart->value_mask |= XIMP_CLIENT_WIN;
  74. +                     ic->core.client_window = (Window)p->value;
  75. X                      if(_Ximp_SetOpenXIMP(ic, mode) == False) {
  76. X                          return_name = p->name;
  77. +                         ic->ximp_icpart->value_mask &= ~XIMP_CLIENT_WIN;
  78. +                         ic->core.client_window = client_window;
  79. X                          break;
  80. X                          }
  81. +                     icid_new = ic->ximp_icpart->icid;
  82. +                     ic->ximp_icpart->icid = icid_old;
  83. +                     _Ximp_IM_SendMessage(ic, XIMP_DESTROY, NULL, NULL, NULL);
  84. +                     ic->ximp_icpart->icid = icid_new;
  85. +                     XDestroyWindow(ic->core.im->core.display,
  86. +                                client_window);
  87. X                      *change_mask = NULL;
  88. X                      }
  89. X                  else { /* XIMP_CREATE_IC | (XIMP_SET_IC && XIMP_START_IC) */
  90. ***************
  91. *** 333,339 ****
  92. X                  for(i = 0, len = 0; i < list_ret; i++) {
  93. X                      len += strlen(name_list[i]);
  94. X                      }
  95. !                 tmp = Xmalloc(len + i + 1);
  96. X                  tmp[0] = NULL;
  97. X                  for(i = 0; i < list_ret; i++) {
  98. X                      strcat(tmp, name_list[i]);
  99. --- 439,448 ----
  100. X                  for(i = 0, len = 0; i < list_ret; i++) {
  101. X                      len += strlen(name_list[i]);
  102. X                      }
  103. !                 if( (tmp = Xmalloc(len + i + 1)) == NULL ) {
  104. !                     return_name = p->name;
  105. !                     return( False );
  106. !                 }
  107. X                  tmp[0] = NULL;
  108. X                  for(i = 0; i < list_ret; i++) {
  109. X                      strcat(tmp, name_list[i]);
  110. ***************
  111. *** 480,486 ****
  112. X                  for(i = 0, len = 0; i < list_ret; i++) {
  113. X                      len += strlen(name_list[i]);
  114. X                      }
  115. !                 tmp = Xmalloc(len + i + 1);
  116. X                  tmp[0] = NULL;
  117. X                  for(i = 0; i < list_ret; i++) {
  118. X                      strcat(tmp, name_list[i]);
  119. --- 589,598 ----
  120. X                  for(i = 0, len = 0; i < list_ret; i++) {
  121. X                      len += strlen(name_list[i]);
  122. X                      }
  123. !                 if( (tmp = Xmalloc(len + i + 1)) == NULL ) {
  124. !                     return_name = p->name;
  125. !                     return( False );
  126. !                 }
  127. X                  tmp[0] = NULL;
  128. X                  for(i = 0; i < list_ret; i++) {
  129. X                      strcat(tmp, name_list[i]);
  130. *** /tmp/d14669    Sat Aug  1 11:17:05 1992
  131. --- mit/lib/X/Ximp/XimpRm.c    Sat Aug  1 11:16:54 1992
  132. ***************
  133. *** 1,8 ****
  134. ! /* $XConsortium: XimpRm.c,v 1.4 92/04/14 13:29:56 rws Exp $ */
  135. X  /******************************************************************
  136. X  
  137. X                Copyright 1991, 1992 by FUJITSU LIMITED
  138. !               Copyright 1991, 1992 by Sony Corporaion
  139. X  
  140. X  Permission to use, copy, modify, distribute, and sell this software
  141. X  and its documentation for any purpose is hereby granted without fee,
  142. --- 1,8 ----
  143. ! /* $XConsortium: XimpRm.c,v 1.5 92/07/29 10:16:22 rws Exp $ */
  144. X  /******************************************************************
  145. X  
  146. X                Copyright 1991, 1992 by FUJITSU LIMITED
  147. !               Copyright 1991, 1992 by Sony Corporation
  148. X  
  149. X  Permission to use, copy, modify, distribute, and sell this software
  150. X  and its documentation for any purpose is hereby granted without fee,
  151. ***************
  152. *** 26,32 ****
  153. X  OR PERFORMANCE OF THIS SOFTWARE.
  154. X  
  155. X    Author: Takashi Fujiwara     FUJITSU LIMITED 
  156. !           Makoto Wakamatsu     Sony Corporaion
  157. X  
  158. X  ******************************************************************/
  159. X  
  160. --- 26,32 ----
  161. X  OR PERFORMANCE OF THIS SOFTWARE.
  162. X  
  163. X    Author: Takashi Fujiwara     FUJITSU LIMITED 
  164. !           Makoto Wakamatsu     Sony Corporation
  165. X  
  166. X  ******************************************************************/
  167. X  
  168. ***************
  169. *** 175,181 ****
  170. X      {
  171. X      char         res_name[256];
  172. X      char         res_class[256];
  173. !     char        *str_type[50];
  174. X      XrmValue     value;
  175. X      Bool         ret = False;
  176. X      KeySym         keysym = NoSymbol;
  177. --- 175,181 ----
  178. X      {
  179. X      char         res_name[256];
  180. X      char         res_class[256];
  181. !     char        *str_type;
  182. X      XrmValue     value;
  183. X      Bool         ret = False;
  184. X      KeySym         keysym = NoSymbol;
  185. ***************
  186. *** 189,195 ****
  187. X      strcat(res_name, "inputserver");
  188. X      strcat(res_class, "Inputserver");
  189. X      if(XrmGetResource(im->core.rdb, res_name, res_class,
  190. !                 str_type, &value) == True) { 
  191. X          if(strcmp(value.addr, "off") == 0) {
  192. X              /* Keysym */
  193. X              _Ximp_Get_resource_name(im, res_name, res_class);
  194. --- 189,195 ----
  195. X      strcat(res_name, "inputserver");
  196. X      strcat(res_class, "Inputserver");
  197. X      if(XrmGetResource(im->core.rdb, res_name, res_class,
  198. !                 &str_type, &value) == True) { 
  199. X          if(strcmp(value.addr, "off") == 0) {
  200. X              /* Keysym */
  201. X              _Ximp_Get_resource_name(im, res_name, res_class);
  202. ***************
  203. *** 196,202 ****
  204. X              strcat(res_name, "startkeysym");
  205. X              strcat(res_class, "Startkeysym");
  206. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  207. !                 str_type, &value) == True) { 
  208. X                  keysym = XStringToKeysym(value.addr);
  209. X                  }
  210. X              ret = False;
  211. --- 196,202 ----
  212. X              strcat(res_name, "startkeysym");
  213. X              strcat(res_class, "Startkeysym");
  214. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  215. !                 &str_type, &value) == True) { 
  216. X                  keysym = XStringToKeysym(value.addr);
  217. X                  }
  218. X              ret = False;
  219. ***************
  220. *** 220,226 ****
  221. X              strcat(res_name, "processStartKeys");
  222. X              strcat(res_class, "ProcessStartKeys");
  223. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  224. !                         str_type, &value)  == True) {
  225. X                  char    *string, *ss, c;
  226. X                  char    *line;
  227. X  
  228. --- 220,226 ----
  229. X              strcat(res_name, "processStartKeys");
  230. X              strcat(res_class, "ProcessStartKeys");
  231. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  232. !                         &str_type, &value)  == True) {
  233. X                  char    *string, *ss, c;
  234. X                  char    *line;
  235. X  
  236. ***************
  237. *** 249,255 ****
  238. X      strcat(res_name, "callbackEncoding");
  239. X      strcat(res_class, "CallbackEncoding");
  240. X      if(XrmGetResource(im->core.rdb, res_name, res_class,
  241. !                 str_type, &value) == True) { 
  242. X          if(strcmp(value.addr, "wchar") == 0) {
  243. X              im->ximp_impart->use_wchar = True;
  244. X              }
  245. --- 249,255 ----
  246. X      strcat(res_name, "callbackEncoding");
  247. X      strcat(res_class, "CallbackEncoding");
  248. X      if(XrmGetResource(im->core.rdb, res_name, res_class,
  249. !                 &str_type, &value) == True) { 
  250. X          if(strcmp(value.addr, "wchar") == 0) {
  251. X              im->ximp_impart->use_wchar = True;
  252. X              }
  253. ***************
  254. *** 267,273 ****
  255. X      Ximp_XIM     im;
  256. X      char         res_name[256];
  257. X      char         res_class[256];
  258. !     char        *str_type[50];
  259. X      XrmValue     value;
  260. X      Colormap     default_colormap;
  261. X      XColor         screen_def, exact_def;
  262. --- 267,273 ----
  263. X      Ximp_XIM     im;
  264. X      char         res_name[256];
  265. X      char         res_class[256];
  266. !     char        *str_type;
  267. X      XrmValue     value;
  268. X      Colormap     default_colormap;
  269. X      XColor         screen_def, exact_def;
  270. ***************
  271. *** 284,290 ****
  272. X              strcat(res_name, "preedit.background");
  273. X              strcat(res_class, "Preedit.Background");
  274. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  275. !                     str_type, &value) == True) { 
  276. X                  default_colormap = DefaultColormap(
  277. X                          im->core.display,
  278. X                          DefaultScreen(im->core.display) );
  279. --- 284,290 ----
  280. X              strcat(res_name, "preedit.background");
  281. X              strcat(res_class, "Preedit.Background");
  282. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  283. !                     &str_type, &value) == True) { 
  284. X                  default_colormap = DefaultColormap(
  285. X                          im->core.display,
  286. X                          DefaultScreen(im->core.display) );
  287. ***************
  288. *** 304,310 ****
  289. X              strcat(res_name, "preedit.foreground");
  290. X              strcat(res_class, "Preedit.Foreground");
  291. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  292. !                     str_type, &value) == True) { 
  293. X                  default_colormap = DefaultColormap(
  294. X                          im->core.display,
  295. X                          DefaultScreen(im->core.display) );
  296. --- 304,310 ----
  297. X              strcat(res_name, "preedit.foreground");
  298. X              strcat(res_class, "Preedit.Foreground");
  299. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  300. !                     &str_type, &value) == True) { 
  301. X                  default_colormap = DefaultColormap(
  302. X                          im->core.display,
  303. X                          DefaultScreen(im->core.display) );
  304. ***************
  305. *** 324,330 ****
  306. X              strcat(res_name, "preedit.linespacing");
  307. X              strcat(res_class, "Preedit.Linespacing");
  308. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  309. !                     str_type, &value) == True) { 
  310. X                  num = atoi(value.addr);
  311. X                  ic->core.preedit_attr.line_space = num;
  312. X                  ic->ximp_icpart->preedit_attr.LineSpacing = 
  313. --- 324,330 ----
  314. X              strcat(res_name, "preedit.linespacing");
  315. X              strcat(res_class, "Preedit.Linespacing");
  316. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  317. !                     &str_type, &value) == True) { 
  318. X                  num = atoi(value.addr);
  319. X                  ic->core.preedit_attr.line_space = num;
  320. X                  ic->ximp_icpart->preedit_attr.LineSpacing = 
  321. ***************
  322. *** 341,347 ****
  323. X              strcat(res_name, "status.background");
  324. X              strcat(res_class, "Status.Background");
  325. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  326. !                     str_type, &value) == True) { 
  327. X                  default_colormap = DefaultColormap(
  328. X                          im->core.display,
  329. X                          DefaultScreen(im->core.display) );
  330. --- 341,347 ----
  331. X              strcat(res_name, "status.background");
  332. X              strcat(res_class, "Status.Background");
  333. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  334. !                     &str_type, &value) == True) { 
  335. X                  default_colormap = DefaultColormap(
  336. X                          im->core.display,
  337. X                          DefaultScreen(im->core.display) );
  338. ***************
  339. *** 362,368 ****
  340. X              strcat(res_name, "status.foreground");
  341. X              strcat(res_class, "Status.Foreground");
  342. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  343. !                     str_type, &value) == True) { 
  344. X                  default_colormap = DefaultColormap(
  345. X                          im->core.display,
  346. X                          DefaultScreen(im->core.display) );
  347. --- 362,368 ----
  348. X              strcat(res_name, "status.foreground");
  349. X              strcat(res_class, "Status.Foreground");
  350. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  351. !                     &str_type, &value) == True) { 
  352. X                  default_colormap = DefaultColormap(
  353. X                          im->core.display,
  354. X                          DefaultScreen(im->core.display) );
  355. ***************
  356. *** 382,388 ****
  357. X              strcat(res_name, "status.linespacing");
  358. X              strcat(res_class, "Status.Linespacing");
  359. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  360. !                     str_type, &value) == True) { 
  361. X                  num = atoi(value.addr);
  362. X                  ic->core.status_attr.line_space = num;
  363. X                  ic->ximp_icpart->status_attr.LineSpacing = 
  364. --- 382,388 ----
  365. X              strcat(res_name, "status.linespacing");
  366. X              strcat(res_class, "Status.Linespacing");
  367. X              if(XrmGetResource(im->core.rdb, res_name, res_class,
  368. !                     &str_type, &value) == True) { 
  369. X                  num = atoi(value.addr);
  370. X                  ic->core.status_attr.line_space = num;
  371. X                  ic->ximp_icpart->status_attr.LineSpacing = 
  372. SHAR_EOF
  373. echo 'File fix-16 is complete' &&
  374. chmod 0644 fix-16 ||
  375. echo 'restore of fix-16 failed'
  376. Wc_c="`wc -c < 'fix-16'`"
  377. test 109408 -eq "$Wc_c" ||
  378.     echo 'fix-16: original size 109408, current size' "$Wc_c"
  379. rm -f _shar_wnt_.tmp
  380. fi
  381. rm -f _shar_seq_.tmp
  382. echo You have unpacked the last part
  383. exit 0
  384. -- 
  385. Senior Systems Scientist        mail: dcmartin@msi.com
  386. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  387. 796 North Pastoria Avenue        at&t: 408/522-9236
  388. Sunnyvale, California 94086        fax: 408/732-0831
  389.